My 34-year-old niece was on the verge of an ulcer, but she had a good doctor who
checked and double checked and asked questions galore. He finally figured out the child didn't realize that when a person takes Ibuprofin or the like, those pills ALWAYS need to be accompanied by food or at the very least a glass of milk in order to coat the stomach. Once the MD zero'ed in on that tidbit of info to determine the reason, he gave her some medicine to heal her stomach lining and dull her pain, and she's been fine ever since.
Best of luck resolving your situation, Dawn_MO!