كتاب الطهارة
2  
Purity

Yahya related to me from Malik from Nafi from Sulayman ibn Yasarfrom Umm Salama, the wife of the Prophet, may Allah bless him and grant him peace, that a certain woman in the time of the Messenger of Allah, may Allah bless him and grant him peace, used to bleed profusely, so Umm Salama consulted the Messenger of Allah, may Allah bless him and grant him peace, for her, and he said, "She should calculate the number of nights and days a month that she used to menstruate before it started happening, and she should leave off from prayerfor that much of the month. When she has completed that she should do ghusl, bind her private parts with a cloth, and then pray."

وَحَدَّثَنِي عَنْ مَالِكٍ، عَنْ نَافِعٍ، عَنْ سُلَيْمَانَ بْنِ يَسَارٍ، عَنْ أُمِّ سَلَمَةَ، زَوْجِ النَّبِيِّ صلى الله عليه وسلم أَنَّ امْرَأَةً كَانَتْ تُهَرَاقُ الدِّمَاءَ فِي عَهْدِ رَسُولِ اللَّهِ صلى الله عليه وسلم فَاسْتَفْتَتْ لَهَا أُمُّ سَلَمَةَ رَسُولَ اللَّهِ صلى الله عليه وسلم فَقَالَ ‏ "‏ لِتَنْظُرْ إِلَى عَدَدِ اللَّيَالِي وَالأَيَّامِ الَّتِي كَانَتْ تَحِيضُهُنَّ مِنَ الشَّهْرِ قَبْلَ أَنْ يُصِيبَهَا الَّذِي أَصَابَهَا فَلْتَتْرُكِ الصَّلاَةَ قَدْرَ ذَلِكَ مِنَ الشَّهْرِ فَإِذَا خَلَّفَتْ ذَلِكَ فَلْتَغْتَسِلْ ثُمَّ لِتَسْتَثْفِرْ بِثَوْبٍ ثُمَّ لِتُصَلِّي ‏"‏ ‏.‏
USC-MSA web (English) reference : Book 2, Hadith 107
Arabic reference : Book 2, Hadith 136