A patient nearing the end of his or her life is admitted to hospice. This is where the patient will spend his or her final days, hopefully surrounded by family and friends. This can be done at home instead of the hospital, but a nurse would always be at the home in addition to family and friends.
I hope this helped! :-)