Chronic illness and protocols

Hi, I have an autoimmune condition and my digestive issues are flaring lately. I am not sure why yet. How do you handle it when you get unexpected diarrhea or some other intestinal discomfort with your planned food? For example, I had diarrhea at 2:00 this afternoon, so abandoned my plan for a salad for dinner because my body couldn’t handle it. Instead I ate toast. I expect it to happen again until I get a better handle on what’s going on, but I never know when and don’t get any warning, really (certainly not 24 hours). Ideas?