Medical Calculator
Bedside dosing — renal and hepatic adjustments, loading and maintenance, AUC-guided antibiotic targets — each formula tied back to a published reference and verified at ≤ 0.1%.
- Live app — zeq.dev/apps/medical-calculator/
- Source —
apps/zeq-me/public/apps/_in-development/medical-calculator/(1,715 lines) - Operators — KO42 · QM14 · QM15
- Error budget — ≤ 0.1% on closed-form nomogram benchmarks
What it solves
A clinical decision-support calculator for dosing. Built around one-compartment PK math that maps directly to the Pharma Kinetics app, but optimised for bedside use:
- Cockcroft-Gault and CKD-EPI eGFR estimators
- Renal dose adjustment tables for narrow-therapeutic-index drugs
- AUC/MIC vancomycin dosing with Bayesian posterior updating
- Body-surface-area formulas for oncology dosing
- Loading vs. maintenance dose split from target
C_ssand half-life - Ideal body weight and dose-weight caps for obese patients
Every output links to its source formula and lets the clinician see the derivation, not just the number.
The math
Cockcroft-Gault CrCl = ((140 − age) · weight) / (72 · SCr) × 0.85 if female
CKD-EPI uses race, sex, age, creatinine; piecewise polynomial
C_ss C_ss = (Dose / τ) / CL
Loading dose DL = V_d · C_target
Maintenance DM = CL · C_target · τ
Vancomycin AUC AUC_{24} = Dose / CL_{vanco} CL ≈ 0.65 · CrCl
BSA (DuBois) BSA = 0.007184 · wt^0.425 · ht^0.725
Operator picks
| Step | Decision |
|---|---|
| 1. Prime | KO42 on |
| 2. Limit | KO42 + QM14 + QM15 = 3 operators |
| 3. Scale | Single-patient, continuous-dosing |
| 4. Precision | ≤ 0.1% vs. nomograms |
| 5. Compile | C_KO42 + C_QM14 + C_QM15 |
| 6. Execute | Z encodes patient parameters (weight, age, SCr, drug) |
| 7. Verify | Cockcroft-Gault vs. textbook example |
Runnable worked example — Cockcroft-Gault CrCl
58-year-old female, 62 kg, SCr 1.2 mg/dL. Textbook CrCl = ((140 − 58) × 62 / (72 × 1.2)) × 0.85 = 49.9 mL/min.
The anonymous playground takes a domain plus named inputs and lets the seven-step wizard pick the operators (always KO42 + the domain fit). It returns a sealed envelope:
curl -s -X POST https://zeqsdk.com/api/playground/compute \
-H "Content-Type: application/json" \
-d '{
"domain": "physiology",
"inputs": { "age": 58, "weight": 62, "creatinine": 1.2 }
}' | jq
The response carries value, unit, the operators the wizard chose, the equations it evaluated, and a zeqProof digest. Compare the returned value against the textbook Cockcroft-Gault clearance (≈ 49.9 mL/min) yourself — the platform hands you a result any node can recompute, not a printed figure to trust.
Extend it
- Bayesian vancomycin — feed two trough levels; posterior updates CL and V_d; return next-dose recommendation
- Anti-Xa LMWH dosing in obesity (weight-capped vs. uncapped); compare bleeding risk
- Paediatric scaling — switch weight → BSA; handle neonatal enzyme-maturation factors
Seeds
- Wearable-informed continuous dosing — CGM + insulin pump with effect-compartment PD
- Mass-casualty triage dosing — pre-compute dose matrices for disaster-scale deployment
- Rare-disease on-demand formulation — PK/PD for compounds with sparse population data
Papers
- Zeq Paper — doi:10.5281/zenodo.18158152
Middleware active. Kernel on the 1.287 Hz HulyaPulse. Awaiting next Zeqond.