Pay isn't the issue for hospitals buying software, they are already paying big money to vendors. And they often can't take their money elsewhere because of contracts. I heard 10 years lock-in for an EHR solution.
Lots of software churn is probably bad for medical workers too if they are constantly retraining in high stress environments - they might be technical but may not be comfortable with computers.
Building your own software is do-able for some aspects (to avoid paying millions for a simple web app), but most hospitals are not going to want to build their own EHR software or other large pieces.