Сифрей Мицвот к Вайикра 15:19

וְאִשָּׁה֙ כִּֽי־תִהְיֶ֣ה זָבָ֔ה דָּ֛ם יִהְיֶ֥ה זֹבָ֖הּ בִּבְשָׂרָ֑הּ שִׁבְעַ֤ת יָמִים֙ תִּהְיֶ֣ה בְנִדָּתָ֔הּ וְכָל־הַנֹּגֵ֥עַ בָּ֖הּ יִטְמָ֥א עַד־הָעָֽרֶב׃

И если у женщины есть проблема, и ее проблема в ее плоти будет кровью, она будет в ее нечистоте семь дней; и всякий, кто прикоснется к ней, нечист будет до вечера.

Sefer Hamitzvot of Rasag

Chet The laws of seeing semen

Sefer Hamitzvot of Rasag

And a menstruant

Tur

"When a woman has a discharge, her discharge being blood from her body, she shall remain in her impurity seven days", and the sages learned from the exegesis of the verses that not all blood that flows from her renders her impure, except for blood that comes from the womb (source). Additionally, not all (shades of) blood are impure except for five specific types (shades) as shall be explained with G-d's help and these shades only render her impure when she senses their departure from the womb. However as soon as she senses that blood leaves its natural place in the womb to the outer house (birth canal) she is rendered impure even though it did not exit her body.