Which gliptin is supposed to be best
DPP-4 inhibitors gliptins comparison efficacy safety
PMID: 41918146
| Drug | Brand | Dose | Renal adjustment needed? |
|---|---|---|---|
| Sitagliptin | Januvia | 100 mg/day | Yes |
| Linagliptin | Tradjenta | 5 mg/day | No |
| Saxagliptin | Onglyza | 5 mg/day | Yes |
| Alogliptin | Nesina | 25 mg/day | Yes |
| Vildagliptin | (EU only) | 50 mg 1-2x/day | Yes |
| Clinical scenario | Preferred gliptin |
|---|---|
| CKD / renal impairment (any stage) | Linagliptin (no renal dose adjustment) |
| Need for most clinical evidence | Sitagliptin |
| Heart failure risk | Avoid saxagliptin; prefer sitagliptin or linagliptin |
| On strong CYP3A4 inhibitors | Avoid saxagliptin; prefer others |
| General T2DM, normal renal function | Any gliptin; sitagliptin or linagliptin most commonly used |
Which is best SGLT 2 inhibitor
SGLT2 inhibitors cardiovascular renal outcomes comparison
PMID: 38293914
PMID: 38583093
| Drug | Brand | Doses |
|---|---|---|
| Canagliflozin | Invokana | 100, 300 mg/day |
| Dapagliflozin | Farxiga | 5, 10 mg/day |
| Empagliflozin | Jardiance | 10, 25 mg/day |
| Ertugliflozin | Steglatro | 5, 15 mg/day |
| Clinical scenario | Best choice |
|---|---|
| T2DM + established CVD, mortality reduction | Empagliflozin (strongest CV death data) |
| Heart failure with reduced EF (HFrEF), with or without T2DM | Dapagliflozin or Empagliflozin (both approved) |
| Diabetic nephropathy / CKD protection | Canagliflozin (CREDENCE) or Dapagliflozin (DAPA-CKD) |
| CKD without diabetes | Dapagliflozin (DAPA-CKD included non-diabetics) |
| General T2DM glycemic control only | Any agent; avoid ertugliflozin if CV/renal benefit desired |
| Avoid if possible | Ertugliflozin (weakest outcomes evidence) |
Create a comparison table of gliptins vs SGLT2i for my reference
| Feature | Gliptins (DPP-4i) | SGLT2 Inhibitors (Gliflozins) |
|---|---|---|
| Examples | Sitagliptin, Linagliptin, Saxagliptin, Alogliptin | Empagliflozin, Dapagliflozin, Canagliflozin, Ertugliflozin |
| Mechanism | Inhibit DPP-4 enzyme → prolong GLP-1/GIP activity → ↑ insulin, ↓ glucagon | Block SGLT2 in proximal renal tubule → ↑ urinary glucose excretion |
| Route | Oral, once daily | Oral, once daily |
| HbA1c reduction | 0.4–0.8% | 0.7–1.0% |
| Weight effect | Neutral (no change) | Weight loss 2–4 kg |
| Blood pressure | Neutral | ↓ Systolic BP 2–4 mmHg |
| Hypoglycemia risk | Low (monotherapy) | Low (monotherapy) |
| CV mortality benefit | None (CV neutral) | Yes — especially empagliflozin, canagliflozin |
| MACE reduction | No | Yes (~9% reduction as class) |
| Heart failure benefit | None (saxagliptin ↑ HF risk) | Strong — all reduce HF hospitalizations; dapagliflozin/empagliflozin approved for HFrEF |
| Renal protection | None | Yes — canagliflozin, dapagliflozin, empagliflozin slow CKD progression |
| Use in HFrEF | Avoid saxagliptin; others cautious | Preferred (dapagliflozin, empagliflozin) |
| Use in CKD | Linagliptin: safe at any eGFR (no renal dose adjust); others need dose reduction | Efficacy ↓ in stage 3 CKD; avoid if eGFR <20–30; still renoprotective even at lower eGFR |
| Renal dosing | Linagliptin: none needed. Sitagliptin/alogliptin/saxagliptin: dose reduce | All need caution; not for severe renal impairment for glycemic use |
| Drug interactions | Saxagliptin: CYP3A4 interactions (dose halve with strong inhibitors) | Minimal |
| Common side effects | Nasopharyngitis, headache | Genital mycotic infections (3–5%), UTI (~2%), urinary frequency |
| Serious side effects | Pancreatitis (rare), severe joint pain (arthralgia), hypersensitivity | Euglycemic DKA (rare), Fournier's gangrene (very rare), volume depletion/hypotension |
| Bone/amputation risk | None | Canagliflozin: historical fracture/amputation signal (warning removed); not seen with others |
| GI side effects | Minimal | Minimal (unlike GLP-1 agonists) |
| Use in T1DM | Not indicated | Not standard; off-label with caution (DKA risk) |
| Perioperative use | Can continue | Stop 3–4 days before surgery (euglycemic DKA risk) |
| Pancreatitis risk | Rare but reported (class effect) | Not associated |
| Approved beyond T2DM | No | Yes — HFrEF, HFpEF (empagliflozin), CKD (dapagliflozin) regardless of diabetes |
| Cost/availability | Sitagliptin now generic (lower cost) | Still mostly branded; higher cost |
| Best agent in class | Linagliptin (renal safety) or Sitagliptin (evidence depth) | Empagliflozin (CV mortality) or Dapagliflozin (breadth of indications) |
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
ls -la /home/daytona/workspace/ 2>/dev/null || echo "workspace not found"
mkdir -p /home/daytona/workspace/diabetes-reference
~/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 & 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}")
cd /home/daytona/workspace/diabetes-reference && python build_pdf.py 2>&1
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 < and > with > in ALL text strings passed to Paragraph constructors # by doing a targeted replacement in the problematic lines # We'll replace < with < and > with > 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
~/diabetes-reference/build_pdf.py
Successfully replaced 1 instance(s) of the string in '/home/daytona/workspace/diabetes-reference/build_pdf.py'
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 <20 (no glucose benefit)'), ('Avoid eGFR <20', 'Avoid eGFR <20'), ('Renoprotective even at lower eGFR;\nAvoid eGFR <20', 'Renoprotective even at lower eGFR;\nAvoid eGFR <20'), ('Avoid if eGFR <25', 'Avoid if eGFR <25'), ('eGFR <30: 25 mg', 'eGFR <30: 25 mg'), ('eGFR <30: 6.25 mg', 'eGFR <30: 6.25 mg'), ('eGFR <50', 'eGFR <50'), ('Metformin <eGFR 30', 'Metformin <eGFR 30'), ('Metformin if eGFR <30', 'Metformin if eGFR <30'), ('SGLT2i if eGFR <20', 'SGLT2i if eGFR <20'), ('CrCl >20 mL/min', 'CrCl >20 mL/min'), ('BMI >30', 'BMI >30'), ('\n(very uncontrolled, >10%)', '\n(very uncontrolled, >10%)'), ('eGFR <30: 25 mg', 'eGFR <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') "
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, >10%)') content = content.replace('(very uncontrolled, >10%)', '(very uncontrolled, >10%)') # idempotent with open('build_pdf.py', 'w') as f: f.write(content) print('Done') " python build_pdf.py 2>&1
ls -lh /home/daytona/workspace/diabetes-reference/Diabetes_Drugs_Quick_Reference.pdf
Diabetes Drugs Quick Reference
PDF Document · PDF
Search for latest 2025-2026 diabetes guidelines (ADA, EASD, BSC)
ADA "Standards of Care in Diabetes" 2025
EASD diabetes management guidelines 2025
ADA Standards of Care Diabetes 2025 2026 key updates guidelines
"Standards of Care" diabetes 2025 American Diabetes Association
ADA diabetes standards of care 2025 updates site:diabetesjournals.org OR site:care.diabetesjournals.org
PMID: 39651989
PMID: 39651970
ADA Standards of Care Diabetes 2026 key changes updates summary
https://www.niddk.nih.gov/health-information/professionals/d…
EASD ADA consensus hyperglycemia type 2 diabetes management 2025
EASD diabetes guidelines 2025 2026 update European Association Study Diabetes
"Standards of Care" diabetes 2026
PMID: 41358900
PMID: 41358894
https://diabetesjournals.org/care/issue/48/Supplement_1
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.
| Theme | Direction of Change |
|---|---|
| GLP-1 RA role | Expanded - now recommended for CKD, HFpEF, MASLD, and T1DM CV protection |
| Tirzepatide (GIP/GLP-1) | Formally incorporated into treatment algorithms |
| SGLT2i role | Maintained strong recommendation; CKD section now a standalone section in 2026 (Section 11) |
| T1DM technology | AID systems upgraded to preferred delivery method |
| Liver disease | Specific drug recommendations added (resmetirom for fibrosis) |
| Diabetes distress | Now a formal guideline domain (EASD 2025) |
| T1DM risk screening | Antibody testing now recommended proactively in at-risk individuals |
| BP targets in T1DM | Tightened to <120/80 mmHg |