With small children and babies you can't be too careful. I'd start with working with the doctor to find out why your child had digestive problems. Is it due to lactose intolerance? maybe a gluten intolerance/allergy? maybe an allergy to preservatives or food coloring? A peanut allergy? Once you know the cause of the problem, then you can plan a diet around it. Until then, maybe limit the variety of foods your feed him and watch for any signs of a bad reaction. Introduce other foods gradually so you can clearly see what upsets your toddlers stomach. I hope you can find a solution!