An Esophagogastroduodenoscopy (EGD), also called an upper endoscopy, is a diagnostic procedure used to examine the lining of the esophagus, stomach, and upper part of the small intestine (duodenum). During the procedure, a flexible tube with a camera, called an endoscope, is passed through the mouth and down the throat, allowing doctors to visually inspect the gastrointestinal tract for abnormalities such as ulcers, inflammation, tumors, or bleeding. EGD is commonly used to diagnose and treat conditions like acid reflux, gastritis, and celiac disease. It can also allow for tissue biopsies or treatments like cauterization during the same procedure.