Caution: Translations of Quran and Ḥadīth may lead to possible misapplications and misinterpretations. This site is intended for students of sacred knowledge that are proficient in comprehending classical Arabic and have a strong foundation in Islamic sciences. Also note that religious injunctions rely on several aspects beyond what one may glean through reading individual aḥādīth.
bayhaqi:9356Abū al-Ḥasan al-Raffāʾ > ʿUthmān b. Muḥammad b. Bishr > Ismāʿīl b. Isḥāq > Ibn Abū Ūways > Ibn al-Zinād from his father

[Machine] Regarding the scholars of the people of Madinah, they used to say that if a woman went around the Kaaba and then intended to go around Safa and Marwah but she started menstruating, she should continue to go around Safa and Marwah even if she is menstruating. Similarly, if one has sexual intercourse after circling the Kaaba and before performing Sa'i, they should also perform Sa'i.  

البيهقي:٩٣٥٦أَخْبَرَنِي أَبُو الْحَسَنِ الرَّفَّاءُ أنبأ عُثْمَانُ بْنُ مُحَمَّدِ بْنِ بِشْرٍ ثنا إِسْمَاعِيلُ بْنُ إِسْحَاقَ ثنا ابْنُ أَبِي أُوَيْسٍ ثنا ابْنُ الزِّنَادِ عَنْ أَبِيهِ

عَنِ الْفُقَهَاءِ مِنْ أَهْلِ الْمَدِينَةِ كَانُوا يَقُولُونَ أَيُّمَا امْرَأَةٍ طَافَتْ بِالْبَيْتِ ثُمَّ وَجَّهَتْ لِتَطُوفَ بِالصَّفَا وَالْمَرْوَةِ فَحَاضَتْ فَلْتَطُفْ بِالصَّفَا وَالْمَرْوَةِ وَهِيَ حَائِضٌ وَكَذَلِكَ الَّذِي يُحْدِثُ بَعْدَ أَنْ يَطُوفَ بِالْبَيْتِ وَقَبْلَ أَنْ يَسْعَى