I think it is potentially difficult to determine how good the average doctor is in a particular place and how much better one would be than the average, but if one could be reasonably confident that they could make a large counterfactual impact on patient outcomes, the impact could be significant. The easiest way to be sure of these factors that I can think of would be to go somewhere with a well-documented shortage of good doctors, while trying to learn about and emulate the attributes of good doctors.
Being a doctor may not be one of the highest impact career paths on Earth, but it might be the highest impact and/or the most fulfilling for a particular person. High impact and personal fit/fulfillment are fairly highly correlated, I think, and it's worth exploring a variety of career options in an efficient way while making those decisions. In my experience, it can be very difficult to know what one's best path is, but the things that have helped me the most so far are experiences that let me get a taste for the day-to-day in a role, as well as talking to people who are already established in one's prospective paths.
The original 2012 post from Gregory Lewis tried to estimate this, and ends up estimating that a doctor can make a difference of "around 20 lives", excluding donations, which is a lot!
For other ways in which a doctor can have a lot of impact, you might be interested in Careers in medicine - a new path profile from Probably Good and High Impact Medicine.
Thanks a lot by the sharing the article (This is not the same as I saw on 80000). So Dr.Lewis thought about"replacing a worse doctor". There are some factors that would change the QALYs number: 1.Mentioned in Lewis's article, different types of doctors contribute differently. Such as maybe doctors who treat cold don't make big impact(because it's easy, with SOP), but who treat cancers well do. 2.How bad are bad doctors? 3.The value of "curing a disease", sometimes, curing a cancer doesn't mean you prevent a person dying from cancer, because he might get another cancer in a few years. The positive impact relies on "reducing suffering", but curing disease may only delay the suffering, especially for the seniors.(unless you die with less suffering, some dying ways are more suffering, like advanced cancers) If you consider the impact of patients' relatives, prolonging patients' lifespan might be good if their relatives feel sad about the patient's death.