A flexible lighted instrument is inserted through your mouth into the stomach, further into the first part of the small bowel (duodenum) to examine the bile duct and pancreatic duct in gallbladder, liver or pancreas problems. Contrast is used and X-rays are taken to visualise these structures. A biopsy may be taken during the procedure.