There are no guidelines recommending that patients with anemia due to cobalamin or iron deficiency specifically be screened for achlorhydria.
If the etiology of the deficiency is unexplained, esophagogastroduodenoscopy with biopsy of the oxyntic mucosa (fundus and corpus) could be considered to rule in or rule out atrophic gastritis as the etiology.
Gastric atrophy and intestinal metaplasia
The American Gastroenterological Association (AGA) recommends testing for Helicobacter pylori, followed by eradication, in patients with intestinal metaplasia (IM).[72]Gupta S, Li D, El Serag HB, et al. AGA clinical practice guidelines on management of gastric intestinal metaplasia. Gastroenterology. 2020 Feb;158(3):693-702.
https://www.ncbi.nlm.nih.gov/pmc/articles/PMC7340330
http://www.ncbi.nlm.nih.gov/pubmed/31816298?tool=bestpractice.com
AGA recommends against the routine use of endoscopic surveillance in patients with IM.[72]Gupta S, Li D, El Serag HB, et al. AGA clinical practice guidelines on management of gastric intestinal metaplasia. Gastroenterology. 2020 Feb;158(3):693-702.
https://www.ncbi.nlm.nih.gov/pmc/articles/PMC7340330
http://www.ncbi.nlm.nih.gov/pubmed/31816298?tool=bestpractice.com
Patients at high risk for gastric cancer
AGA and the American Society for Gastrointestinal Endoscopy recommend surveillance endoscopy for those with IM who are at high risk for gastric cancer due to their ethnic background, extensive IM, dysplastic IM, or family history of gastric cancer.[72]Gupta S, Li D, El Serag HB, et al. AGA clinical practice guidelines on management of gastric intestinal metaplasia. Gastroenterology. 2020 Feb;158(3):693-702.
https://www.ncbi.nlm.nih.gov/pmc/articles/PMC7340330
http://www.ncbi.nlm.nih.gov/pubmed/31816298?tool=bestpractice.com
[123]ASGE Standards of Practice Committee, Evans JA, Chandrasekhara V, et al. The role of endoscopy in the management of premalignant and malignant conditions of the stomach. Gastrointest Endosc. 2015;82:1-8.
http://www.ncbi.nlm.nih.gov/pubmed/25935705?tool=bestpractice.com