FHIR Chat · Multiple FHIR servers with JavaScript client? · smart

Stream: smart

Topic: Multiple FHIR servers with JavaScript client?


view this post on Zulip Paul Lynch (Aug 28 2019 at 18:48):

I understand from a previous thread that a SMART app can talk to multiple FHIR servers. Can the JavaScript client at https://docs.smarthealthit.org/clients/javascript/ be used to do that? I don't see a way to indicate which FHIR server one means when calling the "authorize" or "ready" functions.

view this post on Zulip Josh Mandel (Aug 29 2019 at 17:15):

First off, a shout out to Vlad's updated library ("v2"), docs at http://docs.smarthealthit.org/client-js/ (Note @Vladimir Ignatov we should update docs at https://docs.smarthealthit.org/clients/javascript/ now that things are stabilizing.)

view this post on Zulip Josh Mandel (Aug 29 2019 at 17:18):

When it comes to authorizing, you can specify a fhirServiceUrl as a parameter to authorize (see https://github.com/smart-on-fhir/client-js/blob/master/src/smart.js#L113-L127)

view this post on Zulip Josh Mandel (Aug 29 2019 at 17:18):

That lets you specify which server you mean.

view this post on Zulip Josh Mandel (Aug 29 2019 at 17:19):

When it comes to calling ready, this should be driven by the state value returned from your OAuth server, so there ought not be any ambiguity about where to exchange a token.

view this post on Zulip Josh Mandel (Aug 29 2019 at 17:20):

Hope this helps -- and please let us know how this goes; it'd be good to document this kind of "advanced flow" more directly, if you find it useful (and to work through any issues if you find it breaks ;-)).

view this post on Zulip Paul Lynch (Aug 29 2019 at 20:17):

Thanks! We're still in the planning stages for a brand-new idea for a small project, so it might be a while before we try it out, but I am encouraged that you think it should work.


Last updated: Apr 12 2022 at 19:14 UTC