# This script calculates the total daily dose and per intake
# dose of a medication based on a person's body weight.

@aliases(takings)
unit taking

let body_weight = 75 kg
let dosage = (60 mg / kg) / day
let frequency = 3 takings / day

let total_daily_dose = dosage * body_weight -> mg / day
print("Total daily dose: {total_daily_dose}")
assert_eq(total_daily_dose, 4500 mg/day)

let single_dose = total_daily_dose / frequency
print("Single dose:      {single_dose}")
assert_eq(single_dose, 1500 mg/taking)
