Thabit (may Allah have mercy on him), the narrator thinks, narrated from Sayyiduna Anas bin Malik (may Allah be pleased with him) that he said: "The Messenger of Allah (peace and blessings be upon him) went to visit a man who was in the throes of death; he greeted him with salam and asked: 'How are you feeling?'" Then the narrator mentioned the rest of the hadith.
Imam al-Tirmidhi (may Allah have mercy on him) narrated it in his book, and Imam al-Nasa'i (may Allah have mercy on him) in "Amal al-Yawm wal-Laylah", both of them through Harun bin Abdullah.
Imam Ibn Majah (may Allah have mercy on him) narrated it from Abdullah bin al-Hakam bin Abi Ziyad, from Sayyar.
Imam al-Tirmidhi (may Allah have mercy on him) said: "This hadith is gharib."
He also said that some narrators have narrated this report through Thabit (may Allah have mercy on him) from the Prophet (peace and blessings be upon him) as mursal.
Husayn bin Muhammad bin Fahm narrated it from Sulayman bin Ayyub, the companion of al-Basri, from Ja'far bin Sulayman, as marfu' (attributed to the Prophet (peace and blessings be upon him)).