# Example 1: Osmotic Diarrhea (e.g., Lactose Intolerance)
# Na 30, K 30, Meas Osm 290 -> Gap = 290 - 2(60) = 170
stool_osmolar_gap(30, 30, 290)
# Example 2: Secretory Diarrhea (e.g., Cholera)
# Na 90, K 40, Meas Osm 280 -> Gap = 280 - 2(130) = 20
stool_osmolar_gap(90, 40, 280)
Run the code above in your browser using DataLab