Dialysis is primarily used to provide an artificial replacement for lost kidney function due to renal failure. Dialysis may be used for very sick patients who have suddenly but temporarily, lost their kidney function or for quite stable patients who have permanently lost their kidney function. When healthy, the kidneys maintain the body's internal equilibrium of water and minerals (sodium, potassium, chloride, calcium, phosphorus, magnesium, 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 waste removal and fluid removal.