A diagnostic gastroscopy is a medical procedure used to examine the upper part of the digestive system, including the esophagus, stomach, and duodenum. This is done using a thin, flexible tube equipped with a camera and a light at its end, known as an endoscope. The endoscope is inserted through the mouth, allowing the doctor to view the internal structures and capture detailed images.