I understand the notion of not exposing one’s private parts, but what about in regards to doctors visits? Women have to get yearly check ups for that, not to mention multiple check ups when pregnant and when giving birth. There’s no problem in this correct?

The rule still applies to a doctor visit, but if there is no other recourse and there is potential for harm or difficulty not normally bearable then it is allowed. But the doctor should be the same sex as the patient