Yeah..its called a dying declaration.
Hardly a dying declaration as it was made “hours” before the guy died. There has to be a belief of rather imminent death for that exception to apply.