External EHR Integrations
# support
p
We are planning to integrate external EHR endpoints like EPIC, CERNER, etc. I see that there are some methods inside MedplumClient but not sure if it is the right way or not. Does Medplum SDK provide a way to connect with Epic or Cerner, pull the required data, and store it inside Medplum DB? If yes, then can you point me out for right documentation as well as different ways to integrate(oAuth, server to server etc)?
r
Our SDK can authenticate though it does require a bit of different handshake for each. Here's a sample https://github.com/medplum/medplum/tree/main/examples/medplum-demo-bots/src/epic
The folks at Topology have a demo here

https://youtu.be/r35OyzcpIaY▾

p
Thanks, @reshma. @Ankit Yadav have a look
This seems more CLI, any way we can achieve the same through Medplum SDK?
r
The CLI uses the SDK under the hood. See some examples here: https://github.com/medplum/medplum/blob/main/packages/cli/src/auth.ts
r
Hi @Pravin - the Bot that @reshma linked in Medplum Demo Bots uses the SDK to connect to epic
with all of these, the main challenge is the authentiction handshake. The CLI has a number of utilities to auth with servers like EPIC
p
Thanks. Bot seems to be using server to server connection, is that right? I saw some other SDK methods like https://www.medplum.com/docs/sdk/core.medplumclient.signinwithexternalauth, any thoughts around these? Cant we use these for EPIC, Cerner etc, get redirect url which will initiate the oAuth flow to generate access token and then can we use that token for further FHIR calls to EHR?
r
Yes you can. Epic supports server to server, patient and practitioner auth.
159 Views