PTH and Hypomagnesemia: Hyperglycemia causes osmotic diuresis accompanied by hypomagnesemia, which adversely affects parathyroid hormone (PTH) secretion.