Hsg test? (I think that's right)

KC • Trying for baby #1 ❤️
I'm seeing a lot of ladies getting a hsg (if that's wrong let me know) I'm just curious as to what it is and how do you know if you need one? I read something about it cleans out your Fallopian tubes. I don't mean to seem unintelligent, I just figured I would ask! 😅