Gastroscopy, also known as upper endoscopy, is a medical procedure that allows doctors to examine the lining of the upper part of the gastrointestinal tract, which includes the esophagus, stomach, and duodenum. This procedure is performed using a gastroscope, a flexible tube with a light and camera on the end, which transmits images to a monitor.