Healthcare isn't expensive because there are huge swaths of spending unexamined by human intelligence that might become tractable with an automated process. On the contrary, it's one of the sectors that has the most eyes and brains pointed at costs and extracting as most money as possible.
On the topic of EMR systems in particular, they suck because the people using them hate them and because the people purchasing them, building them, and mandating them aren't the people using them. If it were just a matter of having enough money to throw at the problem, Epic would have done so already.