Developer open-sources TypeScript pharmacokinetic model for GLP-1 weight-loss drugs
A software developer building Tiro, a tracker for people using semaglutide and tirzepatide, identified two recurring errors in medication-level charts shown by existing GLP-1 apps: ignoring absorption delays and ignoring route-dependent bioavailability. To address this, the developer implemented the Bateman function, a one-compartment pharmacokinetic model that accounts for both first-order absorption and elimination rates. Because the absorption rate cannot be derived analytically from a drug's time-to-peak, the model solves it numerically using a bisection algorithm. The developer has since extracted the pure mathematics into a zero-dependency open-source TypeScript package called glp1-pk, covering drugs including semaglutide, tirzepatide, liraglutide, and dulaglutide. The package allows developers to compute estimated drug concentration over time across a full dosing history by summing each individual dose's contribution curve.
This is an AI-generated summary. ShortSingh links to the original source for the complete article.
Discussion (0)
Log in to join the discussion and vote.
Log in