Endoscopy can often be done on an outpatient basis. Outpatient procedures performed at hospitals or ambulatory centers allow the patient to go home or return to work within a short while after their procedure. This technique is used to examine the liver's biliary tree, the gallbladder, the pancreatic duct and other anatomy to check for stones, other obstructions and disease. If disease is detected, it can sometimes be treated at the same time or biopsy can be performed to test for cancer or other pathology. ERCP can detect biliary cirrhosis, cancer of the bile ducts, pancreatic cysts, pseudocysts, pancreatic tumors, chronic pancreatitis and other conditions such as gallbladder stones.
Endoscopic biopsy is the removal of tissue specimens for pathologic examination and analysis.
Gastroscopy is often used to diagnose ulcers and other sources of bleeding and to guide biopsy of suspect GI cancers. In the early 1900s, the first attempts to view inside the body with lighted telescopes were made. These initial devices were often fully rigid. In the 1930s, semi-flexible endoscopes called gastroscopes were developed to view inside of the stomach. Widespread use of fiber optic endoscopes began in the 1960s.