Connecting to Cerner FHIR Endpoints
# support
d
Hello all! Let me preface this by apologizing if this isn't the right space to ask this type of question - let me know and I'll delete the post! I'm new to the FHIR workspace, and for now I'm trying to get a demo going for a few ideas/projects to come. I'm self-hosting Medplum and trying it out as well as connecting to some external EHR's, such as Epic and Cerner. I can pull data using backend authorization and Medplum Bots, all working fine. Now I'm trying to create a standalone app page for a practitioner to log in to an external EHR (Epic's sandbox) and then request Patient data from there. I started out using the SMARTerFHIR library together with Medplum. Epic's sandbox has login info for a test user with practitioner role, which is what I'm using. I've registered my app as provider-facing in the Epic account. The auth process works well, I get an access token and use it to query the server. However, I can only get data back if I'm requesting the patient directly (as in R4/Patient/). If I do even a basic search (R4/Patient?given=camila) I get back a Bundle with total=0 and a warning of "Resource request returns no results", even though there is a patient with given name Camila (and I can get her data by her ID). I tried the connection and search using the fhirclient library. Same result. Changed it to Medplum Bots, using MedplumClient. No dice. Also tried a bunch of different scopes, like 'user/Patient.read', 'user/Patient.search', but couldn't get it to work. So my question, if you can help me, is: Is it possible to get a Bundle of patients with a specific user in their CareTeam while logged in as that user? Is it an access issue for the user? Or am I missing something in the auth process/scope? OR am I missing something even more trivial? Any tips or suggestions would be super helpful and greatly appreciated! šŸ™‚ Thank you all!
r
Unfortunately, searches are not supported across the board on many (non-Medplum) systems. @alexkg and team are experts here and may have some guidance.
a
That’s expected behavior as Reshma said. The search support in Epic is very limited https://fhir.epic.com/Specifications?api=932
d
Thank you so much @reshma and @alexkg ! I'll mark the post as solved right away.
For completeness, in case anyone stumbles here later on: search on Epic will only work if given a minimum set of specific parameters (e.g. given, family AND birthdate). Broad search queries won't be executed and will return empty, as stated in the post. The .$match query is even more strict in the required parameters
Also, if you don't mind one final question, @reshma and @alexkg , do you know any other sandbox I could use to test this provider facing app? Cerner has many users with login credentials, but none with practitioner roles. I was searching around but couldn't find anything. Thank you again!
a
@de_pretto Cerner does support the practitioner role too. It needs to be configured from Code Console at app set up ā€œThe scope ā€˜fhirUser’ will additionally request that the OpenID Connect token include the claim ā€˜fhirUser’, as defined by the SMARTĀ® on FHIRĀ® authorization framework. This URL identifies the specific FHIRĀ® resource URL of the authenticated user. This resource may be a Patient, Practitioner, or Person resource, depending on the type of user whom is authenticated.ā€ https://fhir.cerner.com/authorization/
d
@alexkg thank you for taking the time and helping me out! I was also looking at the cerner docs and saw that they have a practitioner role. What they don't have (or at least I didn't find) is the login information for a practitioner test user, so I cannot authenticate as a clinician, for instance. Just as a patient. My end goal with this demo is for a clinician to log in and then request a list of his patients that he can then filter out by age and etc. I guess I can do that with a backend auth, but I'm still trying to find a way to do with a user/practitioner auth. I'll kepp trying! Thank you a lot!
a
Oh the login is hiding. I can’t find the docs but try username: practitioner password: practitioner
d
@alexkg you're a hero for trying to help me here. But those credentials, unfortunately, are not working :/ I've created a second app on CernerCode to test the search with a Patient login, and it works like a charm. I'm thinking about reaching out to Cerner to check if they have a test practitioner user. Thanks once again, Alex!
a
d
Just a final update to this thread: I've reached out to Cerner on their forums (as suggested by @alexkg ) and they informed me the credentials with a provider role. Username: portal / Password: portal. I've tested it and it works. So thank you all for the help and hopefully this will be useful for others here.
a
I had that wrong above! Thanks for closing the loop on this
188 Views