@dimpley - I think that doctors order something like an endoscopy if there are a lot of factors (indigestion, pain, bloating, etc) pointing to a major stomach problem (somach ulcer, tumor, cancer) . If I were a betting man, I would say this is how they find the nodules in the first place.
I think that it’s sort of like when a person goes for a colonoscopy. There is a little tool that goes in with the camera which they can get a piece of a polyp. This little sample is used to see if the polyp is cancerous.
I’m not sure on technical names and things of that nature, but I’m pretty sure that it follows the same sort of pattern.
Once they take a look inside, they will most likely not only find the nodule, but also the cause of the nodule at the same time.