# Example 1: Negative Gap (GI Loss)
# Na 40, K 20, Cl 80 -> (40+20)-80 = -20
calculate_urine_anion_gap(40, 20, 80)
# Example 2: Positive Gap (RTA)
# Na 40, K 20, Cl 50 -> (40+20)-50 = 10
calculate_urine_anion_gap(40, 20, 50)
Run the code above in your browser using DataLab