I still think writing a list down and keeping a record of all the foods that give you stomach pains, and those that don’t, is a good idea. One day it could help reveal something previously overlooked, such as a connection between the foods that cause the stomach upsets.
Your condition sounds very complex though. Have you tried using a dedicated medical forum? Maybe you can find a more accurate answer if you post your symptoms on one of those.
Here’s some more reading, if your up for it.
http://www.patient.co.uk/showdoc/40001503/
http://www.patient.co.uk/showdoc/105/