If you have symptoms of a digestive disorder, your doctor may need to use one or more of the following diagnostic procedures to examine your gastrointestinal tract and determine the cause of your symptoms. Your digestive tract must be empty before undergoing any of these procedures. For an examination of your esophagus, stomach, or duodenum, you will need to fast (abstain from food and drink) after midnight the night before the procedure. For an examination of your ileum, colon, or rectum, you will need to follow a special liquid diet beginning at least 2 days before the procedure and then fast the night before the procedure. All of these examinations are usually performed on an outpatient basis.

• Gastrointestinal series. A gastrointestinal (GI) series is an examination that is used to diagnose or monitor problems in the digestive tract. An upper GI series examines the esophagus, stomach, and duodenum; a lower GI series examines the colon and rectum. These examinations are used to identify blockages, growths, ulcers, inflammation, and other structural abnormalities. Both procedures use barium sulfate to coat the lining of the digestive tract and provide clear images of the digestive tract on a fluoroscope (a special video monitor) or on X-ray film. For an upper GI series, you drink a barium mixture (a thick, white, chalky liquid called barium meal or barium swallow); for a lower GI series, a barium mixture (called a barium enema) is injected into the colon through the anus and rectum. You may be asked to change positions during the examination as the barium reaches different locations in your digestive tract. Usually you can go home immediately after the procedure and should experience no side effects other than constipation and white or gray stools until the barium is completely out of your system.
• Endoscopy. Endoscopy is a diagnostic examination in which a doctor uses a long, thin, flexible lighted tube called an endoscope to look inside the esophagus, stomach, and duodenum. You will be awake during this procedure, but before the examination begins, your throat will be sprayed with a numbing agent so you do not gag when the endoscope is passed down your throat. You also will receive pain medication and a sedative to help you relax. The endoscope has a precision optical system that works like a video camera, allowing the doctor to see inside each organ as it travels through the digestive tract. The endoscope also can blow air into the digestive tract to inflate it and make it easier to examine. Tiny surgical instruments then can be passed through the endoscope to remove tissue for microscopic examination. This procedure is usually brief—about 20 to 30 minutes—but you will need to lie quietly afterward at the doctor’s office for an additional hour or two until the sedative wears off. You may have a sore throat after the procedure.
• Endoscopic retrograde cholangiopancreatography (ERCP). This diagnostic procedure allows your doctor to examine your liver, gallbladder, bile ducts, and pancreas using an endoscope. In ERCP, the initial steps are the same as those described for endoscopy. However, when the endoscope reaches your duodenum, the doctor injects contrast medium (a type of dye) through the endoscope and into your bile ducts. X rays are taken as soon as the contrast medium is injected. If the doctor sees a gallstone or narrowing of the ducts, he or she can pass tiny surgical instruments through the endoscope to remove the obstruction or widen the duct.
• Colonoscopy. Colonoscopy is a diagnostic examination of the entire length of the large intestine, from the rectum all the way up through the colon to the ileum. Colonoscopy can be used to look for polyps in the colon or to diagnose colon cancer. The procedure is performed with a special type of endoscope called a colonoscope. Before the procedure, you will receive pain medication and a sedative to help you relax. While you lie on your left side, your doctor will insert the colonoscope into your rectum and guide it up through the entire large intestine. As the doctor slowly withdraws the colonoscope, he or she examines your colon directly through the colonoscope or on a video monitor. Air can be blown through the colonoscope to inflate the colon and give the doctor a better view. Instruments can be passed through the colonoscope to take tissue samples or to remove polyps. If there is any blood in the colon, your doctor can use a special instrument or drug to stop the bleeding. Colonoscopy usually takes about 30 to 60 minutes, and you will need to lie quietly for an additional hour or two after the examination. Because of the medication you have been given, you should make arrangements in advance for someone to take you home after the procedure.
• Sigmoidoscopy and proctoscopy. As an alternative to a colonoscopy, your doctor may use a type of endoscope called a sigmoidoscope to examine only the rectum and the sigmoid (lower) colon. Or your doctor may use a type of endoscope called a proctoscope to examine only the anus and rectum. These procedures are similar to colonoscopy, but they examine only a limited portion of the gastrointestinal tract, and each procedure takes only about 10 to 20 minutes. 

Source [ http://www.healthtweak.com ]