# Example 1: Adult Male
# 80kg, Starting Hct 45, Target 30
# EBV = 80 * 75 = 6000 mL
# ABL = 6000 * (45-30) / ((45+30)/2) = 6000 * 15 / 37.5 = 2400 mL
maximum_allowable_blood_loss(80, 45, 30, "adult_male")
# Example 2: Infant
# 8kg, Starting Hct 38, Target 28
# EBV = 8 * 80 = 640 mL
# ABL = 640 * (38-28) / ((38+28)/2) = 640 * 10 / 33 = 194 mL
maximum_allowable_blood_loss(8, 38, 28, "infant")
Run the code above in your browser using DataLab