It may be racist, but it would actually solve a fairly large problem of doctor shortages in the countries that put a lot of effort into training them, same as for nurses and other skilled migrants who come to the UK. Brain drain in these sectors rarely creates a feedback loop and deprives developing countries of urgently needed skills capacity.
I actually don't disagree with that! I would rather that we create our own Doctors and Nurses from our own population. But unfortunately there's not enough interest and there's a black hole in skilled labour in this country.