Hello,
Welcome to Health Care Magic. I understand your concern.
As I understand from the symptoms you are describing and the drug your treating doctor prescribed, and the relieved pain after medication, you have gastrointestinal acid-secretory disorders.
You do not explain if this was your first episode of pain, and the way the pain began.
With such a presentation in my clinic, I would suggest you do further examinations, to rule out a possible ulcer. The most appropriate examination for ruling out this condition is upper gastrointestinal
endoscopy.
In order to prevent further events, I would recommend you change a bit your diet. If you smoke or drink alcohol, stop. If the ulcer is believed to be caused by the use of NSAIDs, they need to be stopped. Seasonings, such as pepper, increase stomach acid and may irritate your stomach. Foods that contain chocolate, are spicy, or are high in fat may also irritate your stomach. Drinks that contain alcohol or caffeine may also cause symptoms.
Hope I answered to your question. If you have further concerns, feel free to ask again.