Apparently, it takes four physicians to make this decision:
There are no compulsory gender tests during events sanctioned by the International Association of Athletics Federation, but athletes can be asked to take a gender test. The medical evaluation panel usually includes a gynecologist, endocrinologist, psychologist, and an internal medicine specialist.