Hyperglycemia causes osmotic diuresis accompanied by hypomagnesemia, which adversely affects parathyroid hormone (PTH) secretion. The gene discussed is PTH; the disease is familial primary hypomagnesemia.