What impact do setting and transitions have on the quality of life at the end of life and the quality of the dying process?

What impact do setting and transitions have on the quality of life at the end of life and the quality of the dying process?