PTH and Hypomagnesemia: Magnesium is also involved in the metabolism and activity of vitamin D. Patients with hypocalcemia and hypomagnesemia are resistant to large doses of vitamin D, because of reductions in PTH secretion and renal resistance to this hormone.