In medicine, dialysis (from Greek dialusis, meaning dissolution, dia, meaning through, and lysis, meaning loosening or splitting) is a process for removing waste and excess water from the blood, and is used primarily as an artificial replacement for lost kidney function in people with renal failure. Dialysis may be used for those with an acute disturbance in kidney function (acute kidney injury, previously acute renal failure), or progressive but chronically worsening kidney function—a state known as chronic kidney disease stage 5 (previously chronic renal failure or end-stage renal disease). The latter form may develop over months or years, but in contrast to acute kidney injury is not usually reversible, and dialysis is regarded as a "holding measure" until a renal transplant can be performed, or sometimes as the only supportive measure in those for whom a transplant would be inappropriate. Dialysis is an imperfect treatment to replace kidney function because it does not correct the compromised endocrine functions of the kidney. Dialysis treatments replace some of these functions through diffusion (waste removal) and ultrafiltration (fluid removal).