Method Deck / health

Weight-based dose (general formula)

Multiplies a body weight in kilograms by a per-kilogram dose to compute a total dose, general formula only, optionally capped at a maximum.

Published for review. The Founder is checking every card himself; anything he strikes comes down the same hour.
Disclaimer: General formula only. Not medical advice. Dosing decisions belong to a licensed clinician and the product's label.

Try it

Inputs

Outputs

Steps

  1. raw_dose = weight_kg * dose_per_kg.
  2. If max_dose is provided and raw_dose exceeds it, total_dose = max_dose; otherwise total_dose = raw_dose.
  3. Round the result to 2 decimal places.

Constants

None.

Sources

Worked example and test vectors

NameInputsAnswer
worked example{"weight_kg":70,"dose_per_kg":5,"dose_per_kg_unit":"mg/kg","max_dose":500}350.00 mg
test vector: cap applies{"weight_kg":120,"dose_per_kg":5,"dose_per_kg_unit":"mg/kg","max_dose":500}500.00 mg

Published card