<prompt> Magnesium deficiency is cause by-Prolonged aificial ventilationSmall bowel resectionRenal diseaseLiver cirrhosis  <response>: Excessive losses INADEQUATE INTAKE Starvation Malnutrition esp. alcoholism Parenteral alimentation GI- Prolonged vomitingnasogastric aspiration Chronic diarrhoealaxative abuse Malabsorption Small bowel bypass surgery Fistulae URINARY- Diuretic therapy loop, thiazide Alcohol Tubulotoxic drugs gentamicin, cisplatin Volume expansion e.g. primary hyperaldosteronism Diabetic ketoacidosis Post-obstructive diuresis Recovery from acute tubular necrosis Inherited tubular transpo defect Baters syndrome, Gitelmans syndrome Primary renal magnesium wasting MISCELLANEOUS-Acute pancreatitis Foscarnet therapy Proton pump inhibitor therapy prolonged Hungry bone syndrome Diabetes mellitus. DAVIDSONS PRINCIPLES OF PRACTICAL MEDICINE 22ND EDITION PAGE NO-448 