# Example 1: Prerenal (on diuretics)
# Serum Urea 50 mg/dL, Serum Cr 1.5 mg/dL, Urine Urea 200 mg/dL, Urine Cr 100 mg/dL
# FEUrea = (200 * 1.5) / (50 * 100) * 100 = 6
calculate_feurea(50, 1.5, 200, 100)
# Example 2: Intrinsic (ATN)
# Serum Urea 40, Serum Cr 2.0, Urine Urea 100, Urine Cr 40
# FEUrea = (100 * 2.0) / (40 * 40) * 100 = 12.5
# (100*2)/(40*40) = 200/1600 = 0.125 * 100 = 12.5
# let's try values that give >50
# Intrinsic: U-Urea 300, U-Cr 30, S-Urea 60, S-Cr 2.0
# FEUrea = (300 * 2.0) / (60 * 30) * 100 = 600 / 1800 = 33
# Try U-Urea 600: (600*2)/(60*30) = 1200/1800 = 66
calculate_feurea(60, 2.0, 600, 30)
Run the code above in your browser using DataLab