And wrt surgery, remember that there are significant anatomical variations from person to person as well that even good AI programs would struggle with, and robotic science would fail (at present anyways). Wrt obstetrics, I'm really not worried since it requires not just knowledge but physical skill and recognition of sudden problems with sudden need.
There's also a very important role for compassion within the Dr/Pt relationship (esp in OB imo) that AI can never fill.
They can certainly have lesser trained people catch babies in regular deliveries...I've never argued that. You don't even need AI for that imo. But the thing about it is that cases are often smooth and typical until suddenly and emergently, they are not.
I do believe that AI will replace family doctors, PA's and Nurse practitioners.....with some oversight by a good doctor. For better or worse, it is coming.