A more detailed article on visiting the unwell and washing...
Here we present some Ahaidth of Masomeen -asws related to what to be done/recited when a person is dying and what to be done/recited afterward as per of ‘Esalay-Sawab (to transfer some rewards to the departed soul).
In summary, the following actions may be taken, as per Ahadith for the carers/family prior to the death and after death: Try to make the body of the dying person towards Qibla (Kabah); Try to move the dying person near to his/her praying mat/place; Recite Holy Quran (e.g., Verses, Chapter 37); Make the dying person to Acknowledge and Recite the Testimonies; Make the dead-body facing the Kabah/Qibla; For washing, shrouding, and burying the deceased, see Ahadith from the link: http://hubeali.com/articles/AlKafan_September2015.pdf Salat for the first night in the grave; Reciting seven (7) times Inna Anzalna (Chapter 97) while putting his hand on the grave for protection of any constrictions the deceased may face; The recommended days to visit the grave and praying; Praying and supplicating, giving charity (sadaqa) for the deceased; Further transferring of rewards include feeding/quenching/clothing/paying debts of a momin on behalf of a deceased; Lapsed Salat/Zakat, Hajj, Soam are to be offered by the family of the deceased; Offer lapsed are more obligatory on the elder son (guardian); ‘Sawab-e-Jariya’ -Starting a deed which continued to reward (i.e., planting a tree, building a masjid/Imam bargah) and/or leaving a property for good causes or mourning rituals of lamenting the atrocities targeted against the Holy family of Rasool-Allah -saww .