What is treatment protocol of DKA
"diabetic ketoacidosis" AND management
| Severity | pH | HCO3 | Anion Gap | Mental Status |
|---|---|---|---|---|
| Mild | 7.25-7.30 | 15-18 | >10 | Alert |
| Moderate | 7.00-7.24 | 10-14 | >12 | Alert/drowsy |
| Severe | <7.00 | <10 | >12 | Stupor/coma |
Note: Fluid resuscitation alone can drop plasma glucose ~18% and improve acidosis before insulin is given, by improving tissue perfusion, lactate clearance, and renal glucose excretion.
| Serum Potassium | Action |
|---|---|
| <3.3 mEq/L | Do NOT give insulin - replete K first; give 20-40 mEq/h IV until K ≥3.3 mEq/L |
| 3.3-5.5 mEq/L | Add 20-40 mEq KCl per liter of IV fluid; start insulin |
| >5.5 mEq/L | Hold potassium supplementation; start insulin; recheck K frequently |
2024-2026 evidence update: A recent meta-analysis (PMID 39090718) confirmed subcutaneous insulin is comparable to continuous IV infusion in adult DKA. A 2026 meta-analysis of RCTs (PMID 41208563) found that early co-administration of SC basal insulin alongside IV infusion reduces rebound hyperglycemia and may shorten DKA resolution time.
| Parameter | Frequency |
|---|---|
| Blood glucose | Every hour |
| Serum K+, Cl-, HCO3, Na | Every 2-4 hours |
| ABG / venous pH | As needed (especially if severely acidotic) |
| β-hydroxybutyrate | Serial measurements to track ketosis resolution |
| Urine output | Continuous |
| Vital signs | Continuous |
Create a quick-reference DKA protocol card (PDF) for the ICU
ls /home/daytona/workspace/ 2>/dev/null || echo "workspace empty or not found"
mkdir -p /home/daytona/workspace/dka-protocol && python3 -c "from reportlab.lib …
~/dka-protocol/generate_dka_card.py
from reportlab.lib.pagesizes import A4
from reportlab.lib import colors
from reportlab.lib.units import mm, cm
from reportlab.platypus import (
SimpleDocTemplate, Table, TableStyle, Paragraph,
Spacer, HRFlowable
)
from reportlab.lib.styles import ParagraphStyle
from reportlab.lib.enums import TA_CENTER, TA_LEFT
from reportlab.platypus import KeepTogether
OUTPUT = "/home/daytona/workspace/dka-protocol/DKA_Protocol_Card.pdf"
# ── Colour palette ─────────────────────────────────────────────────────────────
NAVY = colors.HexColor("#0D2B4E")
TEAL = colors.HexColor("#0B7A75")
AMBER = colors.HexColor("#E07B00")
RED = colors.HexColor("#C0392B")
LIGHT_BG = colors.HexColor("#F4F8FB")
AMBER_BG = colors.HexColor("#FFF7E6")
RED_BG = colors.HexColor("#FFF0EE")
WHITE = colors.white
GREY = colors.HexColor("#6B7280")
MID_GREY = colors.HexColor("#E5E7EB")
# ── Styles ─────────────────────────────────────────────────────────────────────
def S(name, **kw):
return ParagraphStyle(name, **kw)
H_CARD = S("hcard", fontSize=18, leading=22, textColor=WHITE, fontName="Helvetica-Bold", alignment=TA_CENTER)
SUBHEAD = S("subh", fontSize=9, leading=11, textColor=WHITE, fontName="Helvetica-Bold", alignment=TA_CENTER)
SEC_HDR = S("sechdr", fontSize=9, leading=11, textColor=WHITE, fontName="Helvetica-Bold")
BODY = S("body", fontSize=8, leading=10, textColor=colors.black, fontName="Helvetica")
BODY_B = S("bodyb", fontSize=8, leading=10, textColor=colors.black, fontName="Helvetica-Bold")
SMALL = S("small", fontSize=7, leading=9, textColor=GREY, fontName="Helvetica")
WARN = S("warn", fontSize=8, leading=10, textColor=RED, fontName="Helvetica-Bold")
TBL_HDR = S("tblh", fontSize=7.5, leading=9, textColor=WHITE, fontName="Helvetica-Bold", alignment=TA_CENTER)
TBL_CEL = S("tblc", fontSize=7.5, leading=9.5, textColor=colors.black, fontName="Helvetica")
TBL_B = S("tblcb", fontSize=7.5, leading=9.5, textColor=colors.black, fontName="Helvetica-Bold")
NOTE = S("note", fontSize=7, leading=9, textColor=GREY, fontName="Helvetica-Oblique")
FOOT = S("foot", fontSize=6.5,leading=8, textColor=GREY, fontName="Helvetica", alignment=TA_CENTER)
def section_header(text, bg=NAVY):
return Table(
[[Paragraph(text, SEC_HDR)]],
colWidths=["100%"],
style=TableStyle([
("BACKGROUND", (0,0), (-1,-1), bg),
("LEFTPADDING", (0,0), (-1,-1), 6),
("RIGHTPADDING", (0,0), (-1,-1), 6),
("TOPPADDING", (0,0), (-1,-1), 4),
("BOTTOMPADDING",(0,0), (-1,-1), 4),
("ROUNDEDCORNERS", [3]),
])
)
def p(txt, style=BODY):
return Paragraph(txt, style)
def sp(h=4):
return Spacer(1, h)
# ── Document setup ─────────────────────────────────────────────────────────────
doc = SimpleDocTemplate(
OUTPUT,
pagesize=A4,
leftMargin=12*mm, rightMargin=12*mm,
topMargin=12*mm, bottomMargin=12*mm,
title="DKA ICU Protocol Quick-Reference Card",
author="Orris Clinical Reference"
)
W = A4[0] - 24*mm # usable width
story = []
# ══════════════════════════════════════════════════════════════════════════════
# HEADER BANNER
# ══════════════════════════════════════════════════════════════════════════════
header_tbl = Table(
[[
Paragraph("DKA ICU PROTOCOL", H_CARD),
Paragraph("Quick-Reference Card<br/><font size=8>Adult & Paediatric</font>", SUBHEAD)
]],
colWidths=[W*0.62, W*0.38],
style=TableStyle([
("BACKGROUND", (0,0), (-1,-1), NAVY),
("LEFTPADDING", (0,0), (-1,-1), 10),
("RIGHTPADDING", (0,0), (-1,-1), 10),
("TOPPADDING", (0,0), (-1,-1), 8),
("BOTTOMPADDING",(0,0), (-1,-1), 8),
("VALIGN", (0,0), (-1,-1), "MIDDLE"),
("ROUNDEDCORNERS", [5]),
])
)
story += [header_tbl, sp(6)]
# ══════════════════════════════════════════════════════════════════════════════
# SEVERITY CLASSIFICATION
# ══════════════════════════════════════════════════════════════════════════════
story += [section_header("SEVERITY CLASSIFICATION"), sp(3)]
sev_data = [
[p("Parameter", TBL_HDR), p("Mild", TBL_HDR), p("Moderate", TBL_HDR), p("Severe", TBL_HDR)],
[p("pH", TBL_B), p("7.25–7.30", TBL_CEL), p("7.00–7.24", TBL_CEL), p("< 7.00", TBL_CEL)],
[p("HCO₃⁻", TBL_B), p("15–18 mEq/L", TBL_CEL), p("10–14 mEq/L", TBL_CEL), p("< 10 mEq/L", TBL_CEL)],
[p("Anion Gap", TBL_B), p("> 10", TBL_CEL), p("> 12", TBL_CEL), p("> 12", TBL_CEL)],
[p("Mental Status", TBL_B), p("Alert", TBL_CEL), p("Alert / Drowsy", TBL_CEL), p("Stupor / Coma", TBL_CEL)],
[p("Setting", TBL_B), p("Ward / SC insulin", TBL_CEL), p("HDU / IV insulin", TBL_CEL), p("ICU mandatory", TBL_CEL)],
]
sev_tbl = Table(sev_data, colWidths=[W*0.22, W*0.22, W*0.26, W*0.30],
style=TableStyle([
("BACKGROUND", (0,0), (-1,0), NAVY),
("BACKGROUND", (0,1), (0,-1), LIGHT_BG),
("ROWBACKGROUNDS",(1,1),(-1,-1), [WHITE, LIGHT_BG]),
("GRID", (0,0), (-1,-1), 0.4, MID_GREY),
("VALIGN", (0,0), (-1,-1), "MIDDLE"),
("ALIGN", (1,0), (-1,-1), "CENTER"),
("TOPPADDING", (0,0), (-1,-1), 3),
("BOTTOMPADDING",(0,0), (-1,-1), 3),
("LEFTPADDING", (0,0), (-1,-1), 5),
])
)
story += [sev_tbl, sp(6)]
# ══════════════════════════════════════════════════════════════════════════════
# TWO-COLUMN LAYOUT: Fluids | Potassium
# ══════════════════════════════════════════════════════════════════════════════
# Left col: IV Fluids
fluid_inner = [
[p("• Fluid deficit: <b>7–9% body weight</b> (~3–5 L adult)", TBL_CEL)],
[p("<b>Phase 1 – Restore circulation:</b>", TBL_CEL)],
[p(" 0.9% NS: <b>1 L bolus</b>, then <b>500–1000 mL/h</b>", TBL_CEL)],
[p(" Shock: NS wide open (child: 20 mL/kg) → SBP >80 mmHg", TBL_CEL)],
[p("<b>Phase 2 – Replenish total water:</b>", TBL_CEL)],
[p(" 0.45% NS at <b>150–500 mL/h</b>", TBL_CEL)],
[p(" (Use 0.9% NS if hyponatraemic)", TBL_CEL)],
[p(" Max correction: <b>3 mOsm/kg/h</b> UO target: 1–2 mL/kg/h", TBL_CEL)],
[p(" Positive balance over <b>12–24 h</b>", TBL_CEL)],
[p("• Add D5W when BG ≤250 mg/dL (consider 2-bag approach)", TBL_CEL)],
]
fluid_tbl = Table(fluid_inner, colWidths=[(W/2)-4],
style=TableStyle([
("LEFTPADDING", (0,0), (-1,-1), 5),
("RIGHTPADDING", (0,0), (-1,-1), 5),
("TOPPADDING", (0,0), (-1,-1), 2),
("BOTTOMPADDING", (0,0), (-1,-1), 2),
("BACKGROUND", (0,0), (-1,-1), LIGHT_BG),
])
)
# Right col: Potassium
k_data_inner = [
[p("Check K⁺ before insulin — DO NOT give insulin if K < 3.3 mEq/L", WARN)],
[sp(2)],
[Table(
[
[p("<b>K⁺ level</b>", TBL_HDR), p("<b>Action</b>", TBL_HDR)],
[p("< 3.3 mEq/L", TBL_B), p("Give 20–40 mEq/h IV; hold insulin", TBL_CEL)],
[p("3.3–5.5 mEq/L", TBL_B), p("Add 20–40 mEq KCl/L fluid + start insulin", TBL_CEL)],
[p("> 5.5 mEq/L", TBL_B), p("Hold K⁺ supplement; start insulin; monitor", TBL_CEL)],
],
colWidths=[W*0.15, (W/2 - W*0.15 - 8)],
style=TableStyle([
("BACKGROUND", (0,0), (-1,0), TEAL),
("ROWBACKGROUNDS",(0,1),(-1,-1), [WHITE, LIGHT_BG]),
("GRID", (0,0), (-1,-1), 0.3, MID_GREY),
("TOPPADDING", (0,0), (-1,-1), 2),
("BOTTOMPADDING",(0,0), (-1,-1), 2),
("LEFTPADDING", (0,0), (-1,-1), 4),
])
)],
[p("• Telemetry monitoring throughout", NOTE)],
]
k_inner_tbl = Table(k_data_inner, colWidths=[(W/2)-4],
style=TableStyle([
("LEFTPADDING", (0,0), (-1,-1), 5),
("RIGHTPADDING", (0,0), (-1,-1), 5),
("TOPPADDING", (0,0), (-1,-1), 2),
("BOTTOMPADDING", (0,0), (-1,-1), 2),
("BACKGROUND", (0,0), (-1,-1), AMBER_BG),
])
)
col2_tbl = Table(
[[
Table([[section_header("IV FLUIDS", TEAL)], [sp(3)], [fluid_tbl]], colWidths=[(W/2)-4]),
Table([[section_header("POTASSIUM REPLACEMENT", AMBER)], [sp(3)], [k_inner_tbl]], colWidths=[(W/2)-4]),
]],
colWidths=[W/2, W/2],
style=TableStyle([
("VALIGN", (0,0), (-1,-1), "TOP"),
("LEFTPADDING", (0,0), (-1,-1), 0),
("RIGHTPADDING", (0,0), (-1,-1), 4),
("TOPPADDING", (0,0), (-1,-1), 0),
("BOTTOMPADDING",(0,0), (-1,-1), 0),
])
)
story += [col2_tbl, sp(6)]
# ══════════════════════════════════════════════════════════════════════════════
# INSULIN PROTOCOL
# ══════════════════════════════════════════════════════════════════════════════
story += [section_header("INSULIN PROTOCOL (only after K⁺ ≥ 3.3 mEq/L)"), sp(3)]
ins_data = [
[p("Route", TBL_HDR), p("Dose", TBL_HDR), p("Target / Notes", TBL_HDR)],
[p("IV infusion (preferred)", TBL_B),
p("Regular insulin 0.1 units/kg/h<br/><i>Prep: 100 u in 100 mL NS → 10 mL/h = 10 u/h</i>", TBL_CEL),
p("BG drop: <b>50–75 mg/dL/h</b> (2.8–4.2 mmol/L/h)<br/>Do NOT exceed 100 mg/dL/h drop", TBL_CEL)],
[p("IV bolus (optional)", TBL_B),
p("0.1 units/kg bolus before infusion", TBL_CEL),
p("Not routinely recommended (ADA)", TBL_CEL)],
[p("When BG ≤ 250 mg/dL", TBL_B),
p("Reduce infusion to 0.05 units/kg/h<br/>+ Add D5W to fluids", TBL_CEL),
p("Continue insulin until ketoacidosis resolves, not just until BG normalises", TBL_CEL)],
[p("Transition to SC", TBL_B),
p("Give SC basal insulin <b>2 h before</b> stopping IV infusion", TBL_CEL),
p("Prevents rebound hyperglycaemia", TBL_CEL)],
[p("Mild DKA (SC route)", TBL_B),
p("SC / IM regular insulin acceptable", TBL_CEL),
p("IV preferred if poor perfusion / sicker patient", TBL_CEL)],
]
ins_tbl = Table(ins_data, colWidths=[W*0.20, W*0.40, W*0.40],
style=TableStyle([
("BACKGROUND", (0,0), (-1,0), TEAL),
("ROWBACKGROUNDS",(0,1),(-1,-1), [WHITE, LIGHT_BG]),
("GRID", (0,0), (-1,-1), 0.4, MID_GREY),
("VALIGN", (0,0), (-1,-1), "MIDDLE"),
("TOPPADDING", (0,0), (-1,-1), 3),
("BOTTOMPADDING", (0,0), (-1,-1), 3),
("LEFTPADDING", (0,0), (-1,-1), 5),
])
)
story += [ins_tbl, sp(6)]
# ══════════════════════════════════════════════════════════════════════════════
# BICARBONATE | PHOSPHATE & MAGNESIUM
# ══════════════════════════════════════════════════════════════════════════════
bicarb_rows = [
[p("NOT routinely recommended", WARN)],
[p("<b>Consider ONLY if ANY of:</b>", TBL_CEL)],
[p(" • Shock or coma", TBL_CEL)],
[p(" • pH < 6.9", TBL_CEL)],
[p(" • HCO₃⁻ < 5 mEq/L", TBL_CEL)],
[p(" • Cardiac / respiratory dysfunction", TBL_CEL)],
[p(" • Severe hyperkalaemia", TBL_CEL)],
[p("<b>Dose:</b> 50–100 mEq in 1 L 0.45% NS over 30–60 min<br/>Always add <b>10 mEq KCl</b> to avoid hypokalaemia<br/>Monitor arterial pH closely", TBL_CEL)],
]
bicarb_inner = Table(bicarb_rows, colWidths=[(W/2)-4],
style=TableStyle([
("LEFTPADDING", (0,0), (-1,-1), 5),
("TOPPADDING", (0,0), (-1,-1), 2),
("BOTTOMPADDING", (0,0), (-1,-1), 2),
("BACKGROUND", (0,0), (-1,-1), RED_BG),
])
)
phos_rows = [
[p("<b>Phosphate:</b> Not routinely replaced", TBL_CEL)],
[p(" Replace if PO₄ < 1.0 mEq/L → use KPhos IV", TBL_CEL)],
[p("<b>Magnesium:</b>", TBL_CEL)],
[p(" 1–2 g MgSO₄ IV if ventricular arrhythmia", TBL_CEL)],
[p(" Serum Mg may not reflect body stores", NOTE)],
]
phos_inner = Table(phos_rows, colWidths=[(W/2)-4],
style=TableStyle([
("LEFTPADDING", (0,0), (-1,-1), 5),
("TOPPADDING", (0,0), (-1,-1), 2),
("BOTTOMPADDING", (0,0), (-1,-1), 2),
("BACKGROUND", (0,0), (-1,-1), LIGHT_BG),
])
)
col3_tbl = Table(
[[
Table([[section_header("BICARBONATE", RED)], [sp(3)], [bicarb_inner]], colWidths=[(W/2)-4]),
Table([[section_header("PHOSPHATE & MAGNESIUM", TEAL)], [sp(3)], [phos_inner]], colWidths=[(W/2)-4]),
]],
colWidths=[W/2, W/2],
style=TableStyle([
("VALIGN", (0,0), (-1,-1), "TOP"),
("LEFTPADDING", (0,0), (-1,-1), 0),
("RIGHTPADDING", (0,0), (-1,-1), 4),
("TOPPADDING", (0,0), (-1,-1), 0),
("BOTTOMPADDING",(0,0), (-1,-1), 0),
])
)
story += [col3_tbl, sp(6)]
# ══════════════════════════════════════════════════════════════════════════════
# MONITORING
# ══════════════════════════════════════════════════════════════════════════════
story += [section_header("MONITORING"), sp(3)]
mon_data = [
[p("Parameter", TBL_HDR), p("Frequency", TBL_HDR), p("Key Point", TBL_HDR)],
[p("Blood glucose", TBL_B), p("Every 1 h", TBL_CEL), p("Target drop 50–75 mg/dL/h; start D5W when BG ≤250 mg/dL", TBL_CEL)],
[p("K⁺, Na, Cl, HCO₃⁻", TBL_B), p("Every 2–4 h", TBL_CEL), p("Na should rise as BG falls; if not → over-hydration with free water", TBL_CEL)],
[p("ABG / venous pH", TBL_B), p("As needed", TBL_CEL), p("Use HCO₃⁻ normalisation (not AG closure) as DKA resolution marker", TBL_CEL)],
[p("β-hydroxybutyrate", TBL_B), p("Serial", TBL_CEL), p("Best direct measure of ketosis resolution", TBL_CEL)],
[p("Urine output", TBL_B), p("Continuous", TBL_CEL), p("Target ≥0.5 mL/kg/h adult | 1–2 mL/kg/h child", TBL_CEL)],
[p("ECG / telemetry", TBL_B), p("Continuous", TBL_CEL), p("Detect K⁺-related arrhythmias early", TBL_CEL)],
]
mon_tbl = Table(mon_data, colWidths=[W*0.22, W*0.18, W*0.60],
style=TableStyle([
("BACKGROUND", (0,0), (-1,0), NAVY),
("ROWBACKGROUNDS",(0,1),(-1,-1), [WHITE, LIGHT_BG]),
("GRID", (0,0), (-1,-1), 0.4, MID_GREY),
("VALIGN", (0,0), (-1,-1), "MIDDLE"),
("TOPPADDING", (0,0), (-1,-1), 3),
("BOTTOMPADDING", (0,0), (-1,-1), 3),
("LEFTPADDING", (0,0), (-1,-1), 5),
])
)
story += [mon_tbl, sp(6)]
# ══════════════════════════════════════════════════════════════════════════════
# RESOLUTION CRITERIA | COMMON PRECIPITANTS
# ══════════════════════════════════════════════════════════════════════════════
res_rows = [
[p("All of the following must be met:", TBL_B)],
[p(" ✓ Blood glucose < 200 mg/dL", TBL_CEL)],
[p(" ✓ Serum HCO₃⁻ ≥ 18 mEq/L", TBL_CEL)],
[p(" ✓ Venous pH > 7.30", TBL_CEL)],
[p(" ✓ Anion gap ≤ 12 mEq/L", TBL_CEL)],
[p(" ✓ Tolerating oral fluids", TBL_CEL)],
[p("Give SC basal insulin 2 h before stopping IV", NOTE)],
]
res_inner = Table(res_rows, colWidths=[(W/2)-4],
style=TableStyle([
("LEFTPADDING", (0,0), (-1,-1), 5),
("TOPPADDING", (0,0), (-1,-1), 2),
("BOTTOMPADDING", (0,0), (-1,-1), 2),
("BACKGROUND", (0,0), (-1,-1), LIGHT_BG),
])
)
prec_rows = [
[p("• Infection (most common) — fever suggests sepsis", TBL_CEL)],
[p("• Missed insulin / new-onset T1DM", TBL_CEL)],
[p("• Myocardial infarction (get ECG)", TBL_CEL)],
[p("• Pancreatitis (check lipase ×3 ULN)", TBL_CEL)],
[p("• Stroke / acute illness", TBL_CEL)],
[p("• SGLT2 inhibitors → euglycaemic DKA", TBL_CEL)],
[p("• Steroids, thiazides, antipsychotics", TBL_CEL)],
]
prec_inner = Table(prec_rows, colWidths=[(W/2)-4],
style=TableStyle([
("LEFTPADDING", (0,0), (-1,-1), 5),
("TOPPADDING", (0,0), (-1,-1), 2),
("BOTTOMPADDING", (0,0), (-1,-1), 2),
("BACKGROUND", (0,0), (-1,-1), AMBER_BG),
])
)
col4_tbl = Table(
[[
Table([[section_header("RESOLUTION CRITERIA", TEAL)], [sp(3)], [res_inner]], colWidths=[(W/2)-4]),
Table([[section_header("COMMON PRECIPITANTS", AMBER)], [sp(3)], [prec_inner]], colWidths=[(W/2)-4]),
]],
colWidths=[W/2, W/2],
style=TableStyle([
("VALIGN", (0,0), (-1,-1), "TOP"),
("LEFTPADDING", (0,0), (-1,-1), 0),
("RIGHTPADDING", (0,0), (-1,-1), 4),
("TOPPADDING", (0,0), (-1,-1), 0),
("BOTTOMPADDING",(0,0), (-1,-1), 0),
])
)
story += [col4_tbl, sp(6)]
# ══════════════════════════════════════════════════════════════════════════════
# COMPLICATIONS TO WATCH
# ══════════════════════════════════════════════════════════════════════════════
story += [section_header("COMPLICATIONS TO WATCH"), sp(3)]
comp_data = [
[p("Complication", TBL_HDR), p("Cause", TBL_HDR), p("Prevention / Action", TBL_HDR)],
[p("Hypokalaemia", TBL_B), p("Insulin shifts K⁺ into cells", TBL_CEL), p("Potassium replacement protocol above; monitor every 2 h", TBL_CEL)],
[p("Hypoglycaemia", TBL_B), p("Insulin without glucose replacement", TBL_CEL), p("Add D5W when BG ≤250; reduce insulin to 0.05 u/kg/h", TBL_CEL)],
[p("Cerebral oedema", TBL_B), p("Rapid osmolality correction", TBL_CEL), p("Correct ≤3 mOsm/kg/h; especially critical in children", TBL_CEL)],
[p("Hyperchloraemic acidosis", TBL_B), p("Large NS volumes", TBL_CEL), p("AG closure ≠ DKA resolution — always check HCO₃⁻", TBL_CEL)],
[p("Aspiration", TBL_B), p("AMS + vomiting", TBL_CEL), p("Intubate if comatose / vomiting; avoid if possible", TBL_CEL)],
]
comp_tbl = Table(comp_data, colWidths=[W*0.22, W*0.30, W*0.48],
style=TableStyle([
("BACKGROUND", (0,0), (-1,0), NAVY),
("ROWBACKGROUNDS",(0,1),(-1,-1), [WHITE, LIGHT_BG]),
("GRID", (0,0), (-1,-1), 0.4, MID_GREY),
("VALIGN", (0,0), (-1,-1), "MIDDLE"),
("TOPPADDING", (0,0), (-1,-1), 3),
("BOTTOMPADDING", (0,0), (-1,-1), 3),
("LEFTPADDING", (0,0), (-1,-1), 5),
])
)
story += [comp_tbl, sp(8)]
# ══════════════════════════════════════════════════════════════════════════════
# FOOTER
# ══════════════════════════════════════════════════════════════════════════════
story += [
HRFlowable(width="100%", thickness=0.5, color=MID_GREY),
sp(3),
p("Sources: Washington Manual of Medical Therapeutics | Rosen's Emergency Medicine | Tintinalli's Emergency Medicine | ADA Guidelines • July 2026", FOOT),
p("⚠ This card is a clinical aide-memoire. Always apply individual patient clinical judgement. Not a substitute for local institutional protocols.", FOOT),
]
# ── Build ──────────────────────────────────────────────────────────────────────
doc.build(story)
print(f"PDF saved to {OUTPUT}")
python3 /home/daytona/workspace/dka-protocol/generate_dka_card.py
ls -lh /home/daytona/workspace/dka-protocol/DKA_Protocol_Card.pdf
DKA Protocol Card
PDF Document · PDF
| Section | Colour |
|---|---|
| Severity Classification - pH, HCO₃, AG, mental status, setting | Navy |
| IV Fluids - Phase 1 (NS bolus/shock) & Phase 2 (0.45% NS, 2-bag approach) | Teal |
| Potassium Replacement - 3-tier table with insulin hold rule | Amber |
| Insulin Protocol - IV infusion prep, dose, BG targets, transition to SC | Teal |
| Bicarbonate - "NOT routine" warning + 5 criteria for use | Red |
| Phosphate & Magnesium - replacement thresholds | Teal |
| Monitoring - BG/electrolyte/ABG/telemetry frequencies | Navy |
| Resolution Criteria - all 5 must be met before stopping | Teal |
| Common Precipitants - including SGLT2i / euglycaemic DKA | Amber |
| Complications - hypokalaemia, cerebral oedema, hyperchloraemic acidosis | Navy |