There is nothing wrong with it in cases of necessity, but that is on condition that this should be with the consent of a doctor. If the doctor says that there is nothing wrong with having this injection or taking these pills, then there is nothing wrong with it in a case of necessity, whether it is for a number of hours or a number of days. End quote.
Majmoo’ Fataawa Ibn ‘Uthaymeen, 22/392
The Shaykh was also asked about a woman whose period came during tawaaf al-ifaadah. She told the female doctor who was with the group about that, and the doctor said: I will give you an injection that will stop the bleeding for six hours. And in fact the bleeding stopped for six hours, so she did tawaaf again and did saa’i. And after six hours her period came back. It is what she did valid or what?
He replied: If the bleeding stopped completely and she was pure -- and women know what the tuhr (sign of purity) is, then there is nothing wrong with it and her tawaaf is valid. But if it was not a real tuhr, then she did tawaaf before she became pure, and if a woman does tawaaf before she becomes pure, it is not valid. End quote.
Majmoo’ Fataawa Ibn ‘Uthaymeen, 22/393, 394