I've seen some great answers to the question as asked. I want to also toss the new-Trek engineers in there: Stamets, Billups, Jankom, and Pelia.
-
Jankom would be awful. Terrible bedside manner and a predilection for percussive maintenance do not make for good medical outcomes.
-
Billups would likely not do well either. Granted, we don't know much about him, but it seems like he's a competent but not outstanding chief engineer (let's face it, that's kinda the point of the show).
-
Stamets would freak. He would repeatedly note that it's actually his husband who's the doctor. But he'd probably end up doing a decent job.
-
Pelia has the distinct advantage of centuries of experience in her favor. It's entirely possible that she was a doctor at one point.
And, honorable mentions:
-
Hemmer would probably shock everyone by being amazing at the job. He would probably show some unexpected advantages to being blind as a doctor.
-
Jett Reno actually did this scenario, in her first episode.