Do you have any other symptoms? Like, shortness of breath, constipation, bloating after eating, deep burping, etc?
If it is so, maybe you have gallbladder problem. Ask your doctor if you should have an abdominal scan.
Also, your condition may be related to the some kind of muscle problem. That also needs to be checked at clinic.
Many of these problems may be caused by hiatal hernia, so that also can be possible solution.
There are many possibilities, so you need to go to the hospital again, because stomach pain is new symptom and that can help doctors to find out what's wrong with you.