Hi.
Thanks for your query.
Noted the history about your friend and understood the concerns.
It is not very common to have vomiting every time one visits bathroom for passing motion.
The most probable causes of having pain in abdomen followed by need to pass a motion and having vomiting every time are:
Gastroenteritis as there is pain in abdomen followed by passing motion and that induces vomiting too.
IBS that is
irritable bowel syndrome along with GERD that is
gastroesophageal reflux disease.
There can be sub-
acute intestinal obstruction.
Lax lower esophageal sphincter.
This can be diagnosed by the following:
X-ray of the abdomen in standing position.
Ultrasonography of the abdomen followed by a CT scan if required.
Tests of blood and stool.
Upper GI Endoscopy.
Clinical evaluation by a Doctor preferably a
General Surgeon or a Gastroenterologist.
These will give the most proper diagnosis and thus a plan for further proper management.
In the meantime, take a PPI like Omeprazole, domperidone and antacids.
Avoid the foods and beverages that can instigate or enhance the problems.