Looking at a person’s area between the knees and the belly is forbidden to everyone either from the same sex or not. But only the areas that should be seen can be seen in times of necessity. Obviously it won’t be same for a female to be examined by a male or a female. So a female is preferred. A male doctor may be preferred only if there are strong reasons for it.