The procedure involves inserting a thin, flexible tube called an endoscope through the child's mouth and into the digestive tract. Attached to the endoscope is an ultrasound probe that uses sound waves to create images of the internal organs. The procedure is usually performed under general anesthesia to ensure the child remains still and comfortable.