Could I say something about diarrhea?
The following can help stop things up: white rice, ripe banana. Stay away from coffee, fats, oils, spicy. Dairy can be complicated.
Boiled or steamed vegetables such as sweet potato, zucchini, potatoes, are good choices. It can also be helpful to drink the cooking water. Low-fat chicken is good. Egg white is good. Watch out for fatty foods such as peanut butter, salmon, avocado.
Another good thing is cooked apple. I use the gadget to cut it up into six pieces without the seeds, and put it in the microwave briefly with a little bit of water. Vented plastic wrap prevents a mess and helps it cook more evenly. Again, the cooking water is good to drink.
I learned these things when I was living in the Third World.
Also, the doctor may have some suggestions.
When diarrhea is bad, food is just going straight through you and you're not benefiting much from the food.
Electrolytes could be helpful if it's pretty bad. There are recipes online. One doesn't have to suffer with the horrible taste of Pedialyte.
It's important to drink extra water if one is getting dehydrated from diarrhea. You can watch your urine output and color to gauge. Also, dehydration might produce swollen feet and cognitive dulling.