How to improve interoperability in legacy EMR systems