Physician performs upper gastrointestinal endoscopy. An endoscope is a flexible fiber optic cable through which internal cavities can be viewed. This technique is routinely used in the diagnosis of cancer and ulcers. The endoscope has been inserted through the mouth and lead down the patient's throat.