A diagnosis by a physician, especially a gastroenterologist, can be frightening. To help figure out the cause and/or treatment of a disease or disorder, a doctor may perform a procedure known as endoscopic retrograde cholangiopancreatography (ERCP involves inserting small tubes through the mouth and into the stomach and intestines so that doctors can view the inside of organs. In this overview, we’ll look at the procedure, what happens before and during ERCP as well as it’s possible side effects.   Before performing an ERCP procedure, doctors first conduct what is called an upper gastrointestinal (GI) series. In this test, a tube with an endoscope on the end is inserted through the mouth and into the stomach and duodenum. The endoscope allows the doctor to view the inside of the stomach and small intestine. During this test, doctors also check for Barrett’s esophagus and cancerous growths in the esophagus using endoscopes with a camera attached to them. If Barrett’s esophagus is present or if cancer is suspected, this test is often done after a sedative medicine so that patients don’t feel any pain during testing. If necessary, your doctor may also remove any abnormal tissue found during the upper GI serious with a knife through a tube inserted through your mouth into your stomach.