How to connect legacy EMR systems with modern applications