Which gliptin is supposed to be best

Reading File
Searching PubMed

DPP-4 inhibitors gliptins comparison efficacy safety

Finding Sources
Reading Article

PMID: 41918146

Finding Sources
Reading File
Reading File
Reading File
I now have solid textbook content plus a fresh 2026 meta-analysis. Here's the full answer:

DPP-4 Inhibitors (Gliptins) - Which is "Best"?

There is no single "best" gliptin. Head-to-head data show they are broadly equivalent in glycemic efficacy, and the choice depends on patient-specific factors. Here is how they compare:

Available Gliptins (US market)

DrugBrandDoseRenal adjustment needed?
SitagliptinJanuvia100 mg/dayYes
LinagliptinTradjenta5 mg/dayNo
SaxagliptinOnglyza5 mg/dayYes
AlogliptinNesina25 mg/dayYes
Vildagliptin(EU only)50 mg 1-2x/dayYes

Mechanism (shared by all)

All gliptins inhibit DPP-4, the enzyme that breaks down GLP-1 and GIP. This prolongs incretin activity, boosting meal-time insulin release and suppressing inappropriate glucagon secretion. They are weight-neutral and carry low hypoglycemia risk as monotherapy.

Key Differentiators

1. Linagliptin - best in renal impairment Linagliptin is the only gliptin eliminated primarily via the hepatobiliary/enterohepatic system. It binds extensively to plasma proteins. Because almost none is renally cleared, no dose adjustment is needed at any level of renal impairment, including ESRD. All other gliptins require dose reductions as eGFR falls.
  • Lippincott Pharmacology, p. 818; Goodman & Gilman, p. 1059
2. Sitagliptin - most long-term safety data Sitagliptin has the most published clinical trial experience. The TECOS cardiovascular outcomes trial showed it was cardiovascular-neutral (no increase in MACE or HF hospitalizations). A 2026 Bayesian network meta-analysis (87 RCTs, 64,517 participants) found no significant difference in HbA1c reduction or safety between sitagliptin 100 mg and linagliptin 5 mg vs. placebo (HbA1c reduction: sitagliptin -0.64%, linagliptin -0.59%) [PMID: 41918146].
3. Saxagliptin - use caution in heart failure The SAVOR-TIMI 53 trial showed saxagliptin increased hospitalizations for heart failure by ~27%. This is a specific class concern for saxagliptin alone. The FDA issued a warning; it should be avoided in patients at risk for HF.
  • Goodman & Gilman, p. 1059; Lippincott, p. 818
4. Saxagliptin also has drug interactions It is the only gliptin metabolized by CYP3A4/5. Its dose must be halved to 2.5 mg/day when co-administered with strong CYP3A4 inhibitors (ketoconazole, ritonavir, clarithromycin, etc.). The others are not significantly metabolized this way.
  • Goodman & Gilman, p. 1059

Shared Adverse Effects (class effects)

  • Nasopharyngitis and headache (most common)
  • Rare but serious: pancreatitis, severe hypersensitivity reactions
  • Severe joint pain (arthralgia) - FDA warning for the whole class
  • No significant weight change, low hypoglycemia risk as monotherapy

Practical Decision Guide

Clinical scenarioPreferred gliptin
CKD / renal impairment (any stage)Linagliptin (no renal dose adjustment)
Need for most clinical evidenceSitagliptin
Heart failure riskAvoid saxagliptin; prefer sitagliptin or linagliptin
On strong CYP3A4 inhibitorsAvoid saxagliptin; prefer others
General T2DM, normal renal functionAny gliptin; sitagliptin or linagliptin most commonly used

Bottom line: Sitagliptin and linagliptin are considered the two preferred agents in current practice - sitagliptin for its extensive safety record, and linagliptin for its unique renal safety profile. A 2026 meta-analysis confirms they are equivalent in glycemic efficacy [PMID: 41918146]. Saxagliptin is the one to avoid in patients with or at risk for heart failure.

Which is best SGLT 2 inhibitor

Finding Sources
Searching PubMed

SGLT2 inhibitors cardiovascular renal outcomes comparison

Reading File
Reading Article

PMID: 38293914

Reading Article

PMID: 38583093

Reading File
Reading File
Excellent - I now have comprehensive textbook data and strong recent meta-analyses. Here's the full answer:

SGLT2 Inhibitors - Which is "Best"?

Again, there is no single winner - but empagliflozin and dapagliflozin are the two most clinically favored agents, each for different reasons. The answer depends on what you're treating.

The Four Available SGLT2 Inhibitors (US)

DrugBrandDoses
CanagliflozinInvokana100, 300 mg/day
DapagliflozinFarxiga5, 10 mg/day
EmpagliflozinJardiance10, 25 mg/day
ErtugliflozinSteglatro5, 15 mg/day
Shared mechanism: All block SGLT2 in the proximal renal tubule, reducing glucose reabsorption and lowering the renal glucose threshold from ~180 to ~50 mg/dL. This causes glycosuria, mild osmotic diuresis, natriuresis, and modest blood pressure reduction. As monotherapy: HbA1c reduction ~0.7-1.0%, weight loss 2-4 kg, BP reduction 2-4 mmHg.
  • Goodman & Gilman, p. 1059

Key Differentiators: Cardiovascular Outcomes Trials

This is where the drugs really diverge:
Empagliflozin (EMPA-REG OUTCOME)
  • Reduced 3-point MACE (CV death, MI, stroke) in T2DM with established CVD
  • Showed 38% reduction in CV death - the most striking mortality signal of any SGLT2i trial
  • Reduced HF hospitalizations significantly
  • Indicated for: T2DM + CVD risk reduction, HFrEF
Canagliflozin (CANVAS + CREDENCE)
  • Also reduced MACE in T2DM with high CV risk
  • CREDENCE trial: significant renoprotection in diabetic nephropathy - reduced ESRD, doubled creatinine, renal/CV death
  • BUT: early trials raised concerns about lower extremity amputations (warning later removed) and bone fractures - these signals were canagliflozin-specific
  • Indicated for: T2DM + CVD, renal protection in diabetic nephropathy
Dapagliflozin (DECLARE-TIMI 58, DAPA-HF, DAPA-CKD)
  • DECLARE: did NOT significantly reduce MACE in T2DM primary prevention population, but did reduce HF hospitalizations and CV death
  • DAPA-HF: major landmark - reduced CV death + HF worsening in HFrEF patients regardless of whether they had diabetes - first SGLT2i approved specifically for heart failure
  • DAPA-CKD: reduced CKD progression and CV death in CKD patients with or without T2DM
  • Broadest indications: T2DM, HFrEF (diabetic or not), CKD
Ertugliflozin (VERTIS CV)
  • Neutral on MACE - did not reduce CV events vs placebo
  • No dedicated renal outcomes trial showing benefit
  • Considered the weakest outcomes data of the four
  • Goodman & Gilman, p. 1025

2024 Network Meta-Analysis (96,196 patients, 21 RCTs)

A 2024 network meta-analysis published in JAHA [PMID: 38293914] covering empagliflozin, ertugliflozin, dapagliflozin, canagliflozin, and sotagliflozin found:
  • No significant differences in the composite of CV death + HF hospitalization among the drugs overall
  • In patients without CKD, empagliflozin was associated with lower risk of the primary outcome vs ertugliflozin
  • Empagliflozin and dapagliflozin both showed lower acute kidney injury risk than sotagliflozin
  • Safety profiles (amputation, UTI, genital infection, DKA, hypoglycemia) were similar across agents
A 2024 Circulation SMART-C meta-analysis (78,607 patients, 11 trials) [PMID: 38583093] confirmed SGLT2i as a class reduce MACE by 9% (HR 0.91), driven mainly by CV death reduction - primarily HF death and sudden cardiac death. No drug was significantly superior to others for MACE.

Adverse Effects (class-wide)

  • Genital mycotic infections (3-5% increase) - most common
  • Urinary tract infections (~2% increase)
  • Hypotension/volume depletion - especially in elderly or those on diuretics
  • Euglycemic DKA - rare but serious; risk increases during illness, surgery, or fasting
  • Transient eGFR dip at initiation (hemodynamic, not structural - resolves)
  • Glycemic efficacy reduced by 40-80% in stage 3 CKD (eGFR 30-60) because less glucose is filtered
  • Goodman & Gilman, p. 1059-1060; Lippincott, p. 818-819

Practical Decision Guide

Clinical scenarioBest choice
T2DM + established CVD, mortality reductionEmpagliflozin (strongest CV death data)
Heart failure with reduced EF (HFrEF), with or without T2DMDapagliflozin or Empagliflozin (both approved)
Diabetic nephropathy / CKD protectionCanagliflozin (CREDENCE) or Dapagliflozin (DAPA-CKD)
CKD without diabetesDapagliflozin (DAPA-CKD included non-diabetics)
General T2DM glycemic control onlyAny agent; avoid ertugliflozin if CV/renal benefit desired
Avoid if possibleErtugliflozin (weakest outcomes evidence)

Bottom line: If you had to pick one, empagliflozin edges ahead for CV mortality reduction and dapagliflozin edges ahead for breadth of indications (HF + CKD regardless of diabetes). The 2024 meta-analyses confirm no statistically significant difference in hard outcomes between them as a class - so patient profile, comorbidities, and cost/access remain the deciding factors in practice.

Create a comparison table of gliptins vs SGLT2i for my reference

Here's a comprehensive comparison table based on everything covered in our previous discussion:

Gliptins (DPP-4 Inhibitors) vs SGLT2 Inhibitors — Quick Reference

FeatureGliptins (DPP-4i)SGLT2 Inhibitors (Gliflozins)
ExamplesSitagliptin, Linagliptin, Saxagliptin, AlogliptinEmpagliflozin, Dapagliflozin, Canagliflozin, Ertugliflozin
MechanismInhibit DPP-4 enzyme → prolong GLP-1/GIP activity → ↑ insulin, ↓ glucagonBlock SGLT2 in proximal renal tubule → ↑ urinary glucose excretion
RouteOral, once dailyOral, once daily
HbA1c reduction0.4–0.8%0.7–1.0%
Weight effectNeutral (no change)Weight loss 2–4 kg
Blood pressureNeutral↓ Systolic BP 2–4 mmHg
Hypoglycemia riskLow (monotherapy)Low (monotherapy)
CV mortality benefitNone (CV neutral)Yes — especially empagliflozin, canagliflozin
MACE reductionNoYes (~9% reduction as class)
Heart failure benefitNone (saxagliptin ↑ HF risk)Strong — all reduce HF hospitalizations; dapagliflozin/empagliflozin approved for HFrEF
Renal protectionNoneYes — canagliflozin, dapagliflozin, empagliflozin slow CKD progression
Use in HFrEFAvoid saxagliptin; others cautiousPreferred (dapagliflozin, empagliflozin)
Use in CKDLinagliptin: safe at any eGFR (no renal dose adjust); others need dose reductionEfficacy ↓ in stage 3 CKD; avoid if eGFR <20–30; still renoprotective even at lower eGFR
Renal dosingLinagliptin: none needed. Sitagliptin/alogliptin/saxagliptin: dose reduceAll need caution; not for severe renal impairment for glycemic use
Drug interactionsSaxagliptin: CYP3A4 interactions (dose halve with strong inhibitors)Minimal
Common side effectsNasopharyngitis, headacheGenital mycotic infections (3–5%), UTI (~2%), urinary frequency
Serious side effectsPancreatitis (rare), severe joint pain (arthralgia), hypersensitivityEuglycemic DKA (rare), Fournier's gangrene (very rare), volume depletion/hypotension
Bone/amputation riskNoneCanagliflozin: historical fracture/amputation signal (warning removed); not seen with others
GI side effectsMinimalMinimal (unlike GLP-1 agonists)
Use in T1DMNot indicatedNot standard; off-label with caution (DKA risk)
Perioperative useCan continueStop 3–4 days before surgery (euglycemic DKA risk)
Pancreatitis riskRare but reported (class effect)Not associated
Approved beyond T2DMNoYes — HFrEF, HFpEF (empagliflozin), CKD (dapagliflozin) regardless of diabetes
Cost/availabilitySitagliptin now generic (lower cost)Still mostly branded; higher cost
Best agent in classLinagliptin (renal safety) or Sitagliptin (evidence depth)Empagliflozin (CV mortality) or Dapagliflozin (breadth of indications)

When to Prefer Gliptins

  • Frail/elderly patients where volume depletion is a concern
  • Recurrent genital/urinary infections
  • Patients on diuretics where further diuresis is risky
  • CKD any stage (use linagliptin - no dose adjustment)
  • When cost is a barrier (generic sitagliptin available)
  • Patients at risk of DKA or who fast frequently

When to Prefer SGLT2 Inhibitors

  • T2DM with established CVD or high CV risk
  • Heart failure (HFrEF) - with or without diabetes
  • Diabetic nephropathy / CKD with proteinuria
  • Overweight/obese patients (weight loss benefit)
  • Hypertension needing additional BP lowering
  • When both glycemic control AND organ protection are goals

Key takeaway: SGLT2 inhibitors have a broader evidence base for organ protection (heart, kidneys) and are increasingly first-line alongside metformin in T2DM with CVD/HF/CKD. Gliptins are better tolerated overall, safer in renal impairment (especially linagliptin), and a good choice when SGLT2i are not suitable or not tolerated.

Create a quick-reference PDF comparing all diabetes drugs by indication

Reading File
Running Command

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

Running Command

mkdir -p /home/daytona/workspace/diabetes-reference

Writing File

~/diabetes-reference/build_pdf.py

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

OUTPUT = "/home/daytona/workspace/diabetes-reference/Diabetes_Drugs_Quick_Reference.pdf"

# ── Colour palette ──────────────────────────────────────────────────────────
NAVY      = colors.HexColor("#1B3A5C")
TEAL      = colors.HexColor("#0D7C8F")
LTBLUE    = colors.HexColor("#DFF0F5")
AMBER     = colors.HexColor("#F5A623")
RED       = colors.HexColor("#C0392B")
GREEN     = colors.HexColor("#27AE60")
GREY      = colors.HexColor("#F4F6F8")
MIDGREY   = colors.HexColor("#BDC3C7")
WHITE     = colors.white
BLACK     = colors.HexColor("#1A1A1A")

# ── Styles ───────────────────────────────────────────────────────────────────
styles = getSampleStyleSheet()

def S(name, **kw):
    return ParagraphStyle(name, **kw)

title_style   = S("Title",   fontName="Helvetica-Bold",   fontSize=20, textColor=WHITE,  alignment=TA_CENTER, spaceAfter=2)
sub_style     = S("Sub",     fontName="Helvetica",        fontSize=10, textColor=WHITE,  alignment=TA_CENTER, spaceAfter=0)
h1_style      = S("H1",      fontName="Helvetica-Bold",   fontSize=13, textColor=NAVY,   spaceBefore=10, spaceAfter=4)
h2_style      = S("H2",      fontName="Helvetica-Bold",   fontSize=10, textColor=TEAL,   spaceBefore=6,  spaceAfter=2)
body_style    = S("Body",    fontName="Helvetica",        fontSize=8,  textColor=BLACK,  leading=11)
small_style   = S("Small",   fontName="Helvetica",        fontSize=7,  textColor=BLACK,  leading=10)
bold_style    = S("Bold",    fontName="Helvetica-Bold",   fontSize=8,  textColor=BLACK)
footer_style  = S("Footer",  fontName="Helvetica-Oblique",fontSize=7,  textColor=MIDGREY, alignment=TA_CENTER)
warn_style    = S("Warn",    fontName="Helvetica-Bold",   fontSize=7.5,textColor=RED)
good_style    = S("Good",    fontName="Helvetica-Bold",   fontSize=7.5,textColor=GREEN)

def P(txt, style=body_style):
    return Paragraph(txt, style)

def cell(txt, bold=False, color=None, size=8, wrap=True):
    fs = "Helvetica-Bold" if bold else "Helvetica"
    c  = color or BLACK
    st = S("cell", fontName=fs, fontSize=size, textColor=c, leading=size+2.5, wordWrap='CJK' if wrap else None)
    return Paragraph(txt, st)

# ── Page setup ───────────────────────────────────────────────────────────────
doc = SimpleDocTemplate(
    OUTPUT,
    pagesize=landscape(A4),
    leftMargin=14*mm, rightMargin=14*mm,
    topMargin=12*mm,  bottomMargin=14*mm,
    title="Diabetes Drug Quick Reference",
    author="Orris Medical Reference"
)

W, H = landscape(A4)
content_w = W - 28*mm

story = []

# ══════════════════════════════════════════════════════════════════════════════
# HEADER BANNER
# ══════════════════════════════════════════════════════════════════════════════
header_data = [[
    Paragraph("<b>DIABETES PHARMACOTHERAPY</b><br/><font size=9>Quick-Reference Guide — All Drug Classes by Indication</font>", 
              S("hd", fontName="Helvetica-Bold", fontSize=18, textColor=WHITE, alignment=TA_CENTER, leading=24)),
    Paragraph(f"<font size=7>For educational reference only<br/>Updated: {date.today().strftime('%B %Y')}</font>",
              S("hdsub", fontName="Helvetica-Oblique", fontSize=7, textColor=colors.HexColor("#B8D4E0"), alignment=TA_RIGHT, leading=10))
]]
header_tbl = Table(header_data, colWidths=[content_w*0.82, content_w*0.18])
header_tbl.setStyle(TableStyle([
    ('BACKGROUND',   (0,0), (-1,-1), NAVY),
    ('TOPPADDING',   (0,0), (-1,-1), 10),
    ('BOTTOMPADDING',(0,0), (-1,-1), 10),
    ('LEFTPADDING',  (0,0), (-1,-1), 14),
    ('RIGHTPADDING', (0,0), (-1,-1), 14),
    ('VALIGN',       (0,0), (-1,-1), 'MIDDLE'),
    ('ROUNDEDCORNERS', [6]),
]))
story.append(header_tbl)
story.append(Spacer(1, 8))

# ══════════════════════════════════════════════════════════════════════════════
# SECTION 1 — MASTER COMPARISON TABLE
# ══════════════════════════════════════════════════════════════════════════════
story.append(P("1. MASTER DRUG CLASS COMPARISON", h1_style))

# Column widths (landscape A4 ~267 mm usable)
cw = [38, 37, 30, 25, 25, 24, 24, 24, 24, 22]  # mm  (sum=273→scale)
total = sum(cw)
cw_pt = [c/total * content_w for c in cw]

HDR_STYLE = S("th", fontName="Helvetica-Bold", fontSize=7.5, textColor=WHITE, leading=10, alignment=TA_CENTER)
def th(t): return Paragraph(t, HDR_STYLE)

header_row = [
    th("Drug Class\n(Examples)"),
    th("Mechanism"),
    th("HbA1c\nReduction"),
    th("Weight\nEffect"),
    th("Hypo\nRisk"),
    th("CV\nBenefit"),
    th("HF\nBenefit"),
    th("Renal\nProtection"),
    th("Key\nAdverse Effects"),
    th("Use in\nCKD/Renal"),
]

# ✓ = benefit  ✗ = no benefit  ~ = neutral  ↑ = increase  ↓ = decrease
rows = [
    # [class, mechanism, HbA1c, weight, hypo, CV, HF, renal, adverse, CKD]
    [
        cell("Metformin\n(Glucophage)", bold=True, color=NAVY),
        cell("↓ hepatic glucose output\n↑ insulin sensitivity"),
        cell("1.0–1.5%", bold=True),
        cell("Neutral / mild ↓"),
        cell("Low"),
        cell("Neutral (no MACE benefit)"),
        cell("Neutral"),
        cell("Neutral"),
        cell("GI upset, lactic acidosis (rare), B12↓"),
        cell("Avoid if eGFR <30\nHold before contrast"),
    ],
    [
        cell("Sulfonylureas\nGlipizide, Glyburide,\nGlimepiride", bold=True, color=NAVY),
        cell("Stimulate β-cell insulin secretion (ATP-K channel)"),
        cell("1.0–2.0%", bold=True),
        cell("↑ Weight +2–4 kg"),
        cell("HIGH", bold=True, color=RED),
        cell("Neutral / possible ↑CV mortality (older agents)"),
        cell("Neutral"),
        cell("Neutral"),
        cell("Hypoglycemia, weight gain"),
        cell("Glimepiride preferred;\nAvoid glyburide in CKD"),
    ],
    [
        cell("Meglitinides\nRepaglinide, Nateglinide", bold=True, color=NAVY),
        cell("Rapid-acting insulin secretagogues (prandial)"),
        cell("0.5–1.5%", bold=True),
        cell("↑ Weight"),
        cell("Moderate", bold=True, color=colors.HexColor("#E67E22")),
        cell("Neutral"),
        cell("Neutral"),
        cell("Neutral"),
        cell("Hypoglycemia (less than SU), weight gain"),
        cell("Repaglinide safer;\nDose adjust"),
    ],
    [
        cell("Thiazolidinediones\nPioglitazone, Rosiglitazone", bold=True, color=NAVY),
        cell("PPAR-γ agonist → ↑ insulin sensitivity in adipose/muscle"),
        cell("0.7–1.0%", bold=True),
        cell("↑ Weight +2–4 kg", bold=True),
        cell("Low"),
        cell("Pioglitazone: ↓ MACE (PROactive trial)", color=GREEN),
        cell("↑ HF risk — CONTRAINDICATED in HF", bold=True, color=RED),
        cell("Neutral"),
        cell("Fluid retention, HF, fractures, bladder cancer (pioglitazone)"),
        cell("Use with caution;\nFluid retention worsens"),
    ],
    [
        cell("DPP-4 Inhibitors\nSitagliptin, Linagliptin,\nSaxagliptin, Alogliptin", bold=True, color=TEAL),
        cell("Inhibit DPP-4 → ↑ active GLP-1/GIP → ↑ insulin, ↓ glucagon"),
        cell("0.4–0.8%", bold=True),
        cell("Neutral"),
        cell("Low"),
        cell("Neutral (CV safe)"),
        cell("Neutral\n(Saxagliptin ↑ HF risk)", bold=True, color=colors.HexColor("#E67E22")),
        cell("Neutral"),
        cell("Nasopharyngitis, joint pain, rare pancreatitis\nSaxagliptin: ↑ HF hospitalisation"),
        cell("Linagliptin: NO dose adjust (any eGFR)\nOthers: dose reduce"),
    ],
    [
        cell("SGLT2 Inhibitors\nEmpagliflozin, Dapagliflozin,\nCanagliflozin, Ertugliflozin", bold=True, color=TEAL),
        cell("Block renal SGLT2 → ↑ urinary glucose & Na⁺ excretion"),
        cell("0.7–1.0%", bold=True),
        cell("↓ Weight 2–4 kg", bold=True, color=GREEN),
        cell("Low"),
        cell("↓ CV death & MACE\n(Empa, Cana)", bold=True, color=GREEN),
        cell("↓ HF hospitalisation\nApproved HFrEF (Empa, Dapa)", bold=True, color=GREEN),
        cell("↓ CKD progression\n(Cana, Dapa, Empa)", bold=True, color=GREEN),
        cell("Genital mycosis, UTI, DKA (euglycaemic), volume depletion, Fournier's gangrene"),
        cell("Efficacy ↓ in CKD;\nRenoprotective even at lower eGFR;\nAvoid eGFR <20"),
    ],
    [
        cell("GLP-1 Receptor Agonists\nSemaglutide, Liraglutide,\nDulaglutide, Exenatide", bold=True, color=NAVY),
        cell("Activate GLP-1R → ↑ insulin, ↓ glucagon, ↓ gastric emptying, ↑ satiety"),
        cell("0.8–1.5%", bold=True),
        cell("↓↓ Weight 3–5 kg\n(semaglutide up to 6 kg)", bold=True, color=GREEN),
        cell("Low"),
        cell("↓ MACE (Liraglutide, Semaglutide, Dulaglutide)", bold=True, color=GREEN),
        cell("Neutral\n(Liraglutide: ↓ HF in some)", color=GREEN),
        cell("Liraglutide, Semaglutide: ↓ albuminuria", color=GREEN),
        cell("Nausea, vomiting, diarrhoea, rare pancreatitis, thyroid C-cell tumours (rodent)"),
        cell("Most OK in moderate CKD;\nSemaglutide: adjust in severe CKD"),
    ],
    [
        cell("Insulin\n(Basal, Prandial, Mixed)", bold=True, color=NAVY),
        cell("Replaces/supplements endogenous insulin; activates insulin receptors"),
        cell("Variable\n(1.5–3.5%)", bold=True),
        cell("↑ Weight", bold=True),
        cell("HIGH\n(esp. prandial)", bold=True, color=RED),
        cell("Neutral\n(no independent CV benefit)"),
        cell("Neutral"),
        cell("Neutral"),
        cell("Hypoglycaemia, weight gain, injection site reactions, lipodystrophy"),
        cell("Dose reduce in CKD\n(↓ renal insulin clearance)"),
    ],
    [
        cell("Alpha-Glucosidase\nInhibitors\nAcarbose, Miglitol", bold=True, color=NAVY),
        cell("Inhibit intestinal α-glucosidase → delay carb digestion → ↓ postprandial glucose"),
        cell("0.5–0.8%", bold=True),
        cell("Neutral"),
        cell("Low"),
        cell("Acarbose: ↓ CV events (STOP-NIDDM)", color=GREEN),
        cell("Neutral"),
        cell("Neutral"),
        cell("GI: flatulence, bloating, diarrhoea (very common, dose-limiting)"),
        cell("Avoid if eGFR <25\n(accumulation)"),
    ],
    [
        cell("Amylin Analogue\nPramlintide", bold=True, color=NAVY),
        cell("Amylin receptor agonist → ↓ glucagon, slows gastric emptying, ↑ satiety"),
        cell("0.5–0.7%\n(adjunct to insulin)", bold=True),
        cell("↓ Weight mild"),
        cell("Low (alone)\nHigh with insulin", bold=True, color=colors.HexColor("#E67E22")),
        cell("Neutral"),
        cell("Neutral"),
        cell("Neutral"),
        cell("Nausea, hypoglycaemia with insulin, contraindicated in gastroparesis"),
        cell("OK if CrCl >20 mL/min"),
    ],
]

main_table_data = [header_row] + rows

main_tbl = Table(main_table_data, colWidths=cw_pt, repeatRows=1)
main_tbl.setStyle(TableStyle([
    # Header
    ('BACKGROUND',    (0,0),  (-1,0),  NAVY),
    ('TEXTCOLOR',     (0,0),  (-1,0),  WHITE),
    ('FONTNAME',      (0,0),  (-1,0),  'Helvetica-Bold'),
    ('FONTSIZE',      (0,0),  (-1,0),  7.5),
    ('ALIGN',         (0,0),  (-1,0),  'CENTER'),
    ('VALIGN',        (0,0),  (-1,-1), 'TOP'),
    ('TOPPADDING',    (0,0),  (-1,-1), 3),
    ('BOTTOMPADDING', (0,0),  (-1,-1), 3),
    ('LEFTPADDING',   (0,0),  (-1,-1), 4),
    ('RIGHTPADDING',  (0,0),  (-1,-1), 4),
    # Alternating rows
    *[('BACKGROUND', (0,i), (-1,i), GREY if i%2==0 else WHITE) for i in range(1, len(main_table_data))],
    # Highlight SGLT2i and DPP-4i rows with subtle left border
    ('LEFTPADDING',   (0,5), (0,5),  8),
    ('LEFTPADDING',   (0,6), (0,6),  8),
    # Grid
    ('GRID',          (0,0),  (-1,-1), 0.3, MIDGREY),
    ('LINEBELOW',     (0,0),  (-1,0),  1.2, TEAL),
    ('ROWBACKGROUNDS',(0,0),  (-1,-1), [GREY, WHITE]),
]))
story.append(main_tbl)
story.append(Spacer(1, 10))

# ══════════════════════════════════════════════════════════════════════════════
# PAGE 2 — INDICATION-BASED SELECTION GUIDE
# ══════════════════════════════════════════════════════════════════════════════
story.append(PageBreak())
story.append(P("2. INDICATION-BASED DRUG SELECTION", h1_style))
story.append(Spacer(1, 4))

IND_HDR = S("ih", fontName="Helvetica-Bold", fontSize=8, textColor=WHITE, leading=10, alignment=TA_CENTER)
BODY_IND = S("bi", fontName="Helvetica", fontSize=7.5, textColor=BLACK, leading=10.5)
PREF_ST  = S("pf", fontName="Helvetica-Bold", fontSize=7.5, textColor=GREEN, leading=10.5)
ALT_ST   = S("alt", fontName="Helvetica", fontSize=7.5, textColor=NAVY, leading=10.5)
AVOID_ST = S("av", fontName="Helvetica-Bold", fontSize=7.5, textColor=RED, leading=10.5)

def ind_cell(txt, st=BODY_IND): return Paragraph(txt, st)
def pref(txt): return Paragraph("✔ " + txt, PREF_ST)
def alt(txt):  return Paragraph("◎ " + txt, ALT_ST)
def avoid(txt):return Paragraph("✖ " + txt, AVOID_ST)

ind_header = [
    Paragraph("Clinical Scenario / Indication", IND_HDR),
    Paragraph("1st Choice", IND_HDR),
    Paragraph("Alternative(s)", IND_HDR),
    Paragraph("Avoid / Caution", IND_HDR),
    Paragraph("Key Rationale", IND_HDR),
]

ind_rows = [
    [
        ind_cell("T2DM — Initial Monotherapy"),
        pref("Metformin"),
        alt("DPP-4i, SGLT2i, GLP-1 RA"),
        avoid("Insulin (unless hyperglycaemic emergency)"),
        ind_cell("Metformin: established safety, low cost, CV neutral, no hypoglycaemia"),
    ],
    [
        ind_cell("T2DM + Established CVD\n(ASCVD — prior MI, stroke)"),
        pref("SGLT2i (Empagliflozin/Canagliflozin)\nor GLP-1 RA (Semaglutide/Liraglutide)"),
        alt("Both SGLT2i + GLP-1 RA (additive)"),
        avoid("Sulfonylurea / Insulin as preferred add-on"),
        ind_cell("EMPA-REG, CANVAS, LEADER, SUSTAIN-6 trials show ↓ MACE and CV death"),
    ],
    [
        ind_cell("T2DM + Heart Failure\n(HFrEF or HFpEF)"),
        pref("SGLT2i — Dapagliflozin or Empagliflozin"),
        alt("Any SGLT2i except ertugliflozin"),
        avoid("TZDs (fluid retention)\nSaxagliptin (↑ HF hospitalisation)"),
        ind_cell("DAPA-HF, EMPEROR-Reduced: benefit regardless of T2DM status; approved as HF therapy"),
    ],
    [
        ind_cell("T2DM + CKD\n(Diabetic nephropathy, albuminuria)"),
        pref("SGLT2i (Canagliflozin, Dapagliflozin, Empagliflozin)"),
        alt("GLP-1 RA (liraglutide, semaglutide)"),
        avoid("Metformin if eGFR <30\nSulfonylureas (hypo risk↑)\nAvoid SGLT2i if eGFR <20"),
        ind_cell("CREDENCE, DAPA-CKD, EMPA-KIDNEY: ↓ ESRD, ↓ doubling of creatinine"),
    ],
    [
        ind_cell("T2DM + Obesity\n(BMI >30, weight loss desired)"),
        pref("GLP-1 RA (Semaglutide — most weight loss)"),
        alt("SGLT2i (Empagliflozin/Dapagliflozin)"),
        avoid("Sulfonylureas, Insulin, TZDs\n(all cause weight gain)"),
        ind_cell("GLP-1 RA: 3–6 kg avg; SGLT2i: 2–4 kg; both superior to weight-neutral agents"),
    ],
    [
        ind_cell("T2DM + CKD Any Stage\n(renal dosing concern)"),
        pref("Linagliptin (NO dose adjustment ever)"),
        alt("GLP-1 RA (most safe in moderate CKD)"),
        avoid("Metformin <eGFR 30\nSGLT2i if eGFR <20 (no glucose benefit)\nGlyburide"),
        ind_cell("Linagliptin: hepatobiliary elimination only; safe at any eGFR including dialysis"),
    ],
    [
        ind_cell("T2DM + Hypoglycaemia Risk\n(elderly, irregular meals, fall risk)"),
        pref("DPP-4i, SGLT2i, or GLP-1 RA"),
        alt("Metformin, Acarbose"),
        avoid("Sulfonylureas (especially glyburide)\nInsulin secretagogues\nPrandial insulin"),
        ind_cell("DPP-4i, SGLT2i, GLP-1 RA: glucose-dependent action — intrinsically low hypo risk"),
    ],
    [
        ind_cell("T2DM + High HbA1c\n(very uncontrolled, >10%)"),
        pref("Insulin ± Metformin\nor combination oral therapy"),
        alt("GLP-1 RA + basal insulin"),
        avoid("Monotherapy with mild agents (acarbose, DPP-4i)"),
        ind_cell("Insulin has no HbA1c ceiling; combination therapy needed for large reductions"),
    ],
    [
        ind_cell("Type 1 Diabetes"),
        pref("Insulin (mandatory — basal-bolus)"),
        alt("Pramlintide (adjunct)\nSGLT2i off-label with caution"),
        avoid("Sulfonylureas, Meglitinides, TZDs\n(not effective without β-cell function)"),
        ind_cell("T1DM: absolute insulin deficiency; SGLT2i adjunct increases DKA risk — close monitoring"),
    ],
    [
        ind_cell("Gestational Diabetes / Pregnancy"),
        pref("Insulin (safest evidence base)"),
        alt("Metformin (second-line, some guidelines)"),
        avoid("SGLT2i, GLP-1 RA, DPP-4i, SUs\n(insufficient safety data)"),
        ind_cell("Insulin does not cross placenta in significant amounts; most oral agents not approved in pregnancy"),
    ],
    [
        ind_cell("Post-MI / Acute Coronary Syndrome"),
        pref("SGLT2i + GLP-1 RA"),
        alt("Metformin (restart once stable)"),
        avoid("TZDs, Saxagliptin"),
        ind_cell("EMPA-REG, CANVAS, LEADER all enrolled post-MI patients; SGLT2i ↓ CV death strongly"),
    ],
    [
        ind_cell("Perioperative Period / Surgery"),
        pref("Insulin (titrate per glucose)"),
        alt("Metformin (restart post-op if stable)"),
        avoid("SGLT2i: STOP 3–4 days pre-op (DKA risk)\nSulfonylureas day of surgery"),
        ind_cell("Euglycaemic DKA with SGLT2i under fasting/surgical stress; SUs cause hypo under anaesthesia"),
    ],
]

ind_cw = [content_w * p for p in [0.17, 0.22, 0.20, 0.20, 0.21]]
ind_data = [ind_header] + ind_rows

ind_tbl = Table(ind_data, colWidths=ind_cw, repeatRows=1)
ind_tbl.setStyle(TableStyle([
    ('BACKGROUND',    (0,0),  (-1,0),  TEAL),
    ('TEXTCOLOR',     (0,0),  (-1,0),  WHITE),
    ('ALIGN',         (0,0),  (-1,0),  'CENTER'),
    ('VALIGN',        (0,0),  (-1,-1), 'TOP'),
    ('TOPPADDING',    (0,0),  (-1,-1), 4),
    ('BOTTOMPADDING', (0,0),  (-1,-1), 4),
    ('LEFTPADDING',   (0,0),  (-1,-1), 5),
    ('RIGHTPADDING',  (0,0),  (-1,-1), 5),
    ('GRID',          (0,0),  (-1,-1), 0.3, MIDGREY),
    ('LINEBELOW',     (0,0),  (-1,0),  1.2, NAVY),
    ('ROWBACKGROUNDS',(0,1),  (-1,-1), [GREY, WHITE]),
    # Highlight cols 1,2 faintly
    ('FONTSIZE',      (0,1),  (-1,-1), 7.5),
]))
story.append(ind_tbl)
story.append(Spacer(1, 10))

# ══════════════════════════════════════════════════════════════════════════════
# PAGE 3 — INDIVIDUAL DRUG PROFILES + ADVERSE EFFECTS SUMMARY
# ══════════════════════════════════════════════════════════════════════════════
story.append(PageBreak())
story.append(P("3. INDIVIDUAL DRUG PROFILES — GLIPTINS vs SGLT2 INHIBITORS", h1_style))
story.append(Spacer(1, 4))

# Split into two side-by-side tables
gliptin_hdr_style = S("gh", fontName="Helvetica-Bold", fontSize=8.5, textColor=WHITE, alignment=TA_CENTER, leading=11)
gliptin_sub_style = S("gs", fontName="Helvetica-Bold", fontSize=7.5, textColor=TEAL, leading=10)
gliptin_val_style = S("gv", fontName="Helvetica",      fontSize=7.5, textColor=BLACK, leading=10)

def gh(t): return Paragraph(t, gliptin_hdr_style)
def gs(t): return Paragraph(t, gliptin_sub_style)
def gv(t): return Paragraph(t, gliptin_val_style)
def gvb(t):return Paragraph(t, S("gvb", fontName="Helvetica-Bold", fontSize=7.5, textColor=BLACK, leading=10))

# GLIPTINS TABLE
g_cw_pt = [(content_w/2 - 5) * p for p in [0.26, 0.16, 0.18, 0.20, 0.20]]

gliptin_data = [
    [gh("DPP-4 Inhibitor"), gh("Dose"), gh("Renal Adjust?"), gh("Key CV Trial"), gh("Notes")],
    [gs("Sitagliptin\n(Januvia)"), gv("100 mg/day"), gv("Yes — reduce dose\neGFR 30–50: 50 mg\neGFR <30: 25 mg"), gv("TECOS\n(CV neutral; no ↑HF)"), gv("Most evidence; widest use; now generic")],
    [gs("Linagliptin\n(Tradjenta)"), gv("5 mg/day"), gvb("None — ever\n(hepatobiliary only)"), gv("CARMELINA\n(CV neutral)"), gv("Drug of choice in CKD/ESRD; no renal dose adjustment at any stage")],
    [gs("Saxagliptin\n(Onglyza)"), gv("5 mg/day\n(2.5 mg with CYP3A4 inhibitors)"), gv("Yes — 2.5 mg if\neGFR ≤50"), gv("SAVOR-TIMI 53\n(↑ HF hospitalisation)"), gvb("Avoid in HF; CYP3A4 drug interactions")],
    [gs("Alogliptin\n(Nesina)"), gv("25 mg/day"), gv("Yes — reduce dose\neGFR 30–60: 12.5 mg\neGFR <30: 6.25 mg"), gv("EXAMINE\n(CV neutral; post-ACS)"), gv("Studied specifically post-ACS; CV safe")],
    [gs("Vildagliptin\n(Galvus — EU only)"), gv("50 mg BD"), gv("Yes — 50 mg once\ndaily if eGFR <50"), gv("VIVIDD\n(CV neutral)"), gv("Not available in USA; used widely in Europe and Asia")],
]

gliptin_tbl = Table(gliptin_data, colWidths=g_cw_pt, repeatRows=1)
gliptin_tbl.setStyle(TableStyle([
    ('BACKGROUND',    (0,0), (-1,0), TEAL),
    ('TEXTCOLOR',     (0,0), (-1,0), WHITE),
    ('BACKGROUND',    (0,1), (-1,-1), WHITE),
    ('ROWBACKGROUNDS',(0,1), (-1,-1), [GREY, WHITE]),
    ('VALIGN',        (0,0), (-1,-1), 'TOP'),
    ('TOPPADDING',    (0,0), (-1,-1), 4),
    ('BOTTOMPADDING', (0,0), (-1,-1), 4),
    ('LEFTPADDING',   (0,0), (-1,-1), 5),
    ('RIGHTPADDING',  (0,0), (-1,-1), 5),
    ('GRID',          (0,0), (-1,-1), 0.3, MIDGREY),
    ('LINEBELOW',     (0,0), (-1,0),  1.2, NAVY),
    # Linagliptin highlight row
    ('BACKGROUND',    (0,2), (-1,2), colors.HexColor("#E6F9ED")),
    # Saxagliptin warning row
    ('BACKGROUND',    (0,3), (-1,3), colors.HexColor("#FEF0EE")),
]))

# SGLT2i TABLE
s_cw_pt = [(content_w/2 - 5) * p for p in [0.26, 0.16, 0.18, 0.20, 0.20]]

def sh(t): return Paragraph(t, S("sh", fontName="Helvetica-Bold", fontSize=8.5, textColor=WHITE, alignment=TA_CENTER, leading=11))
def ss(t): return Paragraph(t, S("ss", fontName="Helvetica-Bold", fontSize=7.5, textColor=NAVY, leading=10))
def sv(t): return Paragraph(t, S("sv", fontName="Helvetica",      fontSize=7.5, textColor=BLACK, leading=10))
def svb(t):return Paragraph(t, S("svb",fontName="Helvetica-Bold", fontSize=7.5, textColor=BLACK, leading=10))

sglt2_data = [
    [sh("SGLT2 Inhibitor"), sh("Dose"), sh("Approved Beyond T2DM"), sh("Key CV/Renal Trial"), sh("Notes")],
    [ss("Empagliflozin\n(Jardiance)"), sv("10–25 mg/day"), svb("HFrEF, HFpEF"), sv("EMPA-REG OUTCOME\nEMPEROR-Reduced\nEMPEROR-Preserved"), svb("Strongest CV mortality data (38% ↓ CV death); broadest HF approvals")],
    [ss("Dapagliflozin\n(Farxiga)"), sv("5–10 mg/day"), svb("HFrEF, CKD\n(with or without T2DM)"), sv("DECLARE-TIMI 58\nDAPA-HF\nDAPA-CKD"), svb("Broadest indications; only SGLT2i approved for CKD without diabetes")],
    [ss("Canagliflozin\n(Invokana)"), sv("100–300 mg/day\n(before 1st meal)"), sv("Diabetic nephropathy"), sv("CANVAS\nCREDENCE\nCREDENCE"), sv("Strong renal data (CREDENCE); historical amputation/fracture signal (resolved); take before 1st meal")],
    [ss("Ertugliflozin\n(Steglatro)"), sv("5–15 mg/day"), sv("None"), sv("VERTIS CV\n(neutral MACE)"), svb("Weakest outcomes evidence; no HF or CKD indication; last choice")],
]

sglt2_tbl = Table(sglt2_data, colWidths=s_cw_pt, repeatRows=1)
sglt2_tbl.setStyle(TableStyle([
    ('BACKGROUND',    (0,0), (-1,0), NAVY),
    ('TEXTCOLOR',     (0,0), (-1,0), WHITE),
    ('ROWBACKGROUNDS',(0,1), (-1,-1), [GREY, WHITE]),
    ('VALIGN',        (0,0), (-1,-1), 'TOP'),
    ('TOPPADDING',    (0,0), (-1,-1), 4),
    ('BOTTOMPADDING', (0,0), (-1,-1), 4),
    ('LEFTPADDING',   (0,0), (-1,-1), 5),
    ('RIGHTPADDING',  (0,0), (-1,-1), 5),
    ('GRID',          (0,0), (-1,-1), 0.3, MIDGREY),
    ('LINEBELOW',     (0,0), (-1,0),  1.2, TEAL),
    # Empagliflozin highlight
    ('BACKGROUND',    (0,1), (-1,1), colors.HexColor("#E6F9ED")),
    # Dapagliflozin highlight
    ('BACKGROUND',    (0,2), (-1,2), colors.HexColor("#EAF4FB")),
    # Ertugliflozin warning
    ('BACKGROUND',    (0,4), (-1,4), colors.HexColor("#FEF0EE")),
]))

# Side by side
side_by_side = Table(
    [[gliptin_tbl, Spacer(10, 1), sglt2_tbl]],
    colWidths=[content_w/2 - 5, 10, content_w/2 - 5]
)
side_by_side.setStyle(TableStyle([
    ('VALIGN', (0,0), (-1,-1), 'TOP'),
    ('LEFTPADDING',  (0,0), (-1,-1), 0),
    ('RIGHTPADDING', (0,0), (-1,-1), 0),
]))
story.append(side_by_side)
story.append(Spacer(1, 10))

# ── Adverse Effects Summary Box ──────────────────────────────────────────────
story.append(P("4. ADVERSE EFFECTS AT A GLANCE", h1_style))
story.append(Spacer(1, 4))

AE_HDR = S("ae", fontName="Helvetica-Bold", fontSize=8, textColor=WHITE, alignment=TA_CENTER, leading=11)
AE_VAL = S("aev", fontName="Helvetica", fontSize=7.5, textColor=BLACK, leading=11)
AE_BOLD= S("aevb",fontName="Helvetica-Bold", fontSize=7.5, textColor=RED, leading=11)

def aeh(t): return Paragraph(t, AE_HDR)
def aev(t): return Paragraph(t, AE_VAL)
def aered(t): return Paragraph(t, AE_BOLD)

ae_cw = [content_w * p for p in [0.15, 0.10, 0.09, 0.09, 0.09, 0.09, 0.09, 0.10, 0.10, 0.10]]

ae_header = [aeh("Drug Class"), aeh("Hypoglycaemia"), aeh("Weight Gain"), aeh("GI Upset"), aeh("HF Risk"), aeh("DKA Risk"), aeh("Genital\nInfection"), aeh("Pancreatitis"), aeh("Bone / Fracture"), aeh("Renal / Other")]
ae_rows = [
    [aev("Metformin"),         aev("✗ None"),     aev("✗ None"),   aered("✓ Common\n(GI)"),    aev("✗"),   aev("✗"),   aev("✗"),   aev("✗"),   aev("✗"),         aered("Lactic acidosis\n(rare); B12↓")],
    [aev("Sulfonylureas"),     aered("✓✓ High"),  aered("✓ +2–4kg"), aev("Mild"),             aev("✗"),   aev("✗"),   aev("✗"),   aev("✗"),   aev("✗"),         aev("↓ Dose in CKD")],
    [aev("TZDs"),              aev("✗ Low"),      aered("✓ +2–4kg"), aev("Mild"),             aered("✓✓ Contraindicated"), aev("✗"), aev("✗"), aev("✗"), aered("✓ Fractures"), aev("Fluid retention")],
    [aev("DPP-4 Inhibitors"),  aev("✗ Low"),      aev("✗ Neutral"), aev("✗ Minimal"),        aered("Saxagliptin ↑"), aev("✗"),  aev("✗"),  aered("Rare"), aev("Arthralgia"), aev("Linagliptin: no renal adj")],
    [aev("SGLT2 Inhibitors"),  aev("✗ Low"),      aev("✓ Loss 2–4kg"), aev("✗ Minimal"),     aev("✓ Benefit"), aered("✓ Euglycaemic"), aered("✓✓ 3–5%"), aev("✗"), aev("Canagliflozin\n(historical)"), aered("Fournier's\ngangrene (rare)")],
    [aev("GLP-1 RA"),          aev("✗ Low"),      aev("✓✓ Loss 3–5kg"), aered("✓✓ Nausea/vomiting"), aev("✗"), aev("✗"), aev("✗"),  aered("Rare"),  aev("✗"),        aev("Thyroid C-cell\n(rodent only)")],
    [aev("Insulin"),           aered("✓✓ High"), aered("✓✓ Gain"), aev("✗"),                aev("✗"),   aev("✗"),   aev("✗"),   aev("✗"),   aev("✗"),         aev("Dose ↓ in CKD\n(↑ t½)")],
    [aev("Alpha-Glucosidase\nInhibitors"), aev("✗ Low"), aev("✗ Neutral"), aered("✓✓ Flatulence\n(very common)"), aev("✗"), aev("✗"), aev("✗"), aev("✗"), aev("✗"), aev("Avoid eGFR <25")],
]

ae_data = [ae_header] + ae_rows
ae_tbl = Table(ae_data, colWidths=ae_cw, repeatRows=1)
ae_tbl.setStyle(TableStyle([
    ('BACKGROUND',    (0,0), (-1,0), colors.HexColor("#8E44AD")),
    ('TEXTCOLOR',     (0,0), (-1,0), WHITE),
    ('ALIGN',         (0,0), (-1,0), 'CENTER'),
    ('VALIGN',        (0,0), (-1,-1), 'TOP'),
    ('TOPPADDING',    (0,0), (-1,-1), 3),
    ('BOTTOMPADDING', (0,0), (-1,-1), 3),
    ('LEFTPADDING',   (0,0), (-1,-1), 4),
    ('RIGHTPADDING',  (0,0), (-1,-1), 4),
    ('GRID',          (0,0), (-1,-1), 0.3, MIDGREY),
    ('LINEBELOW',     (0,0), (-1,0),  1.2, NAVY),
    ('ROWBACKGROUNDS',(0,1), (-1,-1), [GREY, WHITE]),
    ('FONTSIZE',      (0,1), (-1,-1), 7.5),
]))
story.append(ae_tbl)
story.append(Spacer(1, 10))

# ── Footer note ──────────────────────────────────────────────────────────────
footer_data = [[
    Paragraph(
        "<b>Sources:</b> Goodman &amp; Gilman's Pharmacological Basis of Therapeutics; Lippincott Illustrated Reviews Pharmacology; "
        "EMPA-REG OUTCOME, DAPA-HF, DAPA-CKD, CREDENCE, CANVAS, DECLARE-TIMI 58, EMPEROR-Reduced/Preserved, TECOS, CARMELINA, SAVOR-TIMI 53, EXAMINE. "
        "SMART-C Meta-Analysis <i>Circulation</i> 2024 (PMID 38583093); Network Meta-Analysis <i>JAHA</i> 2024 (PMID 38293914). "
        "<b>Disclaimer:</b> For educational reference only. Always consult current guidelines and individual patient factors for clinical decisions.",
        S("fn", fontName="Helvetica-Oblique", fontSize=6.5, textColor=colors.HexColor("#555555"), leading=9)
    )
]]
footer_tbl = Table(footer_data, colWidths=[content_w])
footer_tbl.setStyle(TableStyle([
    ('BACKGROUND',    (0,0), (-1,-1), colors.HexColor("#EEF2F7")),
    ('TOPPADDING',    (0,0), (-1,-1), 6),
    ('BOTTOMPADDING', (0,0), (-1,-1), 6),
    ('LEFTPADDING',   (0,0), (-1,-1), 8),
    ('RIGHTPADDING',  (0,0), (-1,-1), 8),
    ('BOX',           (0,0), (-1,-1), 0.5, MIDGREY),
]))
story.append(footer_tbl)

# ── Build ─────────────────────────────────────────────────────────────────────
doc.build(story)
print(f"PDF written to: {OUTPUT}")
Running Command

cd /home/daytona/workspace/diabetes-reference && python build_pdf.py 2>&1

Running Command

cd /home/daytona/workspace/diabetes-reference && python -c " import re with open('build_pdf.py', 'r') as f: content = f.read() # Find all string literals with < or > that are inside cell/ind_cell/pref/alt/avoid/aev/sv/gv calls # Strategy: replace < with &lt; and > with &gt; in ALL text strings passed to Paragraph constructors # by doing a targeted replacement in the problematic lines # We'll replace < with &lt; and > with &gt; inside Python string literals only # Print lines with < or > in string content for inspection lines = content.split('\n') for i, line in enumerate(lines, 1): if ('<' in line or '>' in line) and ('def ' not in line) and ('import' not in line) and ('style' not in line) and ('TableStyle' not in line) and ('HexColor' not in line) and ('SGLT2i' not in line.replace('SGLT2i','')) and ('<=>' not in line): print(f'{i}: {line}') " 2>&1 | head -60

Editing File

~/diabetes-reference/build_pdf.py

Successfully replaced 1 instance(s) of the string in '/home/daytona/workspace/diabetes-reference/build_pdf.py'
Running Command

cd /home/daytona/workspace/diabetes-reference && python -c " with open('build_pdf.py', 'r') as f: content = f.read() # Replace < and > in plain text strings (not in HTML tags or Python syntax) # These are the specific problematic plain-text occurrences replacements = [ ('eGFR <20 (no glucose benefit)', 'eGFR &lt;20 (no glucose benefit)'), ('Avoid eGFR <20', 'Avoid eGFR &lt;20'), ('Renoprotective even at lower eGFR;\nAvoid eGFR <20', 'Renoprotective even at lower eGFR;\nAvoid eGFR &lt;20'), ('Avoid if eGFR <25', 'Avoid if eGFR &lt;25'), ('eGFR <30: 25 mg', 'eGFR &lt;30: 25 mg'), ('eGFR <30: 6.25 mg', 'eGFR &lt;30: 6.25 mg'), ('eGFR <50', 'eGFR &lt;50'), ('Metformin <eGFR 30', 'Metformin &lt;eGFR 30'), ('Metformin if eGFR <30', 'Metformin if eGFR &lt;30'), ('SGLT2i if eGFR <20', 'SGLT2i if eGFR &lt;20'), ('CrCl >20 mL/min', 'CrCl &gt;20 mL/min'), ('BMI >30', 'BMI &gt;30'), ('\n(very uncontrolled, >10%)', '\n(very uncontrolled, &gt;10%)'), ('eGFR &lt;30: 25 mg', 'eGFR &lt;30: 25 mg'), # already done ] for old, new in replacements: if old in content: content = content.replace(old, new) print(f'Replaced: {old[:50]}') with open('build_pdf.py', 'w') as f: f.write(content) print('Done') "

Running Command

cd /home/daytona/workspace/diabetes-reference && python -c " # Also fix the >10% line and any remaining unescaped < > in plain text with open('build_pdf.py', 'r') as f: content = f.read() content = content.replace('(very uncontrolled, >10%)', '(very uncontrolled, &gt;10%)') content = content.replace('(very uncontrolled, &gt;10%)', '(very uncontrolled, &gt;10%)') # idempotent with open('build_pdf.py', 'w') as f: f.write(content) print('Done') " python build_pdf.py 2>&1

Running Command

ls -lh /home/daytona/workspace/diabetes-reference/Diabetes_Drugs_Quick_Reference.pdf

Your quick-reference PDF is ready:

Diabetes Drugs Quick Reference

PDF Document · PDF


It's a 3-page landscape A4 document containing:
Page 1 — Master Drug Class Comparison Table All 8 drug classes (Metformin, Sulfonylureas, Meglitinides, TZDs, DPP-4i, SGLT2i, GLP-1 RA, Insulin, Alpha-glucosidase inhibitors, Pramlintide) compared across HbA1c reduction, weight, hypoglycemia risk, CV benefit, HF benefit, renal protection, adverse effects, and CKD dosing.
Page 2 — Indication-Based Drug Selection Guide 12 clinical scenarios (T2DM alone, +CVD, +HF, +CKD, +obesity, perioperative, pregnancy, T1DM, post-MI, hypoglycemia risk) with first choice, alternatives, and drugs to avoid for each.
Page 3 — Individual Gliptin vs SGLT2i Profiles + Adverse Effects Table Side-by-side profiles of all 5 gliptins and 4 SGLT2 inhibitors with their CV/renal trial data, plus a color-coded adverse effects matrix across all drug classes.
Color-coded highlights: green rows = preferred agents (linagliptin for CKD, empagliflozin/dapagliflozin for outcomes), red rows = agents to use cautiously (saxagliptin, ertugliflozin). Sources cited include Goodman & Gilman, Lippincott, and 2024 meta-analyses from Circulation and JAHA.

Search for latest 2025-2026 diabetes guidelines (ADA, EASD, BSC)

Searching PubMed

ADA "Standards of Care in Diabetes" 2025

Searching PubMed

EASD diabetes management guidelines 2025

Searching the Web

ADA Standards of Care Diabetes 2025 2026 key updates guidelines

Searching PubMed

"Standards of Care" diabetes 2025 American Diabetes Association

Searching the Web

ADA diabetes standards of care 2025 updates site:diabetesjournals.org OR site:care.diabetesjournals.org

Reading Article

PMID: 39651989

Reading Article

PMID: 39651970

Searching the Web

ADA Standards of Care Diabetes 2026 key changes updates summary

Reading Web Page

https://www.niddk.nih.gov/health-information/professionals/d…

Searching PubMed

EASD ADA consensus hyperglycemia type 2 diabetes management 2025

Searching the Web

EASD diabetes guidelines 2025 2026 update European Association Study Diabetes

Searching PubMed

"Standards of Care" diabetes 2026

Reading Article

PMID: 41358900

Reading Article

PMID: 41358894

Reading Web Page

https://diabetesjournals.org/care/issue/48/Supplement_1

I now have solid data from multiple sources. Here's the comprehensive summary:

Latest Diabetes Guidelines: ADA 2025 & 2026 + EASD 2025

Note on "BSC": There is no major diabetes guideline body with that acronym. You may be thinking of:
  • ABCD (Association of British Clinical Diabetologists)
  • NICE (UK National Institute for Health and Care Excellence)
  • CDA/Diabetes Canada
  • IDF (International Diabetes Federation)
Let me know and I can search for those specifically.

ADA Standards of Care in Diabetes - 2025

Published: January 2025, Diabetes Care Vol. 48 Supplement 1
PMIDs: Section 9 (Pharmacology) 39651989 | Section 10 (CV) 39651970 | Section 6 (Glycemic Goals) 39651981

Key 2025 Updates

1. Pharmacologic Treatment (Section 9)
  • GLP-1 receptor agonists are now recommended for T2DM + CKD to reduce CV risk and slow kidney disease progression - not just as glucose-lowering agents but as organ-protective therapy
  • For T2DM + obesity + HFpEF (heart failure with preserved ejection fraction): GLP-1 RA now specifically recommended to reduce HF symptoms and improve quality of life
  • GIP/GLP-1 dual agonist (tirzepatide) explicitly incorporated into treatment algorithms alongside GLP-1 RAs
2. Liver Disease (NAFLD/MASLD)
  • For T2DM + obesity + MASLD: recommend GLP-1 RA or GIP/GLP-1 agonist (tirzepatide)
  • For moderate/advanced liver fibrosis: consider thyroid hormone receptor-beta agonist (resmetirom - newly FDA-approved) and refer to hepatology
3. Type 1 Diabetes Risk Screening
  • New recommendation: antibody-based testing for asymptomatic individuals with family history of T1DM
  • Positive screen: repeat antibody test within 3 months; staging by number of positive antibodies
4. Diabetes Technology
  • CGM reaffirmed as standard; expanded guidance on automated insulin delivery (AID) systems
  • New guidance on integrating CGM data into clinical visits and time-in-range (TIR) targets
5. Nutrition
  • New emphasis on evidence-based dietary patterns
  • Monitor for malnutrition in patients post-bariatric surgery or on weight-loss medications
  • Mediterranean, DASH, and low-carbohydrate diets all recognized
6. Glycemic Goals (Section 6)
  • HbA1c target <7% remains standard for most adults
  • Individualized targets: <6.5% if achievable without significant hypoglycemia; <8% for older/frail patients

ADA Standards of Care in Diabetes - 2026

Published: January 2026, Diabetes Caremost current version as of today
PMIDs: Section 9 (Pharmacology) 41358900 | Section 6 (Glycemic Goals) 41358894 | Section 11 (CKD) 41358881 | Section 2 (Diagnosis) 41358893
The 2026 edition is now the active guideline. The full-text sections are published in Diabetes Care January 2026 supplement (DOI prefix: 10.2337/dc26-S0XX). The ADA website also has a 2026 Abridged Standards from the Primary Care Advisory Group for frontline use. The PubMed abstracts for the 2026 sections do not include detailed changes (standard template), so specific 2026 updates beyond what the ADA website confirms are best accessed via the full sections directly.

EASD Guidelines 2025

Annual Meeting: Vienna, Austria, September 19-22, 2025

Key 2025 EASD Developments

1. ADA/EASD Consensus Report on T1DM Management (2026 draft, presented at EASD 2025)
  • Co-chaired by Prof. Anne Peters and Prof. Richard Holt
  • Updates the landmark 2021 ADA/EASD T1DM consensus report
  • Major changes:
    • CGM reaffirmed as standard of care for all T1DM; fingerstick as backup only
    • Automated Insulin Delivery (AID) systems are now the preferred insulin delivery method - strongest evidence upgrade in years
    • GLP-1 RA and SGLT2 inhibitors: emerging role for cardiovascular protection in T1DM (not yet formally recommended for glucose control in T1DM, but CV role acknowledged)
    • Obesity management in T1DM now explicitly addressed: behavioral, pharmacologic (GLP-1 RA), and bariatric surgery all valid
    • BP target tightened: treat to <120/80 mmHg
    • Statins: start in adults ≥40 years, or younger if high CV risk
    • New full section on psychosocial care and diabetes distress
2. EASD First-Ever Clinical Practice Guideline on Diabetes Distress (launched EASD 2025)
  • World's first formal guideline on diabetes distress
  • Recommends routine validated screening for diabetes distress at every consultation
  • Requires referral pathway to mental health professionals
3. 2024 ADA/EASD/JBDS/AACE/DST Joint Consensus on DKA Management
  • Published in 2024, referenced in 2025 literature [PMID: 40257014]
  • Clarifies remaining controversies in DKA management across guidelines

Summary: What's Changed Most in 2025-2026

ThemeDirection of Change
GLP-1 RA roleExpanded - now recommended for CKD, HFpEF, MASLD, and T1DM CV protection
Tirzepatide (GIP/GLP-1)Formally incorporated into treatment algorithms
SGLT2i roleMaintained strong recommendation; CKD section now a standalone section in 2026 (Section 11)
T1DM technologyAID systems upgraded to preferred delivery method
Liver diseaseSpecific drug recommendations added (resmetirom for fibrosis)
Diabetes distressNow a formal guideline domain (EASD 2025)
T1DM risk screeningAntibody testing now recommended proactively in at-risk individuals
BP targets in T1DMTightened to <120/80 mmHg

The ADA 2026 Standards (professional.diabetes.org) are the current operative guidelines. If you'd like, I can search for the specific NICE, ABCD, or Diabetes Canada guidelines you may have meant by "BSC."
This is a shared conversation. Sign in to Orris to start your own chat.