Actually the people with this sort of condition tend to have a sense for what foods may be causing them trouble. So they're already thinking "hmm...did I eat onion" earlier?? Automating this process they're already going through seems reasonable. Obviously this requires that the questions are tailored -- it wouldn't make sense to ask about a randomly selected food from the gamut of all foods.