Gastroscopy is a surgery to examine the upper digestive tract; this includes the gullet, stomach and duodenum. Using a flexible endoscope that usually passes through the patient's mouth, the doctor can check if there is any inflammation, ulcer or tumor in the tract, remove polyps or take a sample of the lining for testing. It is effective in the diagnosis of diseases like gastritis, gastric ulcers, esophagitis, esophageal ulcers, esophageal cancer, H. Pylori infection and duodenal ulcers.