Hypertension management
"hypertension" AND "management" AND "guidelines"
hypertension management guidelines 2025 2026 ACC AHA ESC
https://journalfeed.org/article-a-day/2025/new-2025-aha-acc-…
| Category | Systolic (mmHg) | Diastolic (mmHg) | |
|---|---|---|---|
| Normal | <120 | AND | <80 |
| Elevated | 120-129 | AND | <80 |
| Stage 1 Hypertension | 130-139 | OR | 80-89 |
| Stage 2 Hypertension | ≥140 | OR | ≥90 |
| Hypertensive Crisis | >180 | AND/OR | >120 |
The 2025 AHA/ACC guidelines retain the 2017 staging system. The 2024 ESC guideline uses a slightly different schema (elevated BP: 120-139/80-89; Grade 1: 140-159/90-99; Grade 2: ≥160/≥100), but the treatment threshold of ≥140/90 mmHg is aligned across both.
| Cause | Clue | Test |
|---|---|---|
| Primary aldosteronism | Hypokalemia, resistant HTN | Aldosterone/renin ratio |
| Renal artery stenosis | Abdominal bruit, worsening on ACEi | Doppler ultrasound, CTA |
| CKD | Elevated creatinine, proteinuria | eGFR, urine ACR |
| Obstructive sleep apnea | Snoring, daytime sleepiness, obesity | Polysomnography |
| Pheochromocytoma | Paroxysmal HTN, headache, sweating, palpitations | 24h urinary metanephrines |
| Cushing's syndrome | Central obesity, striae, buffalo hump | 24h urinary cortisol |
| Hypothyroidism / Hyperthyroidism | Weight changes, fatigue, palpitations | TSH |
New in 2025: Primary aldosteronism screening is recommended for all patients with stage 2 hypertension and those with resistant hypertension, even without hypokalemia (Class 2b). Antihypertensives (except MRAs) should NOT be stopped before aldosterone/renin ratio testing.
| BP Stage | CV Risk | Recommendation |
|---|---|---|
| Elevated BP (120-129/< 80) | Any | Lifestyle modification only; no drug therapy |
| Stage 1 (130-139/80-89) | Low-to-moderate risk | Lifestyle modification; pharmacotherapy guided by PREVENT risk score |
| Stage 1 (130-139/80-89) | High risk (ASCVD, DM, CKD, ≥10% 10-yr ASCVD risk) | Lifestyle + pharmacotherapy |
| Stage 2 (≥140/≥90) | Any | Lifestyle + pharmacotherapy (initiate 2 drugs) |
Both 2025 AHA/ACC and 2024 ESC agree: pharmacotherapy is recommended when average SBP ≥140 mmHg or DBP ≥90 mmHg regardless of CV risk.
| Modification | Recommendation | Expected SBP Reduction |
|---|---|---|
| Weight reduction | Maintain BMI 18.5-24.9 | 5-20 mmHg per 10 kg lost |
| DASH diet | Rich in fruits, vegetables, low-fat dairy; low saturated fat | 8-14 mmHg |
| Sodium restriction | < 2,300 mg sodium/day (< 100 mmol/day) | 2-8 mmHg |
| Aerobic exercise | ≥ 30 min/day, most days of the week | 5-8 mmHg |
| Dynamic resistance exercise | 90-150 min/wk; 6 exercises, 3 sets × 10 reps | 4 mmHg |
| Isometric exercise (hand grip) | 4 × 2 min, 3 sessions/wk | 5 mmHg |
| Alcohol moderation | ≤ 2 drinks/day (men); ≤ 1 drink/day (women) | 2-4 mmHg |
| Situation | Strategy |
|---|---|
| Stage 1, low-moderate risk | 1 first-line agent; titrate before adding |
| Stage 1, high risk | 1-2 agents; combination if needed |
| Stage 2 | Start with 2 first-line agents of different classes, ideally as a single-pill combination (SPC) |
| High-risk Stage 1 with comorbidities | Consider SPC upfront |
| Class | Key Agents | Main Indication | Key Side Effects |
|---|---|---|---|
| Thiazide-type diuretics | Chlorthalidone, indapamide, HCTZ | First-line, systolic HTN, elderly | Hypokalemia, hyperuricemia, glucose intolerance |
| Dihydropyridine CCBs | Amlodipine, nifedipine LA | First-line, isolated systolic HTN, elderly, Black patients | Ankle edema, flushing, reflex tachycardia |
| ACE inhibitors | Lisinopril, enalapril, ramipril | First-line, HFrEF, CKD, diabetes | ACE cough (10-20%), hyperkalemia, angioedema, AKI |
| ARBs | Losartan, valsartan, olmesartan | As above; use when ACEi not tolerated | Hyperkalemia, AKI (no cough) |
| Non-dihydropyridine CCBs | Verapamil, diltiazem | HTN with AF, angina | Bradycardia, constipation (verapamil), AV block; avoid HFrEF |
| Beta-blockers | Metoprolol, carvedilol, bisoprolol | CAD, post-MI, HFrEF, AF | Bradycardia, bronchospasm, fatigue, erectile dysfunction |
| Aldosterone antagonists (MRAs) | Spironolactone, eplerenone | Resistant HTN, HFrEF, primary aldosteronism | Hyperkalemia, gynecomastia (spiro) |
| Loop diuretics | Furosemide, torsemide | CKD with eGFR < 25-30, volume overload | Electrolyte wasting, ototoxicity |
| Central sympatholytics | Clonidine, methyldopa | Resistant HTN (late add-on); methyldopa in pregnancy | Sedation, rebound HTN on abrupt stop |
| Direct vasodilators | Hydralazine, minoxidil | Resistant HTN, pregnancy (hydralazine) | Reflex tachycardia, fluid retention; lupus-like syndrome (hydralazine); hirsutism (minoxidil) |
| Alpha-blockers | Doxazosin, prazosin | BPH + HTN | Orthostatic hypotension |
Drug interactions to note (Goldman-Cecil Medicine): NSAIDs raise BP and impair renal function. Verapamil/diltiazem are potent CYP3A4 inhibitors - reduce statin doses when co-prescribing. Grapefruit significantly increases dihydropyridine CCB bioavailability (except amlodipine).
| Comorbidity | Preferred Drug(s) |
|---|---|
| HFrEF | ACEi/ARB + beta-blocker + MRA + ARNI (sacubitril/valsartan) |
| Post-MI / Stable CAD | Beta-blocker + ACEi or ARB; add dihydropyridine CCB for angina; add thiazide/MRA for resistant BP |
| LVH | ARB or ACEi (best LVH regression); avoid direct vasodilators |
| Diabetes, normal renal function | ACEi or ARB + CCB ± thiazide |
| CKD with albuminuria (DKD) | ACEi or ARB (slows progression); add CCB ± chlorthalidone; loop diuretic if eGFR < 25 |
| AF (rate control) | Beta-blocker or non-DHP CCB |
| Stroke/TIA (secondary prevention) | Any agent; restart a few days post-stroke |
| Elderly/ISH | Thiazide or long-acting DHP CCB |
| Black patients | Thiazide + DHP CCB (ACEi/ARBs less effective as monotherapy) |
| Pregnancy | Methyldopa, labetalol, nifedipine (avoid ACEi/ARBs - teratogenic) |
| Primary aldosteronism | MRA (spironolactone or eplerenone) |
| Resistant HTN | Add MRA; consider clonidine, minoxidil, or hydralazine as later add-ons |
| IV Agent | Use Case | Notes |
|---|---|---|
| Nicardipine | Most emergencies; acute stroke | Smooth, titratable CCB |
| Labetalol | Most emergencies; aortic dissection, pregnancy | Alpha + beta blockade |
| Clevidipine | Perioperative, most emergencies | Ultra-short-acting DHP CCB |
| Sodium nitroprusside | Refractory emergencies | Cyanide toxicity risk; avoid in renal failure |
| Hydralazine | Eclampsia/pre-eclampsia | Reflex tachycardia |
| Esmolol | Aortic dissection, perioperative | Ultra-short-acting beta-blocker |
| Phentolamine | Pheochromocytoma crisis | Alpha-blocker |
| Avoid nifedipine sublingual | Any | Unpredictable BP drop, stroke risk |
Type 2 Diabetes management
"type 2 diabetes" AND "management" AND "guidelines"
type 2 diabetes management guidelines 2025 2026 ADA EASD standards of care
https://reference.medscape.com/cc2/p10/standards-care-type-2…
"SGLT2 inhibitor" AND "GLP-1" AND "type 2 diabetes" AND "cardiovascular"
T2DM is a progressive disorder - most patients will eventually require multiple therapeutic agents and sometimes insulin.
| Test | Diagnostic Threshold |
|---|---|
| Fasting plasma glucose (FPG) | ≥ 126 mg/dL (7.0 mmol/L) |
| 2-hour plasma glucose (75g OGTT) | ≥ 200 mg/dL (11.1 mmol/L) |
| HbA1c | ≥ 6.5% (48 mmol/mol) |
| Random plasma glucose + symptoms | ≥ 200 mg/dL |
| Prediabetes (IFG) | FPG 100-125 mg/dL |
| Prediabetes (IGT) | 2h glucose 140-199 mg/dL |
| Prediabetes (HbA1c) | 5.7-6.4% |
| Target | Standard Goal | Individualized Notes |
|---|---|---|
| HbA1c | < 7.0% (< 53 mmol/mol) | < 6.5% if achievable without hypoglycemia (younger, newly diagnosed, no CVD); < 8.0% in elderly, frail, severe hypoglycemia risk, short life expectancy |
| Fasting/pre-meal glucose (CGM) | 80-130 mg/dL | |
| Peak post-meal glucose (1-2h) | < 180 mg/dL | |
| Time in range (CGM, 70-180 mg/dL) | ≥ 70% | |
| Time below range (< 70 mg/dL) | < 4% |
2026 ADA Update: CGM is now recommended soon after diagnosis for a broader population, including T2DM patients not on insulin, expanding beyond intensive insulin regimens. Automated insulin delivery (AID) systems are the preferred delivery method for T2DM patients who use insulin.
Paradigm shift (2025/2026): For patients with established ASCVD, HF, or CKD, SGLT2 inhibitors and GLP-1 RAs should be initiated independently of metformin, based on their proven organ-protective benefits.
| Aspect | Detail |
|---|---|
| Mechanism | Inhibits hepatic gluconeogenesis (via AMPK activation); improves insulin sensitivity |
| HbA1c reduction | 1.0-1.5% |
| Weight effect | Neutral/modest loss |
| Hypoglycemia risk | Low (monotherapy) |
| Key side effects | GI (diarrhea, nausea, metallic taste), B12 deficiency, lactic acidosis (rare) |
| Aspect | Detail |
|---|---|
| Mechanism | Block SGLT2 in proximal tubule → urinary glucose excretion; also reduce tubuloglomerular feedback, renal inflammation |
| HbA1c reduction | 0.5-1.0% |
| Weight effect | Loss (-2 to -4 kg) |
| Blood pressure | Reduces SBP ~4-5 mmHg |
| Hypoglycemia risk | Low (glucose-independent) |
| Proven benefits | Reduce MACE (EMPA-REG, CANVAS), hospitalization for HF (all patients, with/without T2DM), slow CKD progression (CREDENCE, DAPA-CKD) |
| Key side effects | Genital mycotic infections, UTI, DKA (rare, euglycemic), volume depletion, Fournier's gangrene (rare) |
| Contraindications | eGFR < 20-30 (kidney benefit extends to lower eGFR ranges for DAPA/EMPA) |
| Aspect | Detail |
|---|---|
| Mechanism | Glucose-dependent insulin secretion, glucagon suppression, slowed gastric emptying, central appetite suppression |
| HbA1c reduction | 1.0-2.0% (tirzepatide up to 2.4%) |
| Weight effect | Significant loss (-5 to -15 kg; tirzepatide up to -22%) |
| Hypoglycemia risk | Low (unless combined with SU/insulin) |
| Proven benefits | Reduce MACE in ASCVD (LEADER, SUSTAIN-6, REWIND); reduce kidney progression; reduce MASLD/steatohepatitis |
| Key side effects | Nausea, vomiting, diarrhea (usually transient), pancreatitis (rare), medullary thyroid carcinoma (rodent data - avoid in MEN2/familial MCT) |
| Delivery | Weekly SC (semaglutide, dulaglutide); daily SC (liraglutide); or oral daily (oral semaglutide) |
| New 2026 | GLP-1 RAs now approved for T1DM with obesity (BMI > 30; 27.5 in Asian Americans) |
| Aspect | Detail |
|---|---|
| Mechanism | Inhibit DPP-4 enzyme → increase endogenous GLP-1 and GIP levels |
| HbA1c reduction | 0.5-0.8% |
| Weight effect | Neutral |
| Hypoglycemia risk | Low |
| Key side effects | Nasopharyngitis, UTI; saxagliptin associated with ↑ HF hospitalization; rare: pancreatitis, joint pain |
| Advantage | Well-tolerated; can use in moderate CKD (dose-adjust); no injection |
| Disadvantage | Modest glycemic efficacy; no proven CV or renal benefit |
| Aspect | Detail |
|---|---|
| Mechanism | Stimulate insulin secretion via ATP-sensitive K+ channel on beta cells |
| HbA1c reduction | 1.0-1.5% |
| Weight effect | Gain (+2-3 kg) |
| Hypoglycemia risk | HIGH - most common cause of oral hypoglycemic-induced hypoglycemia |
| Key side effects | Hypoglycemia, weight gain |
| Notes | Most effective in T2DM < 5 years duration (residual beta-cell function); prefer glimepiride or glipizide over glyburide in elderly; metabolized in liver, cleared by kidney - avoid in significant hepatic/renal dysfunction; interact with many drugs (fluoroquinolones, warfarin, azoles) |
| Type | Examples | Onset | Duration | Use |
|---|---|---|---|---|
| Rapid-acting | Aspart, Lispro, Glulisine | 10-20 min | 3-5 h | Meal bolus |
| Short-acting | Regular | 30-60 min | 5-8 h | Meal bolus, IV drip |
| Intermediate | NPH | 2-4 h | 12-18 h | Twice-daily regimens |
| Long-acting | Glargine (U-100/U-300), Detemir | 1-2 h | 20-24 h | Once/twice daily basal |
| Ultra-long | Degludec | 30-90 min | > 42 h | Once daily basal |
| Pre-mixed | 70/30, 75/25 | Variable | - | Simplified regimens |
| Aspect | Detail |
|---|---|
| Mechanism | PPAR-γ agonist → reduce insulin resistance; redistribute fat from central to peripheral |
| HbA1c reduction | 0.5-1.4% |
| Weight effect | Gain (+2-3 kg) |
| Hypoglycemia risk | Low |
| Key side effects | Peripheral edema, CHF (contraindicated in class III/IV), fractures (postmenopausal women), macular edema, possible bladder cancer (pioglitazone) |
| CV benefit | Pioglitazone reduced recurrent stroke/MI in insulin-resistant patients (PROactive-like data) |
| Contraindications | CHF class III/IV, hepatic insufficiency |
T2DM Diagnosis
|
▼
Lifestyle + MNT (always foundational)
|
▼
Does patient have established ASCVD, HF, or CKD?
|
YES ──────────────────────────────────────────►
| Initiate SGLT2i and/or GLP-1 RA
| (regardless of metformin/HbA1c)
| for organ protection
▼
NO → Start Metformin ± SGLT2i or GLP-1 RA
|
▼
HbA1c not at goal after 3 months?
|
▼
Add 2nd agent based on patient profile:
- ASCVD → GLP-1 RA or SGLT2i (MACE reduction)
- HF → SGLT2i (preferred)
- CKD → SGLT2i (preferred) ± finerenone
- Obesity → GLP-1 RA or tirzepatide
- Hypoglycemia risk → DPP-4i, GLP-1 RA, or SGLT2i
- Cost concern → SU or TZD
|
▼
Still not at goal? → Add 3rd agent or insulin
| Comorbidity | Preferred Agents | Avoid |
|---|---|---|
| Established ASCVD | GLP-1 RA (semaglutide, liraglutide, dulaglutide) + SGLT2i | SUs (hypoglycemia risk), rosiglitazone |
| Heart failure (HFrEF or HFpEF) | SGLT2i (dapagliflozin, empagliflozin) | TZDs (fluid retention), saxagliptin |
| CKD (eGFR 20-60) | SGLT2i + finerenone (nsMRA) + ACEi/ARB; GLP-1 RA | Metformin if eGFR <30; SUs |
| Obesity | GLP-1 RA, tirzepatide (GIP/GLP-1), SGLT2i | SUs, TZDs, insulin (weight gain) |
| Hypoglycemia risk | DPP-4i, GLP-1 RA, SGLT2i | SUs, glinides, insulin (without careful titration) |
| Hypertension | SGLT2i (lowers BP ~4 mmHg), GLP-1 RA | - |
| MASLD/NASH | GLP-1 RA (semaglutide, tirzepatide), pioglitazone | - |
| Atrial fibrillation | No specific preference; avoid hypoglycemia | - |
| Elderly/frail | DPP-4i (safe, no hypoglycemia), GLP-1 RA (low dose), SGLT2i | SUs (hypoglycemia, falls), TZDs (fracture, edema), intensive insulin regimens |
| Pregnancy | Insulin (first-line); metformin (sometimes used for ovulation induction in PCOS) | GLP-1 RA, SGLT2i, TZDs, DPP-4i (all avoid in pregnancy) |
| Parameter | Frequency |
|---|---|
| HbA1c | Every 3 months until at goal; then every 6 months |
| Fasting glucose / CGM data | At every visit |
| Blood pressure | Every visit |
| Lipid panel | Annually (or more often if adjusting therapy) |
| Urine ACR (microalbuminuria) | Annually |
| eGFR / creatinine | Annually (more often on ACEi/ARB/SGLT2i) |
| Foot exam | Annually (every visit if high risk) |
| Dilated eye exam | At diagnosis, then annually (every 2 years if normal and low risk) |
| Dental exam | Twice yearly (gum disease worsens glycemia) |
| Depression/distress screening | Annually |
| Weight / BMI | Every visit |
| Thyroid function (TSH) | Periodically |
2026 ADA: Pre-surgical HbA1c target ≤ 8% and intraoperative glucose target 100-180 mg/dL are the new recommendations for hospitalized/surgical patients.
| Complication | Screening | Management |
|---|---|---|
| Nephropathy (DKD) | Annual UACR + eGFR | ACEi/ARB (reduce proteinuria); SGLT2i (slow progression); finerenone (nsMRA) in albuminuric CKD; target BP < 130/80 |
| Retinopathy | Dilated eye exam at diagnosis, then annually | Optimize glucose + BP; laser photocoagulation for proliferative retinopathy; anti-VEGF for diabetic macular edema |
| Neuropathy | Annual monofilament + vibration | Tight glycemic control; pregabalin, duloxetine, gabapentin for painful neuropathy; foot care |
Generate a quick reference PDF of T2DM medication side effects and monitoring requirements
ls /home/daytona/workspace/ 2>/dev/null && python3 -c "import reportlab; print('…
mkdir -p /home/daytona/workspace/t2dm-pdf
~/t2dm-pdf/generate_pdf.py
from reportlab.lib.pagesizes import A4
from reportlab.lib import colors
from reportlab.lib.units import mm, cm
from reportlab.lib.styles import getSampleStyleSheet, ParagraphStyle
from reportlab.platypus import (
SimpleDocTemplate, Paragraph, Spacer, Table, TableStyle,
HRFlowable, KeepTogether, PageBreak
)
from reportlab.lib.enums import TA_CENTER, TA_LEFT, TA_RIGHT
from reportlab.platypus import BaseDocTemplate, Frame, PageTemplate
from reportlab.lib.colors import HexColor
from datetime import date
# ── Colour palette ──────────────────────────────────────────────────────────
NAVY = HexColor("#1a3a5c")
TEAL = HexColor("#0d7377")
LIGHT_BG = HexColor("#eef4fb")
HEADER_BG = HexColor("#1a3a5c")
ROW_ALT = HexColor("#f2f7fc")
ROW_WHITE = colors.white
WARN_RED = HexColor("#c0392b")
WARN_YEL = HexColor("#f39c12")
GREEN = HexColor("#27ae60")
MID_GRAY = HexColor("#7f8c8d")
BORDER = HexColor("#b0c4de")
OUTPUT = "/home/daytona/workspace/t2dm-pdf/T2DM_Medication_Reference.pdf"
PAGE_W, PAGE_H = A4
MARGIN = 1.8 * cm
# ── Styles ───────────────────────────────────────────────────────────────────
styles = getSampleStyleSheet()
def make_style(name, parent="Normal", **kw):
return ParagraphStyle(name, parent=styles[parent], **kw)
TITLE = make_style("TITLE", fontSize=22, textColor=colors.white,
fontName="Helvetica-Bold", alignment=TA_CENTER, leading=28)
SUBT = make_style("SUBT", fontSize=10, textColor=HexColor("#aed6f1"),
fontName="Helvetica", alignment=TA_CENTER, leading=14)
DATE_S = make_style("DATE_S", fontSize=8, textColor=HexColor("#aed6f1"),
fontName="Helvetica", alignment=TA_CENTER)
SEC = make_style("SEC", fontSize=13, textColor=colors.white,
fontName="Helvetica-Bold", alignment=TA_LEFT, leading=18,
spaceBefore=8, spaceAfter=4)
BODY = make_style("BODY", fontSize=8.5, textColor=HexColor("#2c3e50"),
fontName="Helvetica", leading=12)
BOLD8 = make_style("BOLD8", fontSize=8.5, textColor=HexColor("#1a3a5c"),
fontName="Helvetica-Bold", leading=12)
SMALL = make_style("SMALL", fontSize=7.5, textColor=MID_GRAY,
fontName="Helvetica", leading=10)
WARN = make_style("WARN", fontSize=8, textColor=WARN_RED,
fontName="Helvetica-Bold", leading=11)
NOTE = make_style("NOTE", fontSize=8, textColor=HexColor("#34495e"),
fontName="Helvetica-Oblique", leading=11)
# cell paragraph styles
CH = make_style("CH", fontSize=8, textColor=colors.white,
fontName="Helvetica-Bold", alignment=TA_CENTER, leading=11)
CBL = make_style("CBL", fontSize=8, textColor=colors.white,
fontName="Helvetica-Bold", alignment=TA_LEFT, leading=11)
CL = make_style("CL", fontSize=8, textColor=HexColor("#2c3e50"),
fontName="Helvetica", leading=11)
CLB = make_style("CLB", fontSize=8, textColor=HexColor("#1a3a5c"),
fontName="Helvetica-Bold", leading=11)
CR = make_style("CR", fontSize=8, textColor=WARN_RED,
fontName="Helvetica-Bold", alignment=TA_CENTER, leading=11)
CG = make_style("CG", fontSize=8, textColor=GREEN,
fontName="Helvetica-Bold", alignment=TA_CENTER, leading=11)
CY = make_style("CY", fontSize=8, textColor=WARN_YEL,
fontName="Helvetica-Bold", alignment=TA_CENTER, leading=11)
# ── Header / footer callbacks ────────────────────────────────────────────────
def on_page(canvas, doc):
canvas.saveState()
# footer
canvas.setFillColor(NAVY)
canvas.rect(0, 0, PAGE_W, 1.2*cm, fill=1, stroke=0)
canvas.setFillColor(colors.white)
canvas.setFont("Helvetica", 7.5)
canvas.drawCentredString(PAGE_W/2, 0.45*cm,
f"T2DM Medication Quick Reference | Page {doc.page} | Based on 2026 ADA Standards of Care & Harrison's 22E")
# top stripe (pages > 1)
if doc.page > 1:
canvas.setFillColor(NAVY)
canvas.rect(0, PAGE_H - 1.0*cm, PAGE_W, 1.0*cm, fill=1, stroke=0)
canvas.setFillColor(colors.white)
canvas.setFont("Helvetica-Bold", 8)
canvas.drawString(MARGIN, PAGE_H - 0.65*cm,
"T2DM Medications: Side Effects & Monitoring")
canvas.setFont("Helvetica", 8)
canvas.drawRightString(PAGE_W - MARGIN, PAGE_H - 0.65*cm,
"Quick Reference Card 2026")
canvas.restoreState()
# ── Helper: coloured section header ──────────────────────────────────────────
def section_header(text, bg=TEAL):
data = [[Paragraph(text, SEC)]]
t = Table(data, colWidths=[PAGE_W - 2*MARGIN])
t.setStyle(TableStyle([
("BACKGROUND", (0,0), (-1,-1), bg),
("LEFTPADDING", (0,0), (-1,-1), 10),
("RIGHTPADDING", (0,0), (-1,-1), 10),
("TOPPADDING", (0,0), (-1,-1), 5),
("BOTTOMPADDING",(0,0), (-1,-1), 5),
("ROUNDEDCORNERS", [4,4,4,4]),
]))
return t
# ── Helper: legend chip ───────────────────────────────────────────────────────
def legend_table():
items = [
[Paragraph("● HIGH", CR), Paragraph("Hypoglycemia risk", CL)],
[Paragraph("● MOD", CY), Paragraph("Moderate risk / monitor closely", CL)],
[Paragraph("● LOW", CG), Paragraph("Low / minimal risk", CL)],
]
t = Table(items, colWidths=[2.2*cm, 6*cm], hAlign="LEFT")
t.setStyle(TableStyle([
("VALIGN", (0,0), (-1,-1), "MIDDLE"),
("LEFTPADDING", (0,0), (-1,-1), 2),
("TOPPADDING", (0,0), (-1,-1), 2),
("BOTTOMPADDING", (0,0), (-1,-1), 2),
]))
return t
# ────────────────────────────────────────────────────────────────────────────
# DATA
# ────────────────────────────────────────────────────────────────────────────
# Main drug table
# Cols: Drug Class | Key Agents | HbA1c ↓ | Hypoglycemia | Weight | Key Side Effects | Contraindications | Monitoring
DRUG_HEADER = [
Paragraph("Drug Class", CH),
Paragraph("Key Agents", CH),
Paragraph("HbA1c ↓", CH),
Paragraph("Hypo Risk", CH),
Paragraph("Weight", CH),
Paragraph("Key Side Effects", CH),
Paragraph("Contraindications", CH),
Paragraph("Monitoring", CH),
]
def row(cls, agents, hba1c, hypo, wt, se, ci, mon, alt=False):
bg = ROW_ALT if alt else ROW_WHITE
hypo_style = CR if "HIGH" in hypo else (CY if "MOD" in hypo else CG)
wt_style = CR if "+" in wt else (CG if "−" in wt else make_style(f"wtn{cls}", parent="CL",
fontSize=8, textColor=MID_GRAY, leading=11))
return [
Paragraph(cls, CLB),
Paragraph(agents, CL),
Paragraph(hba1c, CL),
Paragraph(hypo, hypo_style),
Paragraph(wt, wt_style if ("+" in wt or "−" in wt) else CL),
Paragraph(se, CL),
Paragraph(ci, CL),
Paragraph(mon, CL),
], bg
rows_data = [
row("Metformin\n(Biguanide)",
"Metformin\nMetformin XR",
"1.0–1.5%",
"LOW",
"Neutral/\nSlight −",
"GI upset, diarrhea, nausea,\nmetallic taste (less with XR);\nVit B12 deficiency; lactic\nacidosis (rare)",
"eGFR <30;\nMetabolic acidosis;\nUnstable CHF;\nHepatic disease;\nSevere hypoxia",
"eGFR & creatinine at baseline\nthen annually;\nVit B12 annually;\nHold before contrast/surgery"),
row("SGLT2\nInhibitors",
"Empagliflozin\nDapagliflozin\nCanagliflozin",
"0.5–1.0%",
"LOW",
"− (−2 to\n−4 kg)",
"Genital mycotic infections;\nUTI; volume depletion;\nEuglycemic DKA (rare);\nFournier's gangrene (rare);\nLower-limb amputation\n(canagliflozin)",
"eGFR <20 (glycemic use);\nType 1 DM (relative);\nRecurrent UTIs;\nFasting/surgery\n(hold 3–4 days pre-op)",
"eGFR & electrolytes before\nstart, then periodically;\nBP monitoring;\nSigns of DKA, UTI,\ngenital infection",
alt=True),
row("GLP-1 Receptor\nAgonists",
"Semaglutide (SC/oral)\nDulaglutide\nLiraglutide\nExenatide\nTirzepatide*",
"1.0–2.0%\n(*up to 2.4%)",
"LOW",
"− (−5 to\n−15 kg)",
"Nausea, vomiting, diarrhea\n(usually transient, dose-related);\nPancreatitis (rare);\nGallbladder disease;\nHR elevation",
"Personal/family hx of\nMedullary Thyroid Ca\nor MEN2;\nSevere GI disease\n(gastroparesis)",
"Renal function (if GI side\neffects cause dehydration);\nPancreatitis symptoms;\nHR;\nLipase if symptomatic"),
row("DPP-4\nInhibitors",
"Sitagliptin\nSaxagliptin\nLinagliptin\nAlogliptin",
"0.5–0.8%",
"LOW",
"Neutral",
"Nasopharyngitis; UTI;\nJoint pain (arthralgia);\nPancreatitis (rare);\nSaxagliptin: ↑ HF\nhospitalization risk",
"Avoid saxagliptin/\nalogliptin in HF;\nDose-adjust for\nrenal impairment\n(except linagliptin)",
"eGFR (dose adjustment);\nSigns of pancreatitis;\nHF symptoms (esp.\nsaxagliptin)",
alt=True),
row("Sulfonylureas",
"Glimepiride\nGlipizide\nGlyburide\n(prefer 1st two)",
"1.0–1.5%",
"HIGH",
"+ (+2–3 kg)",
"Hypoglycemia (most common\nclass effect);\nWeight gain;\nDrug interactions (warfarin,\nfluoroquinolones, azoles)",
"Significant hepatic or\nrenal impairment;\nAvoid glyburide in\nelderly & CKD",
"Blood glucose / CGM\nclosely at initiation;\nRenal function;\nWeight;\nSigns of hypoglycemia"),
row("Thiazolidinediones\n(TZDs)",
"Pioglitazone\nRosiglitazone",
"0.5–1.4%",
"LOW",
"+ (+2–3 kg)",
"Peripheral edema; CHF\nexacerbation; Fractures\n(postmenopausal women);\nMacular edema;\nPioglitazone: bladder\ncancer risk; Ovulation\ninduction in PCOS",
"CHF class III/IV;\nHepatic insufficiency;\nHistory of bladder\ncancer (pioglitazone)",
"LFTs at baseline;\nWeight & edema;\nBP (fluid retention);\nBone density;\nOphthalmologic exam\nif visual symptoms",
alt=True),
row("Insulin\n(all types)",
"Basal: Glargine,\nDetemir, Degludec\nRapid: Aspart,\nLispro, Glulisine\nPre-mixed: 70/30",
"1.5–3.5%\n(dose-dependent)",
"HIGH",
"+ (variable)",
"Hypoglycemia;\nWeight gain;\nInjection-site reactions\n(lipohypertrophy);\nHypokalemia (large doses)",
"Relative: severe\nhypoglycemia unawareness\n(use basal-only or\neducate on CGM/AID)",
"Blood glucose / CGM daily\nto multiple times/day;\nHbA1c every 3 months;\nWeight;\nInjection sites;\nElectrolytes (ICU/DKA)"),
row("Alpha-Glucosidase\nInhibitors",
"Acarbose\nMiglitol",
"0.5–0.8%",
"LOW\n(monotherapy)",
"Neutral",
"Flatulence; Diarrhea;\nAbdominal distension\n(often limits use);\nTransient LFT elevation\n(acarbose, high dose)",
"IBD / inflammatory\nbowel disease;\nGastroparesis;\nCreatinine >2 mg/dL;\nCirrhosis",
"LFTs at baseline and\nperiodically;\nPost-meal glucose;\nNote: treat hypoglycemia\nwith PURE glucose only",
alt=True),
row("Meglitinides\n(Glinides)",
"Repaglinide\nNateglinide",
"0.5–1.0%",
"MOD",
"+ (modest)",
"Hypoglycemia (shorter-\nacting than SUs);\nWeight gain;\nDrug interactions",
"Significant hepatic\nimpairment;\nCaution in CKD\n(repaglinide preferred)",
"Blood glucose before\neach meal;\nHepatic function;\nWeight"),
]
# Monitoring schedule table
MON_HEADER = [
Paragraph("Parameter", CH),
Paragraph("Frequency", CH),
Paragraph("Threshold / Action", CH),
Paragraph("Relevant Drug Classes", CH),
]
mon_rows = [
("HbA1c", "Every 3 months until at goal;\nthen every 6 months",
"Target <7.0% (standard);\n<6.5% if safe; <8.0% elderly/frail",
"All glucose-lowering agents"),
("eGFR & Serum Creatinine", "At baseline, then annually\n(more often if CKD or dose change)",
"Metformin: hold if eGFR <30;\nSGLT2i: review if eGFR <45;\nDose-adjust DPP-4i (except linagliptin)",
"Metformin, SGLT2i, SU, DPP-4i, Insulin"),
("Urine ACR (albumin/creatinine)", "Annually",
"≥30 mg/g = microalbuminuria;\n≥300 mg/g = macroalbuminuria\n→ Add/intensify ACEi/ARB + SGLT2i",
"All (screening for DKD progression)"),
("Blood pressure", "Every clinic visit",
"Target <130/80 mmHg;\nInitiate/adjust antihypertensives",
"SGLT2i (BP-lowering effect;\nmonitor for hypotension)"),
("Lipid panel (LDL, HDL, TG)", "At diagnosis; then annually\nor after therapy changes",
"LDL <70 mg/dL (high risk);\n<55 mg/dL (very high / ASCVD)\n→ Adjust statin ± ezetimibe",
"All (CV risk management)"),
("Weight / BMI", "Every clinic visit",
"≥5% loss: meaningful benefit\nWeight gain: reassess regimen",
"GLP-1 RA, SGLT2i (weight loss);\nSU, TZD, Insulin (weight gain)"),
("Liver function tests (ALT/AST)", "At baseline for TZDs;\nPeriodically during therapy",
"ALT >3× ULN: discontinue TZD;\nBaseline for acarbose (high dose)",
"TZDs, Acarbose (high dose)"),
("Vitamin B12", "At baseline; then annually",
"<300 pg/mL: supplement;\nMonitor if neuropathy symptoms",
"Metformin (reduces B12 absorption)"),
("Blood glucose / CGM", "Daily (or as prescribed);\nFasting + post-meal in insulin users",
"Fasting: 80–130 mg/dL;\nPost-meal peak: <180 mg/dL;\nTime-in-range ≥70%",
"Insulin, SU, Meglitinides (highest\nhypoglycemia risk)"),
("Dilated retinal exam", "At diagnosis;\nthen annually\n(every 2 years if normal/low risk)",
"Refer to ophthalmology if\nretinopathy detected;\nOptimise BP + glucose",
"All (screening for diabetic retinopathy)"),
("Foot examination", "Annually (every visit if\nhigh-risk neuropathy/PAD)",
"Loss of protective sensation:\nrefer to podiatry;\nActive ulcer: urgent referral",
"All (peripheral neuropathy\nand PAD screening)"),
("Pancreatitis symptoms", "Clinically (at every visit)",
"New-onset abdominal pain\n→ Check lipase; hold GLP-1 RA\nor DPP-4i; investigate",
"GLP-1 RA, DPP-4i"),
("Signs of DKA / ketones", "Clinically; urine/blood ketones\nif symptomatic",
"Euglycemic DKA risk with SGLT2i;\nhold SGLT2i ≥3–4 days pre-surgery\nor prolonged fasting",
"SGLT2i (euglycemic DKA)"),
("Genital / urinary infections", "At every visit (ask specifically)",
"Recurrent infections: consider\nswitching SGLT2i or treat and\noptimise genital hygiene",
"SGLT2i"),
]
# Special populations table
SPEC_HEADER = [
Paragraph("Population", CH),
Paragraph("Preferred Agents", CH),
Paragraph("Agents to Avoid / Use with Caution", CH),
Paragraph("Key Notes", CH),
]
spec_rows = [
("Elderly / Frail\n(≥65 years)",
"DPP-4i (safe, no hypoglycemia);\nGLP-1 RA (low dose);\nSGLT2i (if eGFR adequate)",
"Sulfonylureas (hypoglycemia, falls);\nTZDs (fracture, edema);\nComplex insulin regimens",
"Relax HbA1c target to <8.0%;\nMonitor for orthostatic hypotension;\nAvoid polypharmacy"),
("CKD (eGFR 20–59)",
"SGLT2i + ACEi/ARB;\nGLP-1 RA;\nLinagliptin (no renal dose adj);\nRepaglinide (glinide)",
"Metformin if eGFR <30;\nSU (accumulation, hypoglycemia);\nMost DPP-4i need dose adjustment",
"Finerenone (nsMRA) add-on if\nalbuminuria ≥300 mg/g;\nSwitch to loop diuretic if\neGFR <30"),
("Established ASCVD",
"GLP-1 RA (semaglutide, liraglutide,\ndulaglutide) + SGLT2i",
"SU (avoid if hypoglycemia risk);\nRosiglitazone",
"Initiate SGLT2i/GLP-1 RA\nindependently of metformin;\nHigh-intensity statin mandatory"),
("Heart Failure (HFrEF/HFpEF)",
"SGLT2i (dapagliflozin,\nempagliflozin) — Class I",
"TZDs (fluid retention, worsen HF);\nSaxagliptin, alogliptin\n(↑ HF hospitalisation)",
"SGLT2i reduce HF hospitalisation\nand CV death regardless of EF;\nMonitor for volume depletion"),
("Obesity (BMI ≥30)",
"GLP-1 RA or tirzepatide\n(GIP/GLP-1 dual agonist);\nSGLT2i",
"SU, TZDs, Insulin as initial\nagents (promote weight gain)",
"Tirzepatide: up to −22% body weight;\nBariatric surgery if BMI ≥40\nor ≥35 with comorbidities"),
("Pregnancy",
"Insulin (first-line for\nall glucose-lowering);\nMetformin (selected cases\n+ PCOS ovulation induction)",
"GLP-1 RA, SGLT2i, TZDs,\nDPP-4i — ALL contraindicated\nACEi/ARB — contraindicated",
"Switch to insulin pre-conception\nor as soon as pregnancy confirmed;\nFrequent glucose monitoring essential"),
("MASLD / NASH",
"GLP-1 RA (semaglutide, tirzepatide)\nmost evidence for fibrosis;\nPioglitazone",
"Avoid excessive alcohol;\nCaution with TZDs in\nadvanced cirrhosis",
"Semaglutide phase 3 trial (NASH):\ndemonstrated fibrosis regression;\nTirzepatide: significant weight\nloss + liver fat reduction"),
]
# ── Drug interaction box ─────────────────────────────────────────────────────
interactions = [
("Sulfonylureas + Fluoroquinolones / Azoles / Clarithromycin / SMX-TMP",
"↑ SU levels → hypoglycemia. Temporarily discontinue SU when these antibiotics are prescribed."),
("Sulfonylureas + Warfarin / Aspirin / NSAIDs",
"Enhanced hypoglycemic effect or displacement from protein binding. Monitor glucose closely."),
("Metformin + Iodinated contrast media",
"Hold metformin ≥48h before/after contrast (eGFR <60 or large contrast load). Restart after renal function confirmed stable."),
("SGLT2i + Loop diuretics / ACEi/ARB",
"Additive volume depletion and hypotension. Reduce diuretic dose; monitor BP and renal function."),
("GLP-1 RA + Oral medications",
"Delayed gastric emptying slows absorption of oral drugs (e.g., oral contraceptives, levothyroxine). Take OCP ≥1h before or 4h after injection."),
("TZDs + Insulin",
"↑ risk of fluid retention and HF. Avoid combination in CHF. Monitor for oedema."),
("Alpha-glucosidase inhibitors + Any glucose-lowering agent causing hypoglycemia",
"Must treat hypoglycemia with PURE glucose (dextrose tablets). Complex carbohydrates ineffective while on AGIs."),
("Insulin + Beta-blockers",
"Mask tachycardia symptoms of hypoglycemia; may prolong hypoglycemia. Educate patients; sweating still present."),
]
# ── Build the document ────────────────────────────────────────────────────────
doc = SimpleDocTemplate(
OUTPUT,
pagesize=A4,
leftMargin=MARGIN, rightMargin=MARGIN,
topMargin=2.0*cm, bottomMargin=1.8*cm,
title="T2DM Medication Quick Reference",
author="Orris Clinical Reference",
subject="Type 2 Diabetes Medications: Side Effects & Monitoring",
)
story = []
# ── COVER BLOCK ───────────────────────────────────────────────────────────────
cover_data = [[
Paragraph("Type 2 Diabetes Mellitus", TITLE),
Paragraph("Medication Side Effects & Monitoring Requirements", SUBT),
Paragraph(f"Quick Reference Card · Based on 2026 ADA Standards of Care & Harrison's Principles 22E · {date.today().strftime('%B %Y')}", DATE_S),
]]
cover = Table(cover_data, colWidths=[PAGE_W - 2*MARGIN])
cover.setStyle(TableStyle([
("BACKGROUND", (0,0), (-1,-1), NAVY),
("TOPPADDING", (0,0), (-1,-1), 18),
("BOTTOMPADDING", (0,0), (-1,-1), 18),
("LEFTPADDING", (0,0), (-1,-1), 12),
("RIGHTPADDING", (0,0), (-1,-1), 12),
("ROUNDEDCORNERS", [6,6,6,6]),
]))
story.append(cover)
story.append(Spacer(1, 0.4*cm))
# Legend
story.append(Paragraph("Hypoglycemia Risk Legend:", BOLD8))
story.append(legend_table())
story.append(Spacer(1, 0.3*cm))
# ── SECTION 1: Main Drug Table ────────────────────────────────────────────────
story.append(section_header("1 Drug Classes — Side Effects, Contraindications & Monitoring"))
story.append(Spacer(1, 0.25*cm))
col_w = [2.4*cm, 2.4*cm, 1.4*cm, 1.5*cm, 1.4*cm, 3.8*cm, 3.0*cm, 3.2*cm]
main_table_data = [DRUG_HEADER]
row_bgs = [HEADER_BG]
for r, bg in rows_data:
main_table_data.append(r)
row_bgs.append(bg)
main_ts = TableStyle([
("BACKGROUND", (0, 0), (-1, 0), HEADER_BG),
("VALIGN", (0, 0), (-1,-1), "TOP"),
("TOPPADDING", (0, 0), (-1,-1), 4),
("BOTTOMPADDING", (0, 0), (-1,-1), 4),
("LEFTPADDING", (0, 0), (-1,-1), 4),
("RIGHTPADDING", (0, 0), (-1,-1), 4),
("GRID", (0, 0), (-1,-1), 0.35, BORDER),
("ROWBACKGROUNDS",(0, 1), (-1,-1), [ROW_WHITE, ROW_ALT]),
("LINEBELOW", (0, 0), (-1, 0), 1.5, TEAL),
])
main_table = Table(main_table_data, colWidths=col_w, repeatRows=1)
main_table.setStyle(main_ts)
story.append(main_table)
story.append(Spacer(1, 0.3*cm))
story.append(Paragraph(
"* Tirzepatide = GIP/GLP-1 dual agonist. GLP-1 RA benefits for ASCVD/CKD are class-specific and vary by agent — see outcome trial data. "
"SGLT2i: empagliflozin and dapagliflozin have the most robust HF + CKD outcome data.",
SMALL))
story.append(PageBreak())
# ── SECTION 2: Monitoring Schedule ───────────────────────────────────────────
story.append(section_header("2 Routine Monitoring Schedule"))
story.append(Spacer(1, 0.25*cm))
mon_col_w = [3.5*cm, 3.5*cm, 5.5*cm, 6.6*cm]
mon_data = [MON_HEADER]
for i, (param, freq, threshold, drugs) in enumerate(mon_rows):
bg = ROW_ALT if i % 2 else ROW_WHITE
mon_data.append([
Paragraph(param, CLB),
Paragraph(freq, CL),
Paragraph(threshold,CL),
Paragraph(drugs, CL),
])
mon_table = Table(mon_data, colWidths=mon_col_w, repeatRows=1)
mon_table.setStyle(TableStyle([
("BACKGROUND", (0, 0), (-1, 0), HEADER_BG),
("VALIGN", (0, 0), (-1,-1), "TOP"),
("TOPPADDING", (0, 0), (-1,-1), 4),
("BOTTOMPADDING", (0, 0), (-1,-1), 4),
("LEFTPADDING", (0, 0), (-1,-1), 4),
("RIGHTPADDING", (0, 0), (-1,-1), 4),
("GRID", (0, 0), (-1,-1), 0.35, BORDER),
("ROWBACKGROUNDS",(0, 1), (-1,-1), [ROW_WHITE, ROW_ALT]),
("LINEBELOW", (0, 0), (-1, 0), 1.5, TEAL),
]))
story.append(mon_table)
story.append(PageBreak())
# ── SECTION 3: Special Populations ───────────────────────────────────────────
story.append(section_header("3 Special Populations — Agent Selection"))
story.append(Spacer(1, 0.25*cm))
spec_col_w = [3.0*cm, 5.0*cm, 5.3*cm, 5.8*cm]
spec_data = [SPEC_HEADER]
for i, (pop, pref, avoid, notes) in enumerate(spec_rows):
spec_data.append([
Paragraph(pop, CLB),
Paragraph(pref, CL),
Paragraph(avoid, CL),
Paragraph(notes, CL),
])
spec_table = Table(spec_data, colWidths=spec_col_w, repeatRows=1)
spec_table.setStyle(TableStyle([
("BACKGROUND", (0, 0), (-1, 0), HEADER_BG),
("VALIGN", (0, 0), (-1,-1), "TOP"),
("TOPPADDING", (0, 0), (-1,-1), 4),
("BOTTOMPADDING", (0, 0), (-1,-1), 4),
("LEFTPADDING", (0, 0), (-1,-1), 4),
("RIGHTPADDING", (0, 0), (-1,-1), 4),
("GRID", (0, 0), (-1,-1), 0.35, BORDER),
("ROWBACKGROUNDS",(0, 1), (-1,-1), [ROW_WHITE, ROW_ALT]),
("LINEBELOW", (0, 0), (-1, 0), 1.5, TEAL),
]))
story.append(spec_table)
story.append(Spacer(1, 0.3*cm))
# ── SECTION 4: Drug Interactions ─────────────────────────────────────────────
story.append(section_header("4 Key Drug Interactions", bg=NAVY))
story.append(Spacer(1, 0.25*cm))
int_col_w = [6.5*cm, 12.6*cm]
int_data = [
[Paragraph("Interaction", CH), Paragraph("Clinical Significance & Management", CH)]
]
for i, (combo, effect) in enumerate(interactions):
bg = ROW_ALT if i % 2 else ROW_WHITE
int_data.append([
Paragraph(combo, CLB),
Paragraph(effect, CL),
])
int_table = Table(int_data, colWidths=int_col_w, repeatRows=1)
int_table.setStyle(TableStyle([
("BACKGROUND", (0, 0), (-1, 0), HEADER_BG),
("VALIGN", (0, 0), (-1,-1), "TOP"),
("TOPPADDING", (0, 0), (-1,-1), 4),
("BOTTOMPADDING", (0, 0), (-1,-1), 4),
("LEFTPADDING", (0, 0), (-1,-1), 4),
("RIGHTPADDING", (0, 0), (-1,-1), 4),
("GRID", (0, 0), (-1,-1), 0.35, BORDER),
("ROWBACKGROUNDS",(0, 1), (-1,-1), [ROW_WHITE, ROW_ALT]),
("LINEBELOW", (0, 0), (-1, 0), 1.5, TEAL),
]))
story.append(int_table)
story.append(Spacer(1, 0.4*cm))
# ── SECTION 5: Hypoglycemia Quick-Action Box ──────────────────────────────────
story.append(section_header("5 Hypoglycemia — Recognition & Management", bg=HexColor("#922b21")))
story.append(Spacer(1, 0.25*cm))
hypo_data = [
[Paragraph("Severity", CH), Paragraph("Definition", CH),
Paragraph("Immediate Treatment", CH), Paragraph("Next Step", CH)],
[Paragraph("Level 1\n(Alert)", CLB),
Paragraph("Glucose 54–69 mg/dL\n(3.0–3.8 mmol/L)", CL),
Paragraph("15 g fast-acting carbs:\n4–6 glucose tablets, 4 oz juice\nor regular soda (not diet)", CL),
Paragraph("Recheck in 15 min.\nIf still <70 mg/dL, repeat.\nEat meal/snack once normalised.", CL)],
[Paragraph("Level 2\n(Clinically\nSignificant)", CLB),
Paragraph("Glucose <54 mg/dL\n(<3.0 mmol/L)", CL),
Paragraph("15–30 g fast-acting carbs;\nIf on AGIs: PURE glucose only\n(dextrose tabs)", CL),
Paragraph("Recheck q15 min until >70;\nNotify clinician;\nReview causative medication.", CL)],
[Paragraph("Level 3\n(Severe)", CLB),
Paragraph("Requires assistance;\nAltered consciousness\nor seizure", CL),
Paragraph("IV: 25 mL of 50% dextrose\n(D50W) OR\nGlucagon 1 mg SC/IM OR\nIntranasal glucagon (Baqsimi)", CL),
Paragraph("Hospital observation;\nReduce/discontinue\noffending agent;\nAddress precipitating cause.", CL)],
]
hypo_col_w = [2.2*cm, 3.5*cm, 6.5*cm, 7.0*cm]
hypo_table = Table(hypo_data, colWidths=hypo_col_w)
hypo_table.setStyle(TableStyle([
("BACKGROUND", (0, 0), (-1, 0), HEADER_BG),
("BACKGROUND", (0, 1), (-1, 1), HexColor("#fdfefe")),
("BACKGROUND", (0, 2), (-1, 2), HexColor("#fef9e7")),
("BACKGROUND", (0, 3), (-1, 3), HexColor("#fdedec")),
("VALIGN", (0, 0), (-1,-1), "TOP"),
("TOPPADDING", (0, 0), (-1,-1), 5),
("BOTTOMPADDING", (0, 0), (-1,-1), 5),
("LEFTPADDING", (0, 0), (-1,-1), 5),
("RIGHTPADDING", (0, 0), (-1,-1), 5),
("GRID", (0, 0), (-1,-1), 0.5, BORDER),
("LINEBELOW", (0, 0), (-1, 0), 1.5, TEAL),
]))
story.append(hypo_table)
story.append(Spacer(1, 0.3*cm))
story.append(Paragraph(
"⚠ High-risk agents for hypoglycemia: Sulfonylureas, Meglitinides, Insulin. "
"Low risk: Metformin, SGLT2i, GLP-1 RA, DPP-4i, TZDs, AGIs (as monotherapy). "
"Risk increases significantly when any glucose-lowering agent is combined with insulin or sulfonylureas.",
NOTE))
# ── DISCLAIMER ────────────────────────────────────────────────────────────────
story.append(Spacer(1, 0.35*cm))
story.append(HRFlowable(width="100%", thickness=0.5, color=BORDER))
story.append(Spacer(1, 0.15*cm))
story.append(Paragraph(
"DISCLAIMER: This reference card is intended for educational and clinical support purposes only. "
"Always consult current prescribing information and apply clinical judgement to individual patient circumstances. "
"Sources: 2026 ADA Standards of Care in Diabetes (Diabetes Care, Jan 2026 Supplement); "
"Harrison's Principles of Internal Medicine 22E (2025, McGraw-Hill); "
"Goodman & Gilman's Pharmacological Basis of Therapeutics 14E.",
SMALL))
# ── Build ──────────────────────────────────────────────────────────────────────
doc.build(story, onFirstPage=on_page, onLaterPages=on_page)
print("PDF generated successfully:", OUTPUT)
cd /home/daytona/workspace/t2dm-pdf && python3 generate_pdf.py
~/t2dm-pdf/generate_pdf.py
Successfully replaced 1 instance(s) of the string in '/home/daytona/workspace/t2dm-pdf/generate_pdf.py'
cd /home/daytona/workspace/t2dm-pdf && python3 generate_pdf.py
python3 -c " from pypdf import PdfReader r = PdfReader('/home/daytona/workspace/…
T2DM Medication Reference
PDF Document · PDF
Create same pdf for hypertension
mkdir -p /home/daytona/workspace/htn-pdf
~/htn-pdf/generate_htn_pdf.py
from reportlab.lib.pagesizes import A4
from reportlab.lib import colors
from reportlab.lib.units import mm, cm
from reportlab.lib.styles import getSampleStyleSheet, ParagraphStyle
from reportlab.platypus import (
SimpleDocTemplate, Paragraph, Spacer, Table, TableStyle,
HRFlowable, KeepTogether, PageBreak
)
from reportlab.lib.enums import TA_CENTER, TA_LEFT, TA_RIGHT
from reportlab.lib.colors import HexColor
from datetime import date
# ── Colour palette ────────────────────────────────────────────────────────────
NAVY = HexColor("#1a3a5c")
TEAL = HexColor("#0d7377")
CRIMSON = HexColor("#922b21")
HEADER_BG = HexColor("#1a3a5c")
ROW_ALT = HexColor("#f2f7fc")
ROW_WHITE = colors.white
WARN_RED = HexColor("#c0392b")
WARN_YEL = HexColor("#f39c12")
GREEN = HexColor("#27ae60")
MID_GRAY = HexColor("#7f8c8d")
BORDER = HexColor("#b0c4de")
LIGHT_BG = HexColor("#eef4fb")
OUTPUT = "/home/daytona/workspace/htn-pdf/Hypertension_Medication_Reference.pdf"
PAGE_W, PAGE_H = A4
MARGIN = 1.8 * cm
# ── Styles ────────────────────────────────────────────────────────────────────
styles = getSampleStyleSheet()
def make_style(name, parent_obj=None, **kw):
parent = parent_obj if parent_obj else styles["Normal"]
return ParagraphStyle(name, parent=parent, **kw)
TITLE = make_style("HTN_TITLE", fontSize=22, textColor=colors.white,
fontName="Helvetica-Bold", alignment=TA_CENTER, leading=28)
SUBT = make_style("HTN_SUBT", fontSize=10, textColor=HexColor("#aed6f1"),
fontName="Helvetica", alignment=TA_CENTER, leading=14)
DATE_S = make_style("HTN_DATE", fontSize=8, textColor=HexColor("#aed6f1"),
fontName="Helvetica", alignment=TA_CENTER)
SEC = make_style("HTN_SEC", fontSize=13, textColor=colors.white,
fontName="Helvetica-Bold", alignment=TA_LEFT, leading=18,
spaceBefore=8, spaceAfter=4)
BODY = make_style("HTN_BODY", fontSize=8.5, textColor=HexColor("#2c3e50"),
fontName="Helvetica", leading=12)
BOLD8 = make_style("HTN_BOLD8", fontSize=8.5, textColor=HexColor("#1a3a5c"),
fontName="Helvetica-Bold", leading=12)
SMALL = make_style("HTN_SMALL", fontSize=7.5, textColor=MID_GRAY,
fontName="Helvetica", leading=10)
NOTE = make_style("HTN_NOTE", fontSize=8, textColor=HexColor("#34495e"),
fontName="Helvetica-Oblique", leading=11)
# Table cell styles
CH = make_style("HTN_CH", fontSize=8, textColor=colors.white,
fontName="Helvetica-Bold", alignment=TA_CENTER, leading=11)
CBL = make_style("HTN_CBL", fontSize=8, textColor=colors.white,
fontName="Helvetica-Bold", alignment=TA_LEFT, leading=11)
CL = make_style("HTN_CL", fontSize=8, textColor=HexColor("#2c3e50"),
fontName="Helvetica", leading=11)
CLB = make_style("HTN_CLB", fontSize=8, textColor=HexColor("#1a3a5c"),
fontName="Helvetica-Bold", leading=11)
CR = make_style("HTN_CR", fontSize=8, textColor=WARN_RED,
fontName="Helvetica-Bold", alignment=TA_CENTER, leading=11)
CG = make_style("HTN_CG", fontSize=8, textColor=GREEN,
fontName="Helvetica-Bold", alignment=TA_CENTER, leading=11)
CY = make_style("HTN_CY", fontSize=8, textColor=WARN_YEL,
fontName="Helvetica-Bold", alignment=TA_CENTER, leading=11)
CRC = make_style("HTN_CRC", fontSize=8, textColor=WARN_RED,
fontName="Helvetica-Bold", alignment=TA_LEFT, leading=11)
# ── Header/footer ─────────────────────────────────────────────────────────────
def on_page(canvas, doc):
canvas.saveState()
# footer bar
canvas.setFillColor(NAVY)
canvas.rect(0, 0, PAGE_W, 1.2*cm, fill=1, stroke=0)
canvas.setFillColor(colors.white)
canvas.setFont("Helvetica", 7.5)
canvas.drawCentredString(
PAGE_W/2, 0.45*cm,
f"Hypertension Medication Quick Reference | Page {doc.page} | "
f"Based on 2025 AHA/ACC Guideline & 2024 ESC Guidelines")
if doc.page > 1:
canvas.setFillColor(NAVY)
canvas.rect(0, PAGE_H - 1.0*cm, PAGE_W, 1.0*cm, fill=1, stroke=0)
canvas.setFillColor(colors.white)
canvas.setFont("Helvetica-Bold", 8)
canvas.drawString(MARGIN, PAGE_H - 0.65*cm,
"Hypertension Medications: Side Effects & Monitoring")
canvas.setFont("Helvetica", 8)
canvas.drawRightString(PAGE_W - MARGIN, PAGE_H - 0.65*cm,
"Quick Reference Card 2025/2026")
canvas.restoreState()
# ── Helpers ───────────────────────────────────────────────────────────────────
def section_header(text, bg=TEAL):
data = [[Paragraph(text, SEC)]]
t = Table(data, colWidths=[PAGE_W - 2*MARGIN])
t.setStyle(TableStyle([
("BACKGROUND", (0,0), (-1,-1), bg),
("LEFTPADDING", (0,0), (-1,-1), 10),
("RIGHTPADDING", (0,0), (-1,-1), 10),
("TOPPADDING", (0,0), (-1,-1), 5),
("BOTTOMPADDING", (0,0), (-1,-1), 5),
]))
return t
def std_table_style():
return TableStyle([
("BACKGROUND", (0, 0), (-1, 0), HEADER_BG),
("VALIGN", (0, 0), (-1,-1), "TOP"),
("TOPPADDING", (0, 0), (-1,-1), 4),
("BOTTOMPADDING", (0, 0), (-1,-1), 4),
("LEFTPADDING", (0, 0), (-1,-1), 4),
("RIGHTPADDING", (0, 0), (-1,-1), 4),
("GRID", (0, 0), (-1,-1), 0.35, BORDER),
("ROWBACKGROUNDS",(0, 1), (-1,-1), [ROW_WHITE, ROW_ALT]),
("LINEBELOW", (0, 0), (-1, 0), 1.5, TEAL),
])
# ══════════════════════════════════════════════════════════════════════════════
# DATA
# ══════════════════════════════════════════════════════════════════════════════
# ── BP Classification ─────────────────────────────────────────────────────────
BP_CLASSES = [
[Paragraph("BP Category", CH),
Paragraph("Systolic (mmHg)", CH),
Paragraph("", CH),
Paragraph("Diastolic (mmHg)", CH),
Paragraph("Intervention", CH)],
[Paragraph("Normal", CG),
Paragraph("<120", CL), Paragraph("AND", CL), Paragraph("<80", CL),
Paragraph("Encourage healthy lifestyle", CL)],
[Paragraph("Elevated", CY),
Paragraph("120–129", CL), Paragraph("AND", CL), Paragraph("<80", CL),
Paragraph("Lifestyle modification; no drug therapy", CL)],
[Paragraph("Stage 1\nHypertension", CY),
Paragraph("130–139", CL), Paragraph("OR", CL), Paragraph("80–89", CL),
Paragraph("Lifestyle ± pharmacotherapy guided by CV risk\n(PREVENT score)", CL)],
[Paragraph("Stage 2\nHypertension", CR),
Paragraph("≥140", CL), Paragraph("OR", CL), Paragraph("≥90", CL),
Paragraph("Lifestyle + 2 first-line agents (ideally SPC)", CL)],
[Paragraph("Hypertensive\nCrisis", make_style("HTN_CRCB", parent_obj=CR,
alignment=TA_LEFT)),
Paragraph(">180", CL), Paragraph("AND/OR", CL), Paragraph(">120", CL),
Paragraph("Hypertensive emergency (with TOD) → IV therapy ICU\nSevere HTN without TOD → Oral agents, gradual ↓", CL)],
]
# ── Main Drug Table ───────────────────────────────────────────────────────────
# Cols: Class | Key Agents | BP ↓ SBP | Mechanism | Key Side Effects | Contraindications | Compelling Indications | Monitoring
DRUG_HEADER = [
Paragraph("Drug Class", CH),
Paragraph("Key Agents", CH),
Paragraph("Mechanism", CH),
Paragraph("Key Side Effects", CH),
Paragraph("Contraindications /\nCautions", CH),
Paragraph("Compelling\nIndications", CH),
Paragraph("Monitoring", CH),
]
drug_rows = [
# (class, agents, mechanism, side_effects, contraindications, indications, monitoring)
("Thiazide-type\nDiuretics",
"Chlorthalidone (preferred)\nIndapamide\nHCTZ",
"Inhibit Na-Cl cotransporter\nin distal tubule → ↓ plasma\nvolume → ↓ CO & SVR",
"Hypokalemia; Hyponatremia;\nHyperuricemia (gout flare);\nGlucose intolerance;\nHypercalcemia;\nDyslipidaemia (HCTZ>\nchlorothalidone)",
"Gout (relative);\nHypercalcemia;\nAvoid HCTZ in CKD\neGFR <30; switch to\nloop diuretic",
"ISH in elderly;\nHeart failure;\nBlack patients\n(monotherapy);\nOsteoporosis\n(hypocalciuria)",
"Serum K+, Na+, creatinine,\nuric acid, glucose, lipids\nat baseline then 2–4 wk\nafter start/dose change;\nannually once stable"),
("Dihydropyridine\nCCBs",
"Amlodipine (preferred)\nNifedipine LA\nFelodipine\nLercanidipine",
"Block L-type voltage-gated\nCa²⁺ channels in vascular\nsmooth muscle → arterial\nvasodilation",
"Peripheral ankle oedema\n(most common);\nFlushing; Headache;\nReflex tachycardia;\nGingival hyperplasia;\nGrapefruit interaction\n(not amlodipine)",
"Amlodipine safest in HF;\nAvoid non-DHP CCBs in\nHFrEF; Avoid nifedipine\nshort-acting (stroke risk)",
"ISH; Elderly; Black\npatients; Angina;\nRaynaud's;\nCKD (additive with\nACEi/ARB)",
"BP at each visit;\nHR; Signs of ankle\noedema; LFTs if\nhepatic disease"),
("Non-Dihydropyridine\nCCBs",
"Verapamil\nDiltiazem",
"Block cardiac + vascular\nCa²⁺ channels → ↓ HR,\n↓ AV conduction,\nvasodilation",
"Bradycardia; AV block;\nConstipation (verapamil);\nNegative inotropy;\nPeripheral oedema;\nCYP3A4 inhibition\n(↑ statin levels)",
"HFrEF (contraindicated);\nAV block ≥2nd degree;\nSick sinus syndrome;\nCombination with\nbeta-blocker (bradycardia)",
"HTN + AF (rate control);\nAngina;\nHTN + SVT",
"HR, ECG (PR interval);\nBP; Signs of HF;\nDrug interactions\n(statins: reduce dose)"),
("ACE Inhibitors\n(ACEi)",
"Lisinopril\nRamipril\nEnalapril\nPerindopril\nFosinopril",
"Inhibit ACE → ↓ angiotensin\nII + ↑ bradykinin →\nvasodilation + ↓ aldosterone\n→ efferent arteriolar dilation\n(renoprotective)",
"Dry persistent cough\n(10–20%; bradykinin);\nAngioedema (rare, 0.1–0.7%);\nHyperkalemia;\nFirst-dose hypotension;\nAKI (renal artery stenosis)",
"Bilateral renal artery\nstenosis; Pregnancy\n(all trimesters, Category D);\nHistory of angioedema;\nDo NOT combine\nwith ARB",
"CKD + proteinuria;\nDiabetic nephropathy;\nHFrEF; Post-MI;\nLVH regression;\nSecondary stroke\nprevention",
"Serum K+ and creatinine\nwithin 1–2 wk of start\nor dose ↑; then every\n3–6 months; BP;\nUACR if CKD"),
("Angiotensin\nReceptor Blockers\n(ARBs)",
"Losartan\nValsartan\nIrbesartan\nOlmesartan\nCandesartan\nTelmisartan",
"Block AT₁ receptor →\nvasodilation + ↓ aldosterone;\nNo bradykinin effect\n(no cough)",
"Hyperkalemia;\nFirst-dose hypotension;\nAKI (bilateral RAS);\nNo cough (vs. ACEi)",
"Bilateral renal artery\nstenosis; Pregnancy\n(Category D);\nDo NOT combine\nwith ACEi;\nCaution: dual RAAS\nblockade",
"Same as ACEi;\nPreferred when\nACEi not tolerated\n(cough/angioedema);\nHFrEF (valsartan,\ncandesartan)",
"As ACEi: K+, creatinine,\nBP; UACR;\nMonitor for\nhypotension at\ninitiation"),
("Beta-Blockers",
"Metoprolol succinate\nBisoprolol\nCarvedilol\nAtenolol\nLabetalol\nNebivolol",
"Block β₁ (cardiac) and/or\nβ₂ adrenoreceptors → ↓ HR,\n↓ CO, ↓ renin secretion;\nCarvedilol/labetalol:\nalpha + beta blockade",
"Bradycardia; Fatigue;\nBronchospasm (non-selective);\nCold extremities;\nMask hypoglycemia\nsymptoms (tachycardia);\nSexual dysfunction;\nWeight gain;\nRebound HTN if\nabruptly stopped",
"Asthma / severe COPD\n(cardioselective safer\nbut caution);\nAV block ≥2nd degree;\nDecompensated HF\n(use cautiously,\ntitrate slowly);\nNOT first-line for\nuncomplicated HTN",
"HFrEF (metoprolol,\nbisoprolol, carvedilol);\nPost-MI; Angina;\nAF rate control;\nHyperkinetic HTN\n(anxiety, palpitations);\nAortic dissection;\nPregnancy (labetalol)",
"HR (avoid <50 bpm);\nBP; Signs of HF;\nBlood glucose in\ndiabetics;\nTaper slowly\non discontinuation"),
("Loop Diuretics",
"Furosemide\nTorsemide\nBumetanide",
"Inhibit Na-K-2Cl\ncotransporter in thick\nascending loop of Henle\n→ powerful natriuresis",
"Hypokalemia;\nHyponatremia;\nHypomagnesemia;\nOtotoxicity (high IV doses);\nHyperuricemia;\nVolume depletion;\nDehydration",
"Not first-line for HTN;\nUse when eGFR <25–30\nor volume overload;\nCaution in hypovolemia",
"CKD eGFR <25–30\n(replace thiazide);\nHTN + HF;\nHTN + volume\noverload",
"Serum K+, Na+,\ncreatinine at baseline\nthen 1–2 wk after\nstart/change;\nBP; Weight;\nSigns of dehydration"),
("MRAs\n(Aldosterone\nAntagonists)",
"Spironolactone\nEplerenone\nFinerenone\n(CKD/DKD)",
"Block mineralocorticoid\nreceptor → ↓ Na+ reabsorption\n→ ↓ BP + anti-fibrotic;\nFinerenone: non-steroidal,\nbetter renal/cardiac profile",
"Hyperkalemia (most\nimportant);\nGynecomastia / mastalgia\n(spironolactone, not\neplerenone/finerenone);\nMenstrual irregularity;\nRenal impairment",
"eGFR <30 or K+ >5.0\n(use with extreme caution);\nCombination with\nACEi + ARB (triple\nRAAS blockade;\ncaution with any 2\nRAAS agents)",
"Resistant HTN\n(most effective 4th\nagent ~8–12 mmHg ↓);\nHFrEF; Primary\naldosteronism;\nCKD with DKD\n(finerenone)",
"Serum K+ at 1 week,\n4 weeks, then every\n3 months;\nCreatinine + eGFR;\nGynaecomastia\nsymptoms (spiro)"),
("Alpha-1 Blockers",
"Doxazosin\nPrazosin\nTerazosin",
"Block postsynaptic α₁\nadrenoreceptors → arterial\nand venous vasodilation",
"First-dose orthostatic\nhypotension (significant);\nDizziness; Reflex\ntachycardia;\nFluid retention;\nNasal congestion",
"Not first-line;\nCaution in elderly\n(fall risk);\nCaution in HF\n(increase mortality\nin ALLHAT)",
"HTN + BPH;\nHTN +\npheochromocytoma\n(phenoxybenzamine);\nResistant HTN\n(late add-on)",
"BP sitting AND standing\n(orthostatic hypotension);\nFall risk assessment;\nSigns of fluid retention"),
("Central\nSympatholy\u00adtics",
"Clonidine\nMethyldopa\nMoxonidine",
"Stimulate α₂ (clonidine) or\nimidazoline receptors in CNS\n→ ↓ sympathetic outflow\n→ ↓ HR + BP",
"Sedation; Dry mouth;\nOrtho\u00adstatic hypo\u00adtension;\nBradycardia;\nRebound HTN on\nabrupt withdrawal;\nDepression (methyldopa);\nHaemolytic anaemia\n(methyldopa)",
"Avoid in non-adherent\npatients (rebound HTN);\nTaper slowly over\nweeks to discontinue;\nMethyldopa:\navoid in hepatic disease\nand depression",
"Resistant HTN\n(late add-on);\nPregnancy\n(methyldopa: safest\nin pregnancy);\nHTN emergency\n(IV labetalol/clonidine)",
"BP sitting + standing;\nHR; Liver function\n(methyldopa);\nDirect Coombs test\n(methyldopa long-term);\nMood/depression"),
("Direct\nVasodilators",
"Hydralazine\nMinoxidil",
"Open ATP-sensitive K+\nchannels in arteriolar\nsmooth muscle → direct\narterial vasodilation",
"Reflex tachycardia;\nFluid retention\n(require concurrent\ndiuretic + β-blocker);\nHydralazine: lupus-like\nsyndrome, DILE;\nMinoxidil: hirsutism,\npericardial effusion",
"Require concurrent\nβ-blocker + diuretic;\nHydralazine:\navoid in aortic\ndissection;\nMinoxidil: caution\nin CAD + recent MI",
"Resistant HTN\n(very late add-on);\nPregnancy\n(hydralazine IV:\nacute severe HTN);\nHFrEF (hydralazine\n+ nitrate in ACEi/\nARB-intolerant)",
"BP; HR; Signs of\nfluid retention + weight;\nANA + anti-dsDNA\nif lupus symptoms\n(hydralazine);\nEcho if pericardial\neffusion suspected"),
]
# ── Monitoring Table ──────────────────────────────────────────────────────────
MON_ROWS = [
("BP Measurement",
"Every clinic visit;\nHome BP monitoring\n(2 readings twice daily\n5–7 days before\nappointments)",
"Target <130/80 mmHg\n(most patients, 2025 AHA/ACC);\n<140/90 mmHg (2024 ESC\ninitiation threshold);\nElderly >80 yrs: ~150 mmHg SBP",
"All antihypertensive agents"),
("Serum Potassium (K+)",
"Baseline; 1–2 weeks after\nstart/dose change;\nThen every 3–6 months",
"K+ <3.5: supplement or\nswitch diuretic;\nK+ >5.5: reduce/hold\nACEi/ARB/MRA;\nK+ >6.0: hold immediately",
"Thiazides (↓ K+);\nLoop diuretics (↓ K+);\nACEi, ARBs, MRAs (↑ K+)"),
("Serum Creatinine / eGFR",
"Baseline; 1–2 weeks after\nstart or dose change;\nAnnually when stable",
"Rise in creatinine ≤30%\nafter starting ACEi/ARB:\nacceptable (expected);\n>30% rise: investigate\nrenovascular disease;\nHold if AKI develops",
"ACEi, ARBs (closely);\nMRAs; Thiazides;\nLoop diuretics"),
("Serum Sodium (Na+)",
"Baseline; 2–4 weeks after\nstart; then annually",
"Na+ <130: severe\nhyponatraemia — reduce\nor hold diuretic;\nElderly at highest risk",
"Thiazides (↓ Na+);\nLoop diuretics"),
("Uric Acid",
"Baseline; periodically\nif symptomatic",
"Elevated uric acid:\nconsider switching\nfrom thiazide to\nother agent if gout flares",
"Thiazide diuretics\n(hyperuricaemia)"),
("Blood Glucose / HbA1c",
"Baseline; annually\n(or more often if\npre-diabetic)",
"Thiazides may worsen\nglucose tolerance;\nBeta-blockers mask\nhypo symptoms in\ndiabetics",
"Thiazide diuretics;\nBeta-blockers\n(in diabetic patients)"),
("Lipid Panel",
"Baseline; annually",
"HCTZ may raise LDL/TG\n(less so chlorthalidone);\nAdjust lipid therapy if\ncardiovascular risk elevated",
"Thiazide diuretics\n(especially HCTZ)"),
("Heart Rate (HR)",
"Every clinic visit",
"Resting HR <50 bpm:\nreduce beta-blocker\nor non-DHP CCB dose;\nHR >100: investigate\nsecondary cause",
"Beta-blockers;\nNon-DHP CCBs\n(verapamil, diltiazem)"),
("Orthostatic BP\n(sitting & standing)",
"At each visit in elderly;\nAfter dose changes;\nIf symptomatic dizziness",
"Drop >20 mmHg SBP or\n>10 mmHg DBP on standing:\northostatic hypotension —\nreduce dose or change agent",
"Alpha-blockers;\nCentral sympatholytics;\nHigh-dose diuretics;\nElderly on multiple agents"),
("Serum Magnesium",
"If symptomatic or high\ndiuretic doses",
"Hypomagnesaemia →\nmuscle cramps, arrhythmia;\nSupplement or reduce\ndiuretic dose",
"Loop diuretics;\nThiazides (less common)"),
("ANA / Anti-dsDNA",
"If hydralazine > 200 mg/day\nor lupus symptoms develop",
"Drug-induced lupus (DILE):\ndiscontinue hydralazine;\ntypically anti-histone\nANA positive",
"Hydralazine"),
("ECG / PR Interval",
"Baseline; if symptomatic\nbradycardia or palpitations",
"PR prolongation / AV block:\nhold verapamil or diltiazem;\ncheck for drug interactions",
"Non-DHP CCBs;\nBeta-blockers"),
("Urine ACR\n(Albumin/Creatinine\nRatio)",
"Annually in all\nhypertensive patients\n(screen for DKD)",
"ACR ≥30 mg/g:\nstart/intensify\nACEi or ARB;\nAim BP <130/80 mmHg",
"ACEi/ARBs (monitor\nproteinuria reduction);\nSGLT2i if diabetic"),
("Rebound / Withdrawal",
"Monitor BP closely\nif patient misses doses\nor discontinues therapy",
"Clonidine: rebound\nhypertensive crisis if\nstopped abruptly;\nTaper over weeks;\nBeta-blockers: taper to\navoid angina/MI rebound",
"Clonidine;\nBeta-blockers\n(always taper)"),
]
# ── Compelling Indications Table ──────────────────────────────────────────────
CI_HEADER = [
Paragraph("Comorbidity / Indication", CH),
Paragraph("First-Line Preferred Agents", CH),
Paragraph("Agents to Prefer as Add-On", CH),
Paragraph("Agents to Avoid", CH),
]
CI_ROWS = [
("Heart Failure with\nReduced EF (HFrEF)",
"ACEi or ARB (or ARNI:\nsacubitril/valsartan)\n+ Beta-blocker\n(metoprolol, bisoprolol,\ncarvedilol)\n+ MRA (spironolactone)",
"Loop diuretic\n(volume control);\nSGLT2i (dapa- or\nempagliflozin)",
"Non-DHP CCBs\n(verapamil, diltiazem);\nDirect vasodilators\nwithout β-blocker;\nTZDs (if diabetic)"),
("Stable CAD /\nPost-MI",
"Beta-blocker + ACEi\nor ARB (first-line)",
"Dihydropyridine CCB\nfor angina;\nMRA post-MI with\nLVSD;\nThiazide for resistant BP",
"Excessive DBP lowering\n(<60 mmHg, ↓ coronary\nperfusion)"),
("CKD + Proteinuria\n(DKD)",
"ACEi or ARB\n(reduce intraglomerular\nhypertension + proteinuria)",
"SGLT2i (slow CKD\nprogression; even at\nlower eGFR);\nFinerenone (if\nalbuminuria ≥300 mg/g);\nLoop diuretic if\neGFR <25–30",
"Do NOT combine\nACEi + ARB;\nThiazide if eGFR <30"),
("Type 2 Diabetes",
"ACEi or ARB + CCB\n± thiazide-type diuretic",
"SGLT2i (added CV\n+ renal benefit);\nLoop diuretic if CKD",
"Beta-blockers (mask\nhypo symptoms);\nHigh-dose thiazide\n(worsen glucose)"),
("Atrial Fibrillation\n(rate control)",
"Beta-blocker OR\nnon-DHP CCB\n(verapamil, diltiazem)",
"ACEi/ARB for\nnew-onset AF with HTN\n(structural remodelling)",
"Combining beta-blocker\n+ non-DHP CCB\n(severe bradycardia/\nAV block)"),
("Stroke /\nSecondary TIA\nPrevention",
"Any antihypertensive\n(restart a few days\npost-stroke);\nACEi + thiazide\n(PROGRESS trial)",
"ARB (telmisartan\nONTARGET data);\nStatin mandatory",
"Excessive acute lowering\nwithin 24h of ischaemic\nstroke (unless\nthrombolysis planned)"),
("LVH",
"ARB or ACEi\n(best LVH regression);\nCCB",
"Thiazide diuretic",
"Hydralazine;\nMinoxidil\n(direct vasodilators:\nno LVH regression)"),
("Elderly /\nIsolated Systolic HTN\n(ISH)",
"Long-acting DHP CCB\n(amlodipine) OR\nThiazide-type diuretic\n(chlorthalidone)",
"ACEi or ARB if\nalso CKD/HF/DM",
"Short-acting agents;\nExcessive BP lowering\n(DBP <60 mmHg)"),
("Black / African\nAmerican patients",
"DHP CCB + Thiazide\n(more effective as\nmonotherapy in this\npopulation)",
"ACEi/ARB less\neffective as monotherapy\nbut add for CKD/HF",
"ACEi/ARB monotherapy\n(inadequate response\nwithout diuretic/CCB)"),
("Pregnancy",
"Methyldopa;\nLabetalol;\nNifedipine (extended\nrelease)",
"Hydralazine IV for\nacute severe HTN",
"ACEi and ARBs\n(teratogenic, Category D);\nMRAs (anti-androgenic);\nDirect renin inhibitors"),
("Primary\nAldosteronism",
"MRA: Spironolactone\nor Eplerenone\n(adrenal hyperplasia);\nAdrenalectomy\n(unilateral adenoma)",
"Any antihypertensive\nfor residual BP control",
"Thiazide monotherapy\n(inadequate without\nRAAS blockade)"),
("Resistant\nHypertension\n(≥3 agents, failing)",
"Confirm adherence +\ncorrect technique;\nOptimise diuretic\n(switch to chlorthalidone)\nThen ADD:\nSpironolactone (1st choice\n4th agent)",
"Beta-blocker, doxazosin,\nclonidine (taper on DC);\nMinoxidil (+ diuretic\n+ β-blocker);\nRenal denervation\n(select centres)",
"Screen for primary\naldosteronism\nbefore adding agents"),
]
# ── IV Agents for Hypertensive Emergency ─────────────────────────────────────
IV_HEADER = [
Paragraph("IV Agent", CH),
Paragraph("Class", CH),
Paragraph("Onset / Duration", CH),
Paragraph("Preferred Use", CH),
Paragraph("Key Cautions", CH),
]
IV_ROWS = [
("Nicardipine\n0.5–15 mcg/kg/min",
"DHP CCB", "Minutes / 15–30 min",
"Most hypertensive emergencies;\nAcute ischaemic stroke;\nPost-op HTN",
"Reflex tachycardia;\nAvoid in severe aortic\nstenosis"),
("Labetalol\n0.5–2 mg/min or\n20–80 mg IV bolus q10 min",
"α + β Blocker", "5 min / 3–6 h",
"Most emergencies;\nAortic dissection;\nPregnancy (eclampsia);\nHypertensive\nencephalopathy",
"Avoid in asthma;\nAvoid in HFrEF;\nAV block"),
("Clevidipine\n1–32 mg/h",
"Ultra-short\nDHP CCB", "2–4 min / 5–15 min",
"Perioperative HTN;\nMost emergencies;\nCardiac surgery",
"Soybean/egg allergy\n(lipid emulsion);\nReflex tachycardia"),
("Esmolol\n50–200 mcg/kg/min",
"Ultra-short\nβ₁ Blocker", "1–2 min / 10–30 min",
"Aortic dissection\n(combine with\nnicardipine);\nPerioperative;\nHTN + tachyarrhythmia",
"Avoid asthma;\nAV block;\nMonitor HR closely"),
("Sodium\nNitroprusside\n0.25–10 mcg/kg/min",
"NO donor /\nVasodilator", "Seconds / 1–3 min",
"Refractory emergencies\n(last resort);\nHTN + acute HF\n(with nitrate)",
"Cyanide toxicity\n(>48h or renal failure);\nAvoid in raised ICP;\nRequires arterial line"),
("Hydralazine\n5–20 mg IV bolus\nq20 min (max 40 mg)",
"Direct\nVasodilator", "10–20 min / 2–4 h",
"Eclampsia /\nPre-eclampsia;\nHTN in pregnancy",
"Unpredictable BP\ndrop; Reflex\ntachycardia;\nNot preferred in\nother emergencies"),
("Phentolamine\n5–15 mg IV bolus",
"α Blocker", "1–2 min / 15–30 min",
"Phaeochromocytoma\ncrisis;\nCocaine-induced HTN;\nClonidine withdrawal",
"Avoid beta-blocker\nbefore α-block\n(↑ BP surge);\nReflex tachycardia"),
("Glyceryl trinitrate\n(Nitroglycerin)\n5–100 mcg/min",
"Nitrate /\nNO donor", "2–5 min / 5–10 min",
"HTN + ACS;\nHTN + acute\npulmonary oedema;\nPost-CABG",
"Tolerance (>24h);\nAvoid with\nphosphodiesterase-5\ninhibitors;\nHeadache"),
("Fenoldopam\n0.1–1.6 mcg/kg/min",
"DA₁ Agonist", "5 min / 30 min",
"HTN emergency\n+ AKI risk\n(↑ renal perfusion);\nPost-op",
"Glaucoma\n(↑ IOP);\nReflex tachycardia;\nHypokalaemia"),
]
# ── Drug Interactions ──────────────────────────────────────────────────────────
INT_ROWS = [
("ACEi / ARB + NSAIDs (ibuprofen, naproxen, indomethacin)",
"NSAIDs blunt antihypertensive effect + impair renal function. Avoid if possible; use paracetamol preferentially. Celecoxib and sulindac have the least effect."),
("ACEi / ARB + Potassium supplements or MRA",
"Additive hyperkalaemia risk. Monitor K+ closely; check within 1 week of adding any new RAAS agent."),
("ACEi / ARB + ACEi (dual RAAS blockade)",
"Do NOT combine ACEi + ARB. No added BP benefit; significantly ↑ AKI, hyperkalaemia, hypotension. ONTARGET trial confirmed harm."),
("Beta-blocker + Non-DHP CCB (verapamil/diltiazem)",
"Additive bradycardia + AV block risk. Avoid combination unless under specialist monitoring."),
("Thiazide + Loop diuretic",
"Sequential nephron blockade → profound volume depletion, electrolyte disturbances. Use only under close supervision in refractory oedema."),
("DHP CCBs (non-amlodipine) + Grapefruit juice",
"Grapefruit inhibits CYP3A4 in intestine → ↑ CCB bioavailability → excessive vasodilation for up to 24h. Advise patients to avoid grapefruit juice."),
("Verapamil / Diltiazem + Statins (simvastatin, atorvastatin)",
"Non-DHP CCBs are potent CYP3A4 inhibitors → ↑ statin levels → myopathy/rhabdomyolysis risk. Reduce simvastatin dose; max simvastatin 20 mg with amlodipine. Use rosuvastatin (no CYP3A4) safely."),
("Clonidine + Beta-blocker (on withdrawal)",
"If both stopped, clonidine rebound HTN is worsened by loss of β-blockade. Always taper clonidine slowly; do not stop abruptly."),
("Alpha-blocker + PDE-5 inhibitor (sildenafil, tadalafil)",
"Profound hypotension, especially with doxazosin. Advise patients; separate doses; use lowest PDE-5 inhibitor dose."),
("Loop diuretics + Aminoglycosides",
"Additive ototoxicity risk. Avoid combination where possible; if necessary, monitor renal function and audiometry."),
("Metoprolol / Beta-blockers + Insulin / Sulfonylureas",
"Beta-blockers mask tachycardia (key warning sign of hypoglycaemia); sweating still present. Inform diabetic patients. Cardioselective β-blockers preferred."),
("ACEi + Contrast media",
"Increased risk of contrast nephropathy, especially with pre-existing CKD. Hold ACEi/ARB 24–48h before high-risk contrast procedures; restart after renal function confirmed stable."),
]
# ══════════════════════════════════════════════════════════════════════════════
# BUILD PDF
# ══════════════════════════════════════════════════════════════════════════════
doc = SimpleDocTemplate(
OUTPUT, pagesize=A4,
leftMargin=MARGIN, rightMargin=MARGIN,
topMargin=2.0*cm, bottomMargin=1.8*cm,
title="Hypertension Medication Quick Reference",
author="Orris Clinical Reference",
subject="Hypertension Medications: Side Effects & Monitoring",
)
story = []
# ── Cover block ───────────────────────────────────────────────────────────────
cover_data = [[
Paragraph("Hypertension Management", TITLE),
Paragraph("Antihypertensive Medications: Side Effects, Indications & Monitoring Requirements", SUBT),
Paragraph(
f"Quick Reference Card · 2025 AHA/ACC Multisociety Guideline & 2024 ESC Guidelines · {date.today().strftime('%B %Y')}",
DATE_S),
]]
cover = Table(cover_data, colWidths=[PAGE_W - 2*MARGIN])
cover.setStyle(TableStyle([
("BACKGROUND", (0,0), (-1,-1), NAVY),
("TOPPADDING", (0,0), (-1,-1), 18),
("BOTTOMPADDING", (0,0), (-1,-1), 18),
("LEFTPADDING", (0,0), (-1,-1), 14),
("RIGHTPADDING", (0,0), (-1,-1), 14),
]))
story.append(cover)
story.append(Spacer(1, 0.35*cm))
# ── Section 0: BP Classification ─────────────────────────────────────────────
story.append(section_header("0 Blood Pressure Classification & Treatment Thresholds", bg=HexColor("#145a32")))
story.append(Spacer(1, 0.2*cm))
bp_col_w = [3.4*cm, 2.4*cm, 1.1*cm, 2.4*cm, 9.8*cm]
bp_table = Table(BP_CLASSES, colWidths=bp_col_w)
bp_table.setStyle(std_table_style())
story.append(bp_table)
story.append(Spacer(1, 0.2*cm))
story.append(Paragraph(
"TOD = Target Organ Damage. SPC = Single-Pill Combination. "
"2025 AHA/ACC universal BP goal: <130/80 mmHg for most adults on treatment. "
"2024 ESC: initiate pharmacotherapy at confirmed BP ≥140/90 mmHg. "
"Elderly ≥80 years: target ~150 mmHg SBP (HYVET); avoid DBP <60 mmHg in CAD.",
SMALL))
story.append(PageBreak())
# ── Section 1: Main Drug Table ────────────────────────────────────────────────
story.append(section_header("1 Antihypertensive Drug Classes — Side Effects, Indications & Monitoring"))
story.append(Spacer(1, 0.2*cm))
drug_col_w = [2.5*cm, 2.5*cm, 3.0*cm, 3.5*cm, 3.0*cm, 2.7*cm, 2.9*cm]
drug_data = [DRUG_HEADER]
for i, r in enumerate(drug_rows):
cls, agents, mech, se, ci, ind, mon = r
drug_data.append([
Paragraph(cls, CLB),
Paragraph(agents, CL),
Paragraph(mech, CL),
Paragraph(se, CL),
Paragraph(ci, CL),
Paragraph(ind, CL),
Paragraph(mon, CL),
])
drug_table = Table(drug_data, colWidths=drug_col_w, repeatRows=1)
drug_table.setStyle(std_table_style())
story.append(drug_table)
story.append(Spacer(1, 0.2*cm))
story.append(Paragraph(
"* Chlorthalidone preferred over HCTZ (longer half-life, more CV outcome data). "
"ARB preferred over ACEi when cough/angioedema present. "
"ARNI (sacubitril/valsartan) replaces ACEi/ARB in HFrEF. "
"Non-DHP CCBs (verapamil, diltiazem) are potent CYP3A4 inhibitors — check statin doses.",
SMALL))
story.append(PageBreak())
# ── Section 2: Monitoring Schedule ───────────────────────────────────────────
story.append(section_header("2 Routine Monitoring Schedule"))
story.append(Spacer(1, 0.2*cm))
mon_col_w = [3.4*cm, 3.4*cm, 5.4*cm, 7.0*cm]
MON_HEADER_ROW = [
Paragraph("Parameter", CH),
Paragraph("Frequency", CH),
Paragraph("Target / Action", CH),
Paragraph("Relevant Drug Classes", CH),
]
mon_data = [MON_HEADER_ROW]
for i, (param, freq, action, drugs) in enumerate(MON_ROWS):
mon_data.append([
Paragraph(param, CLB),
Paragraph(freq, CL),
Paragraph(action, CL),
Paragraph(drugs, CL),
])
mon_table = Table(mon_data, colWidths=mon_col_w, repeatRows=1)
mon_table.setStyle(std_table_style())
story.append(mon_table)
story.append(Spacer(1, 0.2*cm))
story.append(Paragraph(
"Home BP monitoring: 2 readings in the morning and evening for 5–7 days before clinic visits. "
"Ambulatory BP monitoring (ABPM) is preferred to confirm diagnosis and detect white-coat or masked hypertension. "
"Always measure BP both sitting and standing in elderly patients and those on multiple agents.",
NOTE))
story.append(PageBreak())
# ── Section 3: Compelling Indications ────────────────────────────────────────
story.append(section_header("3 Drug Selection by Comorbidity (Compelling Indications)"))
story.append(Spacer(1, 0.2*cm))
ci_col_w = [3.3*cm, 4.6*cm, 4.3*cm, 7.0*cm]
ci_data = [CI_HEADER]
for i, (pop, pref, addon, avoid) in enumerate(CI_ROWS):
ci_data.append([
Paragraph(pop, CLB),
Paragraph(pref, CL),
Paragraph(addon, CL),
Paragraph(avoid, CL),
])
ci_table = Table(ci_data, colWidths=ci_col_w, repeatRows=1)
ci_table.setStyle(std_table_style())
story.append(ci_table)
story.append(Spacer(1, 0.2*cm))
story.append(Paragraph(
"Black patients: initiate with thiazide + DHP CCB; ACEi/ARB less effective as monotherapy due to lower renin levels. "
"Stage 2 HTN: initiate 2 agents in a single-pill combination (SPC) where available. "
"Resistant HTN: exclude non-adherence, white-coat effect, secondary causes, and BP-raising drugs (NSAIDs, OCP, decongestants, licorice) before adding a 4th agent.",
NOTE))
story.append(PageBreak())
# ── Section 4: IV Agents ──────────────────────────────────────────────────────
story.append(section_header("4 Hypertensive Emergency — IV Treatment Options", bg=CRIMSON))
story.append(Spacer(1, 0.2*cm))
story.append(Paragraph(
"Goal: Reduce MAP by no more than 20–25% in first hour, then to ~160/100 mmHg over 2–6 hours. "
"AVOID sublingual nifedipine (unpredictable BP drop, stroke risk). "
"Treat in ICU/HDU with continuous arterial BP monitoring. Identify and treat underlying cause.",
NOTE))
story.append(Spacer(1, 0.2*cm))
iv_col_w = [3.2*cm, 2.4*cm, 2.8*cm, 5.0*cm, 5.8*cm]
iv_data = [IV_HEADER]
for i, (agent, cls, onset, use, caution) in enumerate(IV_ROWS):
iv_data.append([
Paragraph(agent, CLB),
Paragraph(cls, CL),
Paragraph(onset, CL),
Paragraph(use, CL),
Paragraph(caution, CL),
])
iv_table = Table(iv_data, colWidths=iv_col_w, repeatRows=1)
iv_table.setStyle(std_table_style())
story.append(iv_table)
story.append(Spacer(1, 0.25*cm))
# Hypertensive Emergency vs non-emergency box
box_data = [
[Paragraph("Hypertensive EMERGENCY", make_style("HTN_BE", parent_obj=CLB,
fontSize=8.5, textColor=WARN_RED)),
Paragraph("Severe HTN WITHOUT Target-Organ Damage\n(formerly 'hypertensive urgency')", make_style(
"HTN_BU", parent_obj=CLB, fontSize=8.5, textColor=HexColor("#117a65")))],
[Paragraph(
"• BP >180/120 mmHg WITH acute target-organ damage\n"
"• TOD: encephalopathy, ACS, acute HF, aortic dissection,\n"
" eclampsia, haemorrhagic/ischaemic stroke, retinal haemorrhage\n"
"• Require IV therapy in ICU\n"
"• Reduce MAP ≤25% in 1h; then target 160/100 over 2–6h\n"
"• Do NOT normalise BP too rapidly (ischaemia risk)", CL),
Paragraph(
"• BP >180/120 mmHg WITHOUT signs of TOD\n"
"• Term 'hypertensive urgency' RETIRED (2025 AHA/ACC)\n"
"• Oral antihypertensives appropriate\n"
"• Gradual reduction over 24–48 hours\n"
"• Avoid aggressive IV therapy and ED admission\n"
"• Reassess in outpatient setting within 24–72h", CL)],
]
box_table = Table(box_data, colWidths=[9.2*cm, 10.0*cm])
box_table.setStyle(TableStyle([
("BACKGROUND", (0, 0), (0, 0), HexColor("#fdedec")),
("BACKGROUND", (1, 0), (1, 0), HexColor("#eafaf1")),
("BACKGROUND", (0, 1), (0, 1), HexColor("#fff9f9")),
("BACKGROUND", (1, 1), (1, 1), HexColor("#f0fdf4")),
("VALIGN", (0, 0), (-1,-1), "TOP"),
("TOPPADDING", (0, 0), (-1,-1), 5),
("BOTTOMPADDING", (0, 0), (-1,-1), 5),
("LEFTPADDING", (0, 0), (-1,-1), 6),
("RIGHTPADDING", (0, 0), (-1,-1), 6),
("GRID", (0, 0), (-1,-1), 0.5, BORDER),
]))
story.append(box_table)
story.append(PageBreak())
# ── Section 5: Drug Interactions ─────────────────────────────────────────────
story.append(section_header("5 Key Drug Interactions", bg=NAVY))
story.append(Spacer(1, 0.2*cm))
int_col_w = [6.5*cm, 12.7*cm]
int_data = [
[Paragraph("Interaction", CH), Paragraph("Clinical Significance & Management", CH)]
]
for i, (combo, effect) in enumerate(INT_ROWS):
int_data.append([
Paragraph(combo, CLB),
Paragraph(effect, CL),
])
int_table = Table(int_data, colWidths=int_col_w, repeatRows=1)
int_table.setStyle(std_table_style())
story.append(int_table)
story.append(Spacer(1, 0.3*cm))
# ── Section 6: Lifestyle BP reduction quick table ─────────────────────────────
story.append(section_header("6 Lifestyle Interventions — Expected SBP Reduction", bg=HexColor("#145a32")))
story.append(Spacer(1, 0.2*cm))
ls_col_w = [4.0*cm, 6.5*cm, 3.0*cm, 5.7*cm]
ls_data = [
[Paragraph("Intervention", CH), Paragraph("Recommendation", CH),
Paragraph("Expected SBP ↓", CH), Paragraph("Notes", CH)],
[Paragraph("Weight reduction", CLB),
Paragraph("Maintain BMI 18.5–24.9 kg/m²", CL),
Paragraph("5–20 mmHg per 10 kg lost", CG),
Paragraph("Most effective single lifestyle measure in obese patients", CL)],
[Paragraph("DASH diet", CLB),
Paragraph("High fruits, vegetables, low-fat dairy; low saturated fat", CL),
Paragraph("8–14 mmHg", CG),
Paragraph("Greatest dietary effect; also lowers LDL", CL)],
[Paragraph("Sodium restriction", CLB),
Paragraph("<2,300 mg/day sodium (<100 mmol/day)", CL),
Paragraph("2–8 mmHg", CG),
Paragraph("More effective in salt-sensitive patients (elderly, Black, CKD)", CL)],
[Paragraph("Aerobic exercise", CLB),
Paragraph("≥30 min/day, most days of the week (brisk walking)", CL),
Paragraph("5–8 mmHg", CG),
Paragraph("150 min/week moderate intensity; swimming, cycling also effective", CL)],
[Paragraph("Dynamic resistance\nexercise", CLB),
Paragraph("90–150 min/week; 6 exercises, 3 sets × 10 reps", CL),
Paragraph("~4 mmHg", CG),
Paragraph("Complements aerobic exercise; improves insulin sensitivity", CL)],
[Paragraph("Isometric exercise\n(hand-grip)", CLB),
Paragraph("4 × 2 min, 1 min rest, 3 sessions/week for 8–10 weeks", CL),
Paragraph("~5 mmHg", CG),
Paragraph("Underused; good evidence in hypertension guidelines", CL)],
[Paragraph("Alcohol moderation", CLB),
Paragraph("≤2 drinks/day men; ≤1 drink/day women", CL),
Paragraph("2–4 mmHg", CG),
Paragraph("Heavy alcohol is an important secondary cause of HTN", CL)],
[Paragraph("Potassium intake", CLB),
Paragraph("3,500–5,000 mg/day (fruit, vegetables, legumes)", CL),
Paragraph("2–3 mmHg", CG),
Paragraph("Check K+ if on ACEi/ARB/MRA before supplementing", CL)],
[Paragraph("Smoking cessation", CLB),
Paragraph("Complete cessation; use NRT, varenicline or bupropion", CL),
Paragraph("Variable acutely;\nsignificant CV risk ↓", CG),
Paragraph("Smoking does not persistently raise BP but massively ↑ CV risk", CL)],
]
ls_table = Table(ls_data, colWidths=ls_col_w, repeatRows=1)
ls_table.setStyle(std_table_style())
story.append(ls_table)
story.append(Spacer(1, 0.3*cm))
# ── Disclaimer ────────────────────────────────────────────────────────────────
story.append(HRFlowable(width="100%", thickness=0.5, color=BORDER))
story.append(Spacer(1, 0.15*cm))
story.append(Paragraph(
"DISCLAIMER: This reference card is intended for educational and clinical support purposes only. "
"Always consult current prescribing information and apply clinical judgement to individual patient circumstances. "
"Sources: 2025 AHA/ACC/Multisociety Guideline for the Prevention, Detection, Evaluation and Management of High Blood Pressure in Adults "
"(Hypertension. 2025; PMID 40811516); 2024 ESC Guidelines for Elevated Blood Pressure and Hypertension (ESC 2024); "
"Harrison's Principles of Internal Medicine 22E (2025); Goldman-Cecil Medicine International Edition; "
"NKF Primer on Kidney Diseases 8e; Comprehensive Clinical Nephrology 7e; Braunwald's Heart Disease 2e.",
SMALL))
# ── Build ─────────────────────────────────────────────────────────────────────
doc.build(story, onFirstPage=on_page, onLaterPages=on_page)
print("PDF generated:", OUTPUT)
cd /home/daytona/workspace/htn-pdf && python3 generate_htn_pdf.py 2>&1
python3 -c " from pypdf import PdfReader; import os r = PdfReader('/home/daytona…
Hypertension Medication Reference
PDF Document · PDF