Women going to male doctors

Q: I have been married for two years and and we are trying for a baby from the beginning onwards but still there is no pregnancy due to which we went to a fertility clinic which was a female doctor. After investigation the doctor had instructed to perform HSG test for my wife, (it's a kind of test that they will insert some instrument into a women's genital and check inside for the blockage) and she also said that there is only one doctor to perform in the whole state but its a male doctor who is very experienced and aged around 75 years. My question is weather it is allowed in Islam to perform these kind of tests with a male doctor?

Uttering the word talaaq while sleeping

Q:

1. If one is in half asleep and somehow realizes what he is doing but can not really think straight because he is half asleep and utters "talaaq" while the wife is somehow in the mind, does this count? The person could not really think about what he is doing or saying.

2. If someone mistakenly utters this word while just doing something and somehow thinking about the wife but there was no intention, but like a slip of the tongue, does this count?