In an esophagogastroduodenoscopy (EGD), a doctor looks at the lining of your esophagus, stomach, and duodenum. They may do this test to help diagnose problems in these body regions. Share on Pinterest ...