As your concern shows, Gallstones in Common Bile Duct or with Inflammed
Gall Bladder cause very
severe pain that comes and goes [colicky]lower to your last right rib.[Sub-costal pain].
The location as you say is upper abdominal in the middle that is to say in between the lower margins of your rib cage. This associated with your sensation of vomiting and diarrhea and [??may be] sour belches and water coming in your mouth an nose while sleeping[water-brash], are the symptoms of Acid Peptic Disease[APD]. This is a very common problem with today's lifestyle that promotes highly driven, fast and stress prone life [Type A personality]. Other causes are spicy food and an infection caused by
Helicobacter pylori. The last one is an organism that has suited itself to grow at highly acidic environment of Stomach.
My advice to you is to try simple Antacids like Gaviscon or Digene or Moxal by chewing their tabs or having a table spoon full of either of them when you have the characteristic symptoms or pain. If they go away, go for Rapid
Urea Breath test or Immunological tests that test for recent or past infection by H pylori[ IgM for recent an Ig G for past]. If H pylori is positive then go for eradication of H pylori by triple drug therapy -1.
Clarithromycin 250-500 mg depending upon your weight one tab twice a day after food.
2.
Augmentin 375-625 mg depending upon weight one ab twice a day after food.
3.
Omeprazole 20 mg one tab twice a at before breakfast and before dinner.
4. Antacid tabs as per needed.
If you have H pylori positive tests and don't have the symptoms, then don't take the first two drugs that are the antibiotics. Take only Omeprazole and Antacids. Some people have H pylori as normal flora of their stomach, without it causing the symptoms.
Hope that helps.