How did you know/did they get diagnosed?

This is the second week in a room DS has thrown up right in the middle of lunch at daycare. The first time we thought stomach bug, but now we are thinking possible food allergy, but can't pinpoint one particular item of food.