An upper GI endoscopy or EGD (esophagogastroduodenoscopy) is a procedure to diagnose and treat problems in your upper GI (gastrointestinal) tract.
The upper GI tract includes your food pipe (esophagus), stomach, and the first part of your small intestine (the duodenum).
This procedure is done using a long, flexible tube called an endoscope. The tube has a tiny light and video camera on one end. The tube is put into your mouth and throat. Then it is slowly pushed through your esophagus and stomach, and into your duodenum. Video images from the tube are seen on a monitor.
An upper endoscopy is used to diagnose sometimes, treat conditions that affect the upper part of your digestive system, including the esophagus, stomach and beginning of the small intestine.