FHIR Chat · EHR Launch Flow - Location? · social

Stream: social

Topic: EHR Launch Flow - Location?


view this post on Zulip Angelo Ferreira (Apr 06 2022 at 14:24):

Hi there! TLDR: I need to identify the clinical site that is launching the app

Currently working on a SMART on FHIR app that is launched embedded in an EHR, using the EHR Launch Flow. We have been mostly trying to integrate with EPIC and Cerner EHRs so far.
I need to identify the clinical site that is launching the app, but I am struggling to find the right way of doing it.
Any thoughts? Below is the initial investigation performed:

The access-token I get as a result of the OAuth2 authentication process gets me the Location and the Encounter, which I thought could be the way to identify the hospital launching the app.
Encounter

  • After going through the documentation I am realizing that Encounter.Location is a list and can be empty, so I can't rely on it.

Location

  • I get the location identifier (which allows me to search then for the location resource) only for EPIC EHR, not for Cerner, which is only providing me the Encounter (I assume it can be some kind of lack of permissions, idk).

PractitionerRole

  • I saw that PratictionerRole resource could also be a possibility since it has PractitionerRole.Location - "The location(s) at which this practitioner provides care" but this is a list and can be nullable.

view this post on Zulip Dan Wallack (Apr 06 2022 at 14:31):

When you say clinical site, are you referring to identifying the hospital system e.g. Yale or Stanford or at a more granular level such as department?

view this post on Zulip Angelo Ferreira (Apr 06 2022 at 14:36):

@Dan Wallack Hospital system yes, not specific departments.

view this post on Zulip Dan Wallack (Apr 06 2022 at 14:42):

@Angelo Ferreira On launch, the iss parameter contains the FHIR base URL of the organization. This is the main way I have seen it done. You could also add a query string parameter to add something like hospid=1234 but that is more of a static method and you would need to have different launch URL's for each organization you go to implement with.

view this post on Zulip Angelo Ferreira (Apr 06 2022 at 15:21):

@Dan Wallack thanks for your suggestion. Despite the iss param not identifying the hospital but the FHIR server the hospital uses, it's ok to use it assuming that it's always the same FHIR server within the same hospital.
I think it might work, but I am not happy with going with this approach. I was expecting to have a proper Location Id or something I could query the FHIR server against and get more data.
Any other thoughts?

view this post on Zulip David Pyke (Apr 06 2022 at 15:38):

You might get more detail if you ask this in #smart

view this post on Zulip Mikael Rinnetmäki (Apr 06 2022 at 15:45):

If you're referring to what you get in the sandbox dev environments of Epic and Cerner, it may not reflect what you get in a production environment.

view this post on Zulip Mikael Rinnetmäki (Apr 06 2022 at 15:46):

You can also get practitioner info through the fhirUser object, and try to query for information based on that.

view this post on Zulip Mikael Rinnetmäki (Apr 06 2022 at 15:48):

But if you don't like something perhaps missing in some environment, I'd go with @Dan Wallack's proposal. You can convert the iss parameter into an organization based on endpoint lists. See https://open.epic.com/MyApps/Endpoints. I think Cerner has a similar list. I remember also seeing computational access to these being discussed.

view this post on Zulip Angelo Ferreira (Apr 06 2022 at 17:19):

Thank you all for your tips. Even though they have not 100% answered my question, I learned from them.
Will carry on with this discussion in #smart as suggested by David.


Last updated: Apr 12 2022 at 19:14 UTC