How is Endoscopy Done?

Endoscopy is a procedure in which a long tube with a camera at its one end is put inside the mouth and the is taken down to see the upper part of gut. It can also be done through anus if one has to look for abnormalities in the lower part of gut.