FHIR Chat · proxy to fhir server · implementers

Stream: implementers

Topic: proxy to fhir server


view this post on Zulip Sean McIlvenna (Sep 12 2017 at 17:59):

Is there any documentation on how to proxy FHIR API requests to a different location. For example, have a web application that provides additional functionality beyond the core FHIR spec, has an endpoint for /fhir, and proxies requests (eventually) to a separate FHIR server (perhaps behind a VPN, with separate auth, etc.)?

view this post on Zulip Sean McIlvenna (Sep 12 2017 at 18:00):

And, if using fhir-net-api to execute the requests to the FHIR server from the proxy, is there any functionality in fhir-net-api to support this use-case?

view this post on Zulip Grahame Grieve (Sep 12 2017 at 18:04):

documentation - I can answer that:

view this post on Zulip Sean McIlvenna (Sep 12 2017 at 18:08):

Look forward to it :)

view this post on Zulip Grahame Grieve (Sep 12 2017 at 19:03):

lol.

view this post on Zulip Grahame Grieve (Sep 12 2017 at 19:04):

in terms of documentation

view this post on Zulip Grahame Grieve (Sep 12 2017 at 19:04):

http://hl7.org/fhir/http.html#2.21.0.21

view this post on Zulip Christiaan Knaap (Sep 12 2017 at 19:29):

@Sean McIlvenna : Do you intend to inspect or alter the result of the actual FHIR server in the proxy implementation? Or just transparently relay the request forth and response back?

view this post on Zulip John Moehrke (Sep 12 2017 at 21:37):

This is the role of what is called in general web API as an "API Gateway". There is a number of offerings in this space. The concept is not special to healthcare.

view this post on Zulip Sean McIlvenna (Sep 12 2017 at 22:00):

Thanks @Grahame Grieve. This documentation is fairly vague, though. It doesn't address how resource references should be handled, for example. If the API is proxied to myproxy.com/api/FHIR, but the destination FHIR server is behindvpn.com/api/FHIR, should the resource references be modified by the proxy to point the public url?

view this post on Zulip Sean McIlvenna (Sep 12 2017 at 22:01):

I suspect they probably can't be, because the destination FHIR server would probably have a difficult time resoslving absolute URL references

view this post on Zulip Grahame Grieve (Sep 12 2017 at 22:01):

how could we answer that in the specification? the answer is, 'well, that depends on what you are doing'

view this post on Zulip Sean McIlvenna (Sep 12 2017 at 22:04):

Well, I guess that answers my question, then. There is limited guidance because the solution is too complicated for general use-case...

view this post on Zulip Christiaan Knaap (Sep 12 2017 at 22:04):

If the original url used by the client is sent in the request, at least Vonk will see that as the base address and resolve references relative to that.

view this post on Zulip Sean McIlvenna (Sep 12 2017 at 22:11):

@Christiaan Knaap, potentially inspect and/or alter the result...

view this post on Zulip Sean McIlvenna (Sep 12 2017 at 22:11):

btw

view this post on Zulip Sean McIlvenna (Sep 12 2017 at 22:12):

actually... not just potentially, but very likely

view this post on Zulip Brian Postlethwaite (Sep 13 2017 at 06:50):

If the references are all releative, no need to mess with stuff.

view this post on Zulip Christiaan Knaap (Sep 13 2017 at 14:24):

The FhirClient class could be of help to interpret the response from the actual FHIR server (it returns a Resource object to you, for you to inspect or alter), but it has no explicit way of relaying the message forward to that actual FHIR server, so I doubt it would be useful to you then.


Last updated: Apr 12 2022 at 19:14 UTC