Locally trained doctors tend not to want to work in areas of high deprivation and need, and we continue to rely on foreign trained doctors to fill massive gaps. Medicine should acknowledge this historical trend and tackle the dysfunction arising from its contemporary manifestations, writes Julian M Simpson