If he is only 12 weeks and he has had a bad tummy for 5 weeks he can only have been 7 weeks when you got him. You should have stuck to whatever the breeder was feeding (they should have given you a supply) but even a change of environment can upset a puppy. Are you feeding any puppy porridge/cereal or goats milk? He should be on four meals a day, usually two meaty/complete and two milky meals for breakfast and supper.
While James Welbeloved is a good food I am afraid the others are very low quality and I would put him on a large breed puppy food from either Eukanuba or one of the other better brands such as Purina, Royal Canin but I would go back to the breeder first and see what they feed.
Boiled rice and chicken alone will not be giving him enough goodness, vitamins and protein to help his bones grow strong enough to carry his adult body, and he will end up gangly and weak.