Pharmacometrics with Sounio
Sounio provides a powerful platform for pharmacometric modeling, enabling drug dosage optimization with rigorous uncertainty handling.
GUM-Compliant Vancomycin Dosing
Sounio’s Knowledge construct carries confidence values (ε) which propagate through computations.
// 15 mg/kg/day: Level 1A evidence (RCT meta-analysis, 18 centres, n=2204)
// ε=0.92 reflects high evidence quality with known inter-patient variability.
let base_dose: Knowledge<f64> = Knowledge(15.0, ε=0.92, prov="ASHP_2020_Level1A_RCT")
// Hospital floor scale: ±0.5 kg on 78.5 kg patient → ε=0.98 (calibrated device).
let weight: Knowledge<f64> = Knowledge(78.5, ε=0.98, prov="hospital_scale_calibrated")
let ref_wt: Knowledge<f64> = Knowledge(70.0, ε=1.0)
// GUM propagation is automatic: ε(a/b) = ε(a)×ε(b) under independent errors.
let weight_factor: Knowledge<f64> = weight / ref_wt
let dose1: Knowledge<f64> = base_dose * weight_factor
// ε(dose1) ≈ 0.92 × 0.98 × 1.0 = 0.9016
Safety Gates
You can enforce safety thresholds at compile-time or runtime using the propagated confidence.
let conf_dose = dose3.ε
if conf_dose >= 0.82 {
println(" PRESCRIBE: dose pipeline confidence sufficient")
} else {
println(" BLOCKED: refine CrCl estimate (Cockcroft-Gault CV too high)")
}