From: Rabbi Moshe Sofer
To: Rabbi Shmuel Shmelka Meizlish
A creditor bearing a certified handwritten promissory note has priority over recipients of a deathbed gift (matnas shechiv mera), since such a note precludes any claim of prior payment. The creditor must first take the shevuas ha-Mishnah (oath required for collecting from an estate), and only after satisfying his debt is the remainder distributed among the gift recipients, who are treated by Rabbinic law as equivalent to heirs.
Source: Shu"t Chasam Sofer CM §128