Glucose Digital Twin

A mechanistic glucose–insulin simulator (Hovorka core + gut absorption, endogenous secretion, medication PK/PD, and physiologic modifiers). Build a regimen, run it, and predict the 24-hour glucose trajectory, time-in-range, and hypo/hyper risk.

Calculators — A1c, ISF/ICR & starting regimen

A1c → average glucose
% A1c154mg/dL

An A1c of 7.0% ≈ an average glucose of 154 mg/dL (eAG).

Reverse: 154 mg/dL ≈ A1c 7%

Starting basal-bolus regimen
TDD
35 U
Basal
17.5 U
0.73 U/hr
ISF
51
mg/dL ÷ U
ICR
14
g ÷ U

Meal boluses (by ICR): B 3U · L 4U · D 5.5U — for 45/60/75 g.

Steroid + dose (factors hyperglycemia)

Steroid hyperglycemia: increases hepatic glucose output and impairs peripheral insulin sensitivity.

Regimen library — load an in/outpatient scenario

Ten ready-made regimens across both care settings — load one to see exactly what it does, then tweak it or pin it and compare against another.

Import from Epic / EMR / CGM

Paste a glucose flowsheet, CGM export, or lab report. The app extracts every reading, marks when Lantus/insulin was given, and flags DKA/HHS — then overlays it all on the chart.

Predicted glucose trajectory

Running simulation…

Regimen builder

Meals

Label
Time
Carbs g
Fat/Pro

Insulin boluses

Time
Units
Insulin

Basal insulin

No basal segments (use Auto-basal toggle for a tuned rate).

Oral / injectable agents

No agents added.

Exercise

Start
Min
Intensity

Times are minutes from simulation start (07:00).

Dose advisor — predict & recommend

Set the current glucose (drag the chart handle or the slider). The advisor simulates forward and recommends a dose, showing exactly how far it drops you.

Current glucose117mg/dL
4070–180 target band400
Meal carbs with this dose
Dose → glucose effect
5 h endpoint nadir recommended

Patient physiology & dosing

BMI
22.9
normal
ISF
117
mg/dL ÷ U
ICR
32
g ÷ U
β-cell function from labs

Type 1 — autoimmune β-cell destruction; C-peptide typically undetectable.

Physiologic & environmental modifiers

Stress drivers (acute illness)

Predictions & guidance

  • Run a scenario to see predictions.

Model reference & data layer

Every variable, parameter, formula, and clinical threshold the engine uses — the same canonical data other condition pathways can import from @/lib/glucose-twin.

Research & education tool. Equations adapted from the Hovorka/Cambridge, Bergman, Dalla Man/Cobelli and Sorensen/Panunzi model families plus standard PK/PD templates. Not a medical device and not for individual treatment decisions.