Imagine a "lab in the toilet". Every time it is flushed, it runs analysis on the current contents and produces reports if requested, or alerts if needed.
"You're currently suffering potassium deficiencies, which can cause frequent headaches. Eat a banana to alleviate concerns."