End of life planning tied to longer survival with terminal illness