The study and treatment of care for terminally ill patients to manage pain and improve quality of life.