Endoscopy Outcomes An Endoscopy Can Be An Important Procedure Used To: Collect tissue samples used to treat and diagnose digestive diseases and conditions. Your doctor may use tissue samples collected during endoscopy to test for diseases and conditions such as anemia, bleeding, inflammation, diarrhea or cancers of the digestive system. Diagnose digestive diseases or illnesses. Endoscopy can help your doctor find out what's causing symptoms such as nausea, vomiting, abdominal pain, difficulty swallowing and gastrointestinal bleeding. Treat specific ailments of the digestive system. Endoscopy can be used in conjunction with special tools to treat problems such as bleeding in the esophagus or stomach, difficult swallowing due to a narrow esophagus, removing polyps or dislodging foreign objects in the upper digestive tract.