Stream: subscriptions
Topic: Subscription resource update
Brian Reinhold (Sep 09 2019 at 21:36):
I just got informed that the Subscription now supports a return of certain fields, for example in the web sockets a ping can also return the logical id of the resource causing the ping AND it can even be configured to send the resource itself. But the FMM level has gone from 3 to 0. When was this done? Is there a version of HAPI FHIR that supports this or is there any server out there that supports this?
As an aside, I am assuming the MIME type for the logical id is application/text
and that for the resource is application/fhir+json
Josh Mandel (Sep 09 2019 at 21:41):
We're in the process of a re-design targeting R5. Current released HAPI support is for FHIR R4 (including support for R4 Subscriptions).
Josh Mandel (Sep 09 2019 at 21:41):
Right now we're relatively early in the process of that redesign; we'll be testing at the connectathon.
Brian Reinhold (Sep 09 2019 at 21:43):
Right now we're relatively early in the process of that redesign; we'll be testing at the connectathon.
So I assume that I am not able to take advantage of the 'ping' in a websockets subscription of sending the logical id of the resource that caused the ping? It would certainly save me lots of code!
Josh Mandel (Sep 09 2019 at 21:45):
Not yet, but being able to support id-only
payloads for the various channel types, including web sockets, is definitely in scope.
Josh Mandel (Sep 09 2019 at 21:46):
We've been focused on rest hooks so far, but will also be looking at incorporating web sockets into our reference implementation (https://subscriptions.argo.run).
Brian Reinhold (Sep 09 2019 at 21:48):
websockets are the way to got for simple clients (like an Android app) as they can be implemented in any wifi environment, including a hotel. There was a lot of playing around with my home router to get rest hooks to work ... an unlikely action I would ever be able to take at a hotel!
Josh Mandel (Sep 09 2019 at 22:03):
Oh, for sure -- rest hooks are useful for systems that stay put (e.g., cloud servers). Though I should mention that a big piece of how we expect mobile apps to get notified would be through FHIR Server --[REST Hooks]--> Cloud Endpoint, and from the cloud endpoint to a mobile "edge" device via push messaging.
Josh Mandel (Sep 09 2019 at 22:04):
Keeping a web socket on all the time also has its challenges -- including when your device is low on battery, or turned off, etc.
Pascal Pfiffner (Sep 10 2019 at 15:41):
Brian, on iOS we would have pings to back through Apple Push Notification Service (APNs) to the device, I'm assuming there's something similar for Android.
Last updated: Apr 12 2022 at 19:14 UTC