How to connect legacy EHR systems with modern APIs