I had a stomach endoscope as part of my general health check. They weren't told to check for a peptic ulcer but I'd assume given my symptoms of gas they would have looked for it. It came back with no concerns- could have seen it directly if I had really wanted to. Can a stomach endoscope check miss a peptic ulcer?
An EGD (esophagogastroduodenoscopy) with biopsy has a sensitivity of 95% for diagnosing Peptic Ulcers. That means less than 5% are missed. Remember, this is on average.
That doesn't sound amazing, but it's actually pretty good. This article talks about clinical predictors for ulcers, which are also very important in diagnosis. If someone has symptoms, the threshold for suspicion goes up. A good history and physical exam will let the doctor know how much to suspect an ulcer. That is called a pre-test probability.
NO ulcer signs/symptoms + negative EGD = likelihood of having an ulcer is extremely low.
MANY ulcer signs/symptoms + negative EGD = still low, but worth a discussion. There may be another test (like pH, urease, etc) that could increase diagnostic accuracy IN SOME CASES.
But you say it like it was done as a routine screening part of your "general health check," which is strange. We generally don't just throw EGDs at every human with a stomach, we do them when there is high enough suspicion that something is wrong. So make sure you have the conversation with your doctor so he/she can help you understand both the reason for doing the test AND the results.