Actually in most jurisdictions a dying declaration is admissible over a heresay objection.
Dying declarations are an exception to the Hearsay Rule.