We argue that there are cases in which it is morally permissible to replace medical practitioners with machine learning algorithms. Our argument appeals to the uncontroversial view that it is sometimes morally permissible to make medical decisions based on cost-effectiveness considerations. For example, it is generally morally permissible to prescribe a treatment that is as effective as its alternatives but much cheaper. If this is so, we argue, then similar cost-effectiveness considerations can explain why it is sometimes morally permissible to replace human practitioners with algorithms. To reject our argument, one needs to show that when it comes to algorithmic medical decision-making, there are special considerations that would always override cost-effectiveness considerations. We go through a range of candidate considerations and argue that none of them is weighty enough to tip the balance in favor of human practitioners.