Dying man in hospital has visit from dog