Woman visiting a male doctor/Gynecologist:
It is permitted for a woman to see a male doctor, even if the Doctor will need to touch her, such as to check her pulse and the like. This applies even if the woman is married, and even if there are other gentile [or female] Doctors available. This applies even if the doctor will need to examine intimate areas such as is done by a gynecological exam. [Nonetheless, if a female doctor of equal expertise is available, it is better for a woman to visit a female doctor. This especially applies by a gynecologist, that a female gynecologist should always be preferred over a male, if available, unless there is a medical issue involved in which the male gynecologist has greater expertise.]
Yichud: When one visits a male doctor, care must be taken not to transgress the laws of Yichud during the visitations. This matter will be discussed in a further Halacha!
 See Darkei Teshuvah 157/8; Nishmas Avraham Y.D. 195/11; Shevet Halevi 3/186; 4/167; Shiureiy Shevet Halevi 195/274; Minchas Yitzchak 7/73; Igros Moshe E.H. 2/14; Taharah Kehalacha 7/1; Halichos Bas Yisrael 7/17; Ohel Yaakov p. 286
Regarding a caretaker/nurse of opposite gender [not a doctor]: See Michaber Y.D. 335/10 and Poskim there!
 Shach 195/20 that so is the custom; Sidrei Taharah 195/24; Kreisiy Upleisi 195; Piskeiy Dinim 195/17; Darkei Teshuvah ibid that so is evident from all Poskim, Rishonim and Achronim, who deal with the question of a male doctor checking a woman; Noda Beyehuda Kama Y.D. 66; Tinyana 122; Binyan Tziyon 1/75; All Poskim ibid; Igros Kodesh 14/100 [printed in Shulchan Menachem 5/248] “I never heard that people were careful in this matter”
The reason: As the prohibition of Giluiy Arayos only applies when done out of lust and not when done with other intents in mind, such as for medical purposes. [Shach 157/10 and 195/20]
Other opinions: Some Poskim rule even unaffectionate touch with an Erva is Biblically forbidden. [Beis Shmuel E.H. 20/1 that so holds Ramban to be the opinion of Rambam; Beis Yosef 195 in opinion of Rambam that even in a case of Sakana one may not touch even unaffectionate] Other Poskim rule unaffectionate touch with an Erva is Rabbinically forbidden. [Beis Shmuel E.H. 20/1 and Beis Yosef Y.D. 195 in opinion of Ramban; See Ezer Mikodesh 20/1] Some Poskim however rule that even according to the stringent opinions, unaffectionate touch is only forbidden with one’s wife who is a Nida while with other woman it is completely permitted [in a case of need]. [Toras Hashelamim 195/15; Igros Moshe E.H. 2/14]
 So is evident from Shach ibid
 Shach ibid
 Darkei Teshuvah ibid that so is evident from all Poskim, Rishonim and Achronim, who deal with the question of a male doctor checking a woman’s vaginal area to determine the source of bleeding; Noda Beyehuda Kama Y.D. 66; Binyan Tziyon 1/75; Letter of Rebbe in Shulchan Menachem 5/248; See however Michaber Y.D. 335/10 and Shach 335/9 that a man may not be a caretaker for a woman if he will see her intimate areas. Perhaps however there is a difference between a caretaker and a doctor, as by a caretaker the visitations are frequent as opposed to a doctor.
 Letter of Rebbe in Shulchan Menachem 5/248; Igros Kodesh 14/100; Minchas Yitzchak 7/73; Shevet Halevi 4/167; Shiureiy Shevet Halevi ibid; Halichos Bas Yisrael 7/17
The reason: Besides for the reasons of Tzenius, a woman also naturally feels more comfortable with a female doctor. [Rebbe ibid]
 Poskim ibid