Sunan an-Nasa'i, Volume 1, Book 3, Hadith 355 (DarusSalam)

It was narrated from Umm Salamah that a woman suffered from constant bleeding during the time of the Messenger of Allah, so Umm Salamah consulted the Prophet for her. He said: "Let her count the number of nights and days that she used to menstruate each month before this happened to her, and let her stop praying for that period of time each month. Then when that is over let her perform Ghusl, then wrap a cloth around herself, and pray."

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

sunnah.com