2,080. A Doubt as to Whether a Niddah or a Zavah

Hilchos Issurei Biah 6:22

Similar to the case in the previous halacha, if a zavah checks herself on the first counting day and finds herself to be ritually clean, and on the eighth day she finds herself clean, she is assumed to be ritually clean. If she checks herself on her third zivah day and finds that her bleeding had stopped but she didn’t check herself on the first day of counting and she checked herself on the seventh day, she is be assumed to be ritually clean. The same rules about all these inspections also apply to a zav: if he finds himself to be ritually clean, it's treated as if he had counted those days.

Hilchos Issurei Biah 6:23

Whenever there’s a doubt as to whether a woman is a niddah or a zavah, she must count seven clean days in order to resolve the matter. She immerses in a mikvah on the eve of the eighth day, after which she is permitted to her husband. She must bring a zavah’s offering but it isn’t eaten, as will be addressed IY”H in Hilchos Mechusrei Kappara (the laws of those awaiting atonement, in Sefer Korbanos).