An upper endoscopy is a test that allows your child’s doctor to examine the lining of the esophagus (swallowing tube), stomach, and duodenum (first part of the small intestine). It is done while the child is asleep under anesthesia or is sedated. A fiber optic tube (endoscope) is passed through the mouth, down the esophagus and into the stomach and then the small intestine. There is a light and video chip on the end of the endoscope that sends images to a screen. Frequently, tiny samples of cells (biopsies) are taken from the esophagus, stomach, and duodenum to look for inflammation, infection, or other problems.