With health care spending having increased roughly 35% from 2010 to 2017, now consuming over $3 trillion per year in the US alone, there is growing interest in reducing costs without compromising health outcomes. Since a large share of health care costs come from labor, one approach many states have taken is to expand the set of medical providers, shifting from just medical doctors (MDs) to allow for mid-level providers (MLPs), such as nurse practitioners, as well. Because MLP salaries are so much lower than MDs on average, the hope is to capitalize on their potential comparative advantage in providing routine care to low-risk patients. But there is also the possibility that average care quality declines because of the more limited training of MLPs relative to MDs, and/or the possibility that MLP caseloads wind up including non-routine cases or high-risk patients, which could create health complications and hence increase costs in the longer term. In this paper I study the effects of MLP use on costs and patient outcomes using state law changes as a natural experiment, which provides difference-in-difference type variation. This identification strategy is limited in the aggregate due to weak instrument bias. However, using modern machine learning methods, I am able to narrow in on the subgroup of patients where the first stage is sufficiently strong to produce accurate results in the second stage. These methods are data intensive, but in health care (and increasingly throughout social sciences) large enough data is becoming common, allowing researchers to increasingly capitalize on such methods and more effectively estimate heterogeneous treatment effects. I find that the patients who are most likely to be affected by the policy changes have increased rates of both preventable hospitalizations and total medical spending – that is, increased use of MLPs on net has adverse effects for the most relevant sample of patients. Estimates for heterogeneous treatment effects in both the first and second stage equations for my instrumental variables analysis helps explain why: I show that the patients who are predicted to benefit most from MLP care are not the same patients predicted to shift to MLPs after the policy changes, suggesting that improved sorting of patients between provider types could fully exploit comparative advantages and result in improved patient outcomes overall.