I worked on an EHR procurement process for the last several years and, yes, there's a LOT of crapware out there, but I have seen systems deployed that were almost entirely reliant on the input of the actual front-line providers and they'd sooner saw off their own arms than go back to paper records.
"They should start working now to have all records be electronic, X-rays, MRIs, personal history, etc. should be in formats that can be directly shared between doctors."
They already do. It's called HL7. It's been around for twenty years. Teleradiology is nothing terribly new anymore either.
As for "having a doctor or nurse putting in billing codes," look, if they're worth half their salt, they can already rattle off the ICD9/10 codes with sufficient accuracy from memory that it's actually faster than scribbling the condition on paper.
Yes, even GOOD systems can fail if deployed poorly. ITFA they admitted "we sucked when we used paper, then we went to computers and lo-and-behold, we still sucked just as badly, almost precisely so, ergo, we're pretty sure it was the computer's fault." This is a typical case of bad management pointing the finger at the technology to cover their own incompetence. I'm sure when they were on paper they blamed the f'ing pencils.