One halachic issue following gynecological procedures is the size of instruments used, since instruments of a certain size inserted in the uterus are presumed to bring on niddah status by opening the uterus. In the case of a standard hysteroscopy, the width of the instruments used are well under the 19 mm measure used as a criterion by our site's halachic supervisor, Rav Yehuda Henkin. Thus, assuming standard instruments, the procedure itself would not invalidate your clean days.
While some poskim hold that bleeding due to injury in the uterus itself is dam niddah and not dam makkah, the position of Rav Henkin is that such bleeding is considered dam makkah and would not render one niddah or invalidate the clean days. Therefore, your clean days will not be invalidated by any bleeding following this procedure and you may continue with your original count.
You should perform your daily bedikot up until you undergo the procedure. After the hysteroscopy, you may switch into colored underwear, and omit bedikot until the bleeding/staining subsides. However, it is critical that you have an acceptable bedikah on Day 7. Since your hysteroscopy will take place on Day 4 or so of your clean days, hopefully the bleeding will have subsided by Day 7. However, in the event the bleeding has not subsided by then, as long as you performed bedikot on Days 1-4, you have some flexibility on when your final bedikah may take place. For example, if you are still staining on Day 7, you may wait until Day 8 to perform your final bedikah and your bedikot on Days 2 and 8 retroactively become your Day 1 and 7 bedikot. The same is true for days 3 and 9, 4 and 10 etc. Once your perform your final bedikah, you may immerse that night.
(Please note that there is never a need for an additional five day wait prior to the counting the clean days if your original count was invalidated. The five day minimum counts from when you are first rendered niddah, so even if you started your clean days and had to restart them due to bleeding, your previous five day wait is still valid and you may restart your clean days immediately.)