hapifhir / hapi-fhir

🔥 HAPI FHIR - Java API for HL7 FHIR Clients and Servers
http://hapifhir.io
Apache License 2.0
2.04k stars 1.33k forks source link

[FR] Implement Support for WebSocket (R5) #2825

Open ZuSe opened 3 years ago

ZuSe commented 3 years ago

Describe the issue FHIR R5 (4.6) changed the behavior on how to subscribe to Websockets to listen to subscriptions. As defined in http://build.fhir.org/subscription.html#websockets it is now a "2 Step" Process to receive messages. While the first part - connecting to the general socket endpoint - seems to work, HAPI does not support to generate the subscription token by calling the $get-ws-binding-token operation.

Environment (please complete the following information):

Additional context

{
    "resourceType": "OperationOutcome",
    "text": {
        "status": "generated",
        "div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Invalid request: The FHIR endpoint on this server does not know how to handle GET operation[Subscription/40364ab3-b9fe-40e6-bc7e-da856b3f833f/$get-ws-binding-token] with parameters [[]]</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
    },
    "issue": [
        {
            "severity": "error",
            "code": "not-supported",
            "diagnostics": "Invalid request: The FHIR endpoint on this server does not know how to handle GET operation[Subscription/40364ab3-b9fe-40e6-bc7e-da856b3f833f/$get-ws-binding-token] with parameters [[]]"
        }
    ]
}
ZuSe commented 1 year ago

@tadgh As support for R5 is being released with the upcoming 6.6 can we expect the websockets to work or should I keep this ticket opened?

tadgh commented 1 year ago

Heya, I would recommend just checking our and building rel_6_6 branch and finding out.

Sadly I personally have not been involved with the upgrade to R5 or with the websockets implementation. I would hazard that this has not been done yet with the conversion. @jamesagnew did this bump so he may know more, but I think this would be a separate change to our subscription processor. Likely this ticket is still valid.

tadgh commented 1 year ago

Since we now support R5 though, this will likely be prioritized pretty quickly.

ZuSe commented 1 year ago

@tadgh is there any update on it? Glad to close the ticket if it has been already implemented, however I didnt find anything in the changelog.