The dying have some great vivid and even lucid dreams. And I found an article recently that talks about how to help the dying deal with their dreams, or in other words, do dream work.
http://www.psychologytoday.com/blog/the-wisdom-your-dreams/201002/dream-work-the-dying