Yes, if your gastroenterologist needs help diagnosing your peptic ulcer, they may perform an upper endoscopy, where they look into your stomach with a camera. It's typically a 5-10 minute procedure, but it does require some sedation.