Dialysis is primarily used to provide an artificial replacement for lost kidney function (renal replacement therapy) due to renal failure. Dialysis may be used for very sick patients who have suddenly but temporarily, lost their kidney function (acute renal failure) or for quite stable patients who have permanently lost their kidney function (stage 5 chronic kidney disease). When healthy, the kidneys maintain the body’s internal equilibrium of water and minerals (sodium, potassium, chloride, calcium, phosphorus, magnesium, and sulfate) and the kidneys remove from the blood the daily metabolic load of fixed hydrogen ions. The kidneys also function as a part of the endocrine system producing erythropoietin and 1,25-dihydroxycholecalciferol (calcitriol). Dialysis is an imperfect treatment to replace kidney function because it does not correct the endocrine functions of the kidney. Dialysis treatments replace some of these functions through diffusion (waste removal) and ultrafiltration (fluid removal).