We have "Buy American" rules for many goods & services purchased with Federal dollars; generally all federal grants have these restrictions. If we expand those rules to all Federal expenditures, including Medicare & Medicaid payments, then the medical companies, the pharmacies, and any other that makes profits from our tax dollars would have to stay onshore and pay taxes accordingly, or go for the inversion trick and get cut from the eligible provider list.
If they want to offshore with private dollars, that's one thing, but doing it while being paid with our tax dollars is quite another.
Might not catch all the corporations who are avoiding our taxes, but would be a great start, and would be consistent with existing Buy American policies.
No more below the fold, that's all I have to say.