I'm surprised I don't see any comments about the FHIR api here. It's a project seeking to standardize a RESTful api for clinical encounter data that's gaining a fair bit of traction.
If the existing EMR companies don't manage to subvert its goals, the problem of data interoperability will be largely solved within the next 5-7 years.