Long-term metformin impairs the calcium-dependent ileal step of B12 absorption; DPPOS shows risk rising ~1.13× per year, so periodic B12 checks are routine monitoring.
Long-term PPIs and diuretics both lower magnesium — PPIs impair intestinal uptake, diuretics flush it from the kidney tubule; the FDA's 2011 warning makes serum-magnesium checks standard.