Sunan an-Nasa'i, Book 21, Hadith 165 (In-Book)

It was narrated that Abu Umamah bin Sahi said: "A woman from among the people of Al-'Awali fell sick and the Prophet was the best in visiting the sick. He said: 'When she dies, inform me.' She died at night and they buried her without telling the Prophet. The following morning he asked about her and they said: we did not like to wake you, O Messenger of Allah.' So he went to her grave and offered the funeral prayer for her and said Takbir four times."'

أَخْبَرَنَا قُتَيْبَةُ، قَالَ حَدَّثَنَا سُفْيَانُ، عَنِ الزُّهْرِيِّ، عَنْ أَبِي أُمَامَةَ بْنِ سَهْلٍ، قَالَ مَرِضَتِ امْرَأَةٌ مِنْ أَهْلِ الْعَوَالِي وَكَانَ النَّبِيُّ صلى الله عليه وسلم أَحْسَنَ شَىْءٍ عِيَادَةً لِلْمَرِيضِ فَقَالَ ‏ "‏ إِذَا مَاتَتْ فَآذِنُونِي ‏" ‏ ‏.‏ فَمَاتَتْ لَيْلاً فَدَفَنُوهَا وَلَمْ يُعْلِمُوا النَّبِيَّ صلى الله عليه وسلم فَلَمَّا أَصْبَحَ سَأَلَ عَنْهَا فَقَالُوا كَرِهْنَا أَنْ نُوقِظَكَ يَا رَسُولَ اللَّهِ ‏.‏ فَأَتَى قَبْرَهَا فَصَلَّى عَلَيْهَا وَكَبَّرَ أَرْبَعًا ‏.‏

sunnah.com