Debate and articles swing back and forth on AI vs doctors as diagnosticians. For a large scale article, see Singhal et al. here.
For a modest article with a great online supplement, and open access, see Shea et al. here. They gave six hard problematic cases to GPT4 and to six doctors, the AI somewhat outperforming the doctors in the six sample. I'm citing it in part because they have an online PDF with all the cases and all the AI answers and reasoning. 33 page supplement here.
PS - In my hands, GPT4 correctly diagnosed the complex, August 17, 2023 NEJM case study.