FHIR Chat · Connectathon 28 - September 2021 · subscriptions

Stream: subscriptions

Topic: Connectathon 28 - September 2021


view this post on Zulip Gino Canessa (Jul 22 2021 at 16:14):

Just starting the September Connectathon Stream, hope to see you all there!

view this post on Zulip Gino Canessa (Aug 18 2021 at 17:07):

Hi all, just wanted to post here that I have starting recording content for the Connectathon. So far, I have a Subscriptions Overview (high-level walkthrough of the mechanisms and parts) and a spec walkthrough of the R4 versions.

I'll keep this GitHub page up to date and post here as I do more. Next up will be a walkthrough of the reference implementation, and then I'll jump into some coding examples.

Cheers!

view this post on Zulip Eric Haas (Aug 30 2021 at 18:22):

@Gino can we add the following subscription topics to the reference implementation to support notifications:

encounter-end
encounter-transfer

let me know if you need more information

view this post on Zulip adam strickland (Sep 03 2021 at 17:26):

Hi @Gino Canessa , we likely won't have support for programmatic subscription creation ready for the Connectathon, and are focusing on the notification and query-event support right now. To that end, I was wondering if we could have a dedicated scenario for just testing communications/error-handling with $status/$events, that doesn't have the precondition of the create fhir subscription scenario.

I can write up the scenario, and I'm working on updates to the reference implementation that include a sort of state-machine capturing how clients should react to certain subscriptionStatus payloads. To separate that scenario from the fhir subscription create, I'm planning to update the client and client-host (may need help there) to BYO client-host URL, so that we can hook up one subscription client and have many client-ui instances interact with it.

Let me know what you think!

view this post on Zulip Dan Tripp (Sep 03 2021 at 21:58):

Looking forward to this connectathon. To prepare I tried to test with subscriptions.argo.run, R5, and I can't tell if it's working. I get "Failed to connect to FHIR server" and a 404 on https://server.subscriptions.argo.run/r5/metadata in the browser console. If anyone has any suggestions, let me know.

view this post on Zulip Josh Mandel (Sep 03 2021 at 22:21):

Awesome @Dan Tripp! (Thanks for the bug report with the R5 endpoint. And just to make sure you've seen them, keep in mind that our connectathon scenarios will be focused on on R4 + "Subscriptions backport" rather than R5.)

view this post on Zulip Gino Canessa (Sep 03 2021 at 22:37):

@adam strickland I'm fine with having something written up, but I believe it's a bit late to change the official scenarios for the connectathon. That said, I'm happy to help flesh out the scenario and see what can be done (next week =).

@Dan Tripp Thanks for bringing it up! As Josh mentioned, we're focusing primarily on R4 but I do want to ensure that R5 is up and running. I'll look into the error either over the weekend or early next week.

Cheers!

view this post on Zulip Dan Tripp (Sep 07 2021 at 16:06):

Very good - I'll focus on the backport. Great videos, @Gino Canessa

view this post on Zulip Dan Tripp (Sep 07 2021 at 22:13):

I was working on the backport today and had some success, then hit a snag. It looks like I get a handshake okay, but then no notifications. I've attached a curl session of what I did. I welcome any advice, as it would put me in a better position for the start of the connectathon.

Naturally my server side doesn't show up in this curl transcript. But I saw in my server logs that I got a handshake. I configured my server to return a 200 status for it and an empty response body.

curl-session.txt

view this post on Zulip Gino Canessa (Sep 08 2021 at 14:45):

Hi @Dan Tripp , just wanted to ping here since investigation is taking longer than I expected (was hoping to just post 'done' =). On the plus side, I found a gap in tooling that I'm working on right now. Once that's done, I assume it will be fairly quick to diagnose.

Just wanted to post something so you knew I was working on it.

view this post on Zulip Dan Tripp (Sep 08 2021 at 18:01):

Great! Keep me posted.

view this post on Zulip Gino Canessa (Sep 08 2021 at 21:47):

@Dan Tripp , I think I've sorted it. The issue I found was unrelated to anything you were doing specifically - there was a problem with the encounter:subscription notification matching when subscriptions were deleted. When it ran into that issue, notifications for any subscription 'behind' the deleted one would never be sent. I believe this matches the behavior you were seeing (e.g., some number of notifications would come through, then no more).

I'm continuing to test here, but please let me know if this has you unblocked. Thanks!

view this post on Zulip Dan Tripp (Sep 09 2021 at 01:02):

I tried it again just now and I got some notifications. Thank you.

view this post on Zulip Gino Canessa (Sep 09 2021 at 14:35):

As a note, I'll be pushing out another update shortly - a similar behavior can occur with an active subscription that's not responding.

view this post on Zulip adam strickland (Sep 09 2021 at 21:19):

Hi everyone. What was the name of that Da Vinci session we were talking about as a breakout in the last meeting? Looking to join at the Connectathon.

view this post on Zulip Gino Canessa (Sep 09 2021 at 22:01):

The schedule is up in Whova (direct link to that meeting), but it's 11:00 AM - 12:00 PM US Eastern time on Wednesday the 15th.

We've also added a breakout with FHIRcast after that (12:00 PM US Eastern) (direct link).

Cheers!

view this post on Zulip Eric Haas (Sep 10 2021 at 02:07):

@Gino Canessa you have raised the damn bar ... these videos are fantastic!

view this post on Zulip Eric Haas (Sep 10 2021 at 08:12):

I am unable to connect to my webhook endpoint here : "https://flask-pubsub-endpoint.healthedata1.co/webhook" from https://subscriptions.argo.run/

The console error is :

Access to fetch at 'https://flask-pubsub-endpoint.healthedata1.co/webhook/api/Clients/' from origin 'https://subscriptions.argo.run' has been blocked by CORS policy: Response to preflight request doesn't pass access control check: No 'Access-Control-Allow-Origin' header is present on the requested resource. If an opaque response serves your needs, set the request's mode to 'no-cors' to fetch the resource with CORS disabled.
flask-pubsub-endpoint.healthedata1.co/webhook/api/Clients/:1 Failed to load resource: net::ERR_FAILED

view this post on Zulip Gino Canessa (Sep 10 2021 at 13:54):

Based on the error, I'd assume that you don't have CORS configured on your endpoint to allow requests from another host. I'm adding it to my list of videos to go over, but in the meantime:

  • MDN has a great detailed overview of CORS
  • TLDR: for testing, it is simplest to set your service to allow any origin, any method, and any headers.
    • I believe you use Flask, so Flask-CORS is probably the simplest

view this post on Zulip Eric Haas (Sep 11 2021 at 00:21):

Still no success and looking at the console message I am confused....

I have a REST-Hook endpoint at https://flask-pubsub-endpoint.healthedata1.co/webhook which can be POSTED to successfully using POSTMAN.

but the console message above refers to a https://flask-pubsub-endpoint.healthedata1.co/webhook/api/Clients/' . There is no ~/api/Clients endpoint. and when I check the logs on my end:

....."GET /webhook/api/Clients/ HTTP/1.1" 404 232 "-" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/92.0.4515.159 Safari/537.36" "24.5.96.202" response-time=0.001

What are the expectations for an externally hosted endpoint using the demo app?

view this post on Zulip Gino Canessa (Sep 13 2021 at 00:49):

Alright @Eric Haas , I figured out what is happening. You have been putting your endpoint URL into the client-host setting field (that field is used for internal configuration - it's only present in case someone has cloned the repos and is running it somewhere else).
So, I just pushed up a new version.

  • moved that configuration field to 'advanced settings'
  • added a new tab 'Patient+REST Endpoint' specifically for testing a new endpoint in the scenario. I'll try to record a walkthrough of the changes tomorrow, but it just asks for your endpoint URL when adding the subscription.

It doesn't have anything in the way of validation yet, but I plan to work on it more tomorrow.

Otherwise, you can also setup a subscription with External REST Hook in the Playground tab to work with your endpoint. The main test area can't work with external endpoints since it won't have any idea if the notifications are happening. I may try to add more of that type of info tomorrow as well (e.g., by querying the subscription status and displaying that), but this should provide a nice path in the meantime.

Hope this helps, cheers!

view this post on Zulip Eric Haas (Sep 13 2021 at 17:41):

the Playground works but I get this for the Patient + REST Server tab...

view this post on Zulip Eric Haas (Sep 13 2021 at 17:48):

"invalid endpoint URL... must start with http:// or https:// ..."

view this post on Zulip Eric Haas (Sep 13 2021 at 17:48):

my endpoint ishttps://flask-pubsub-endpoint.healthedata1.co/webhook

view this post on Zulip Eric Haas (Sep 13 2021 at 17:49):

when I click on the Create Subscription button...

view this post on Zulip Gino Canessa (Sep 13 2021 at 17:50):

Odd - that is working for me. You need to be in the Patient+REST Endpoint tab (I believe you are, since that's the only place you can see that error). Then you need to put your endpoint url in the top text box of the Request a Subscription on the FHIR Server card.

view this post on Zulip Eric Haas (Sep 13 2021 at 17:51):

The workflow I remember and what I was going for was:
to searching for the subscriptions available:

image.png

view this post on Zulip Eric Haas (Sep 13 2021 at 17:52):

.. and then suscribe from an external app...

image.png

view this post on Zulip Eric Haas (Sep 13 2021 at 17:53):

then set up argo run rest endpoint to send the notification to external endpoint....

image.png

view this post on Zulip Eric Haas (Sep 13 2021 at 17:54):

I swear this worked in May and before...???

view this post on Zulip Gino Canessa (Sep 13 2021 at 17:54):

Do you want to hop on a quick call?

view this post on Zulip Eric Haas (Sep 13 2021 at 17:54):

sure

view this post on Zulip Gino Canessa (Sep 13 2021 at 20:27):

@Eric Haas , I've added the ability to search for an existing subscription in both Patient+REST Endpoint and the Playground tabs. I'm continuing to work on the actual subscription search, but it should let you unblock and keep working for now.

For example, to use the search in Patient+REST Endpoint, just skip down to the Search button in the Request a Subscription on the FHIR Server card. It will bring up an overlay to search in (right now the server doesn't advertise any search parameters on Subscription, so the dropdown is empty and it looks odd), click Search in the overlay to show a list of subscriptions on the server, select one and click Use Selected Subscription. From there, you should be able to post Encounters and have them show up at your endpoint.

I'm adding search advertising to the server next so that the dropdown will have values and allow quick searching on ID / endpoint / etc., but not sure how long that will take.

Please test and let me know. Cheers!

view this post on Zulip Gino Canessa (Sep 13 2021 at 22:22):

As a note, I've restarted the proxy server, so any existing subscriptions will have been wiped. It's updated to include some search parameters on Subscription and a fix for R5.

view this post on Zulip Dan Tripp (Sep 13 2021 at 23:57):

Gino Canessa said:

As a note, I've restarted the proxy server, so any existing subscriptions will have been wiped. It's updated to include some search parameters on Subscription and a fix for R5.

So that's why my subscription disappeared between 18:21:19 and 18:22:33 today!

view this post on Zulip Eric Haas (Sep 14 2021 at 06:35):

need to change title in pop up to say "Search and Select Subscripion"

image.png

view this post on Zulip Eric Haas (Sep 14 2021 at 07:06):

@Gino Canessa works as advertised and thanks,

image.png

view this post on Zulip Eric Haas (Sep 14 2021 at 07:09):

Would be nice to be able to tap into the FHIR reference servers to search for patients :-)

view this post on Zulip Gino Canessa (Sep 14 2021 at 12:01):

Great! We can post whatever patients we want. And given that the reference servers are down, I think it was worth the effort to move away from them. :grinning_face_with_smiling_eyes:

view this post on Zulip Aravind Raghunath (Sep 15 2021 at 06:45):

@Gino Canessa We are trying to connect to https://subscriptions.argo.run/, and we get handshake failure as response, is there any certificate missing for the same???

view this post on Zulip Gino Canessa (Sep 15 2021 at 14:31):

Hi @Aravind Raghunath , could you provide a bit more information about the error you are seeing?

view this post on Zulip Aravind Raghunath (Sep 15 2021 at 16:19):

Hi @Gino Canessa logs.txt
Please find attached the log file that we were able to capture for the handshake failure

view this post on Zulip Gino Canessa (Sep 15 2021 at 18:24):

Ahh, https://subscriptions.argo.run is the URL for a web UI to interact with a system. If you want a REST endpoint to test against, you can:

  • go to that web page
  • navigate to the Playground tab
  • On the Client / Host - REST Endpoint Interactions card, click Create New REST Endpoint

The URL in the Info box (last line, will start with https://client.subscriptions.argo.run/...) is a REST Endpoint you can post notifications to. Received notifications will appear in the first box of the page (Subscription Notifications).

edit: or, if you are trying to talk to a FHIR server with subscriptions implemented, you can connect to https://server.subscriptions.argo.run/r4 or https://server.subscriptions.argo.run/r5 .

view this post on Zulip Anurag Dongre (Sep 15 2021 at 22:07):

Thanks @Gino Canessa , I was facing the same issue when doing the Notifications. Overall, we did attempted few use cases, I'm attaching details if you may want to use it for tracking...Session were really helpful, we will try to polish our implementation with whatever we collected from this gathering.

view this post on Zulip Anurag Dongre (Sep 15 2021 at 22:08):

Connectathon_Subscription_Exercise.docx

view this post on Zulip Gino Canessa (Sep 15 2021 at 22:16):

Thanks @Anurag Dongre ! I appreciate all the effort. If you need anything else, please don't hesitate to reach out.


Last updated: Apr 12 2022 at 19:14 UTC