The wife of the Prophet ﷺ, Umm Salamah (may Allah be pleased with her), narrates that during the time of the Prophet ﷺ, a woman used to experience excessive bleeding. Umm Salamah (may Allah be pleased with her) asked the Messenger of Allah ﷺ about her issue, so he ﷺ said: "She should consider the number of nights and days in a month during which she used to have her menstrual period before this illness of istihada, and leave the prayer for that many days in the month. When that time passes, she should perform ghusl, tie a cloth (to stop the blood), and then perform the prayer."
Hadith Referenceمسند الإمام الشافعي / كتاب الطهارة / 111