FHIR Chat · Notes from Subscriptions Wed Q1 · fhir/infrastructure-wg

Stream: fhir/infrastructure-wg

Topic: Notes from Subscriptions Wed Q1


view this post on Zulip Michael Donnelly (May 08 2019 at 13:09):

Pain points from the HL7 FHIR Connectathon this weekend:

  • Hard to subscribe to exactly what you want.
    • Knowing when something stops meeting your criteria (issue with expressivity)
  • Systems are broken down into topics and subscriptions; we want clear separation between those.
    • One topic can have multiple subscriptions.
    • Topics have been handled thus far as a Subscription linked to an EventDefinition
    • Good syntax and a framework will be better for R5 than what we have today.

view this post on Zulip Michael Donnelly (May 08 2019 at 13:12):

Josh has a proposal to refactor FHIR subscriptions and test it out at the HL7 FHIR Connectathon before this fall's WGM.
https://docs.google.com/document/d/1rjOI49M-PBVDT7DpLT9LolV4e3qNU1jZbBKdxTwtRE8/edit

view this post on Zulip Michael Donnelly (May 08 2019 at 13:12):

This won't use lots of extensions because there's a "developer ergonomics bias" against complicated structures like that.

view this post on Zulip Michael Donnelly (May 08 2019 at 13:14):

We're looking at examples of subscription mechanisms that have topics with filters.

view this post on Zulip Michael Donnelly (May 08 2019 at 13:16):

A trigger has:

  • a human readable description
  • a computable definition
    • native-FHIR systems (like HAPI) can use this
    • façade servers will have to write their own logic
  • what resources are subscription candidates for this topic

view this post on Zulip Michael Donnelly (May 08 2019 at 13:18):

A topic has a list of properties on which that topic can be filtered

  • almost all will be FHIR search criteria
  • not all FHIR search criteria will be filters

view this post on Zulip Michael Donnelly (May 08 2019 at 13:22):

Once you create a topic, nothing happens until there's a subscription to that topic.

view this post on Zulip Michael Donnelly (May 08 2019 at 13:23):

Topics can be server specific. If there are widely defined topics, a server will specify which of those it will support.

view this post on Zulip Michael Donnelly (May 08 2019 at 13:24):

:checkbox: PARKING LOT: how do we align topics from server to server?

view this post on Zulip Michael Donnelly (May 08 2019 at 13:26):

When a client wants to subscribe, it creates a subscription on the server. Much of this is like what we have today. Differences:

  • instead of search criteria, the client specifies the topic to which it wants to subscribe
  • it supplies a list of criteria for any filters defined in the topic

view this post on Zulip Michael Donnelly (May 08 2019 at 13:26):

Topic has "canFilterBy" and Subscription has "filterBy"

view this post on Zulip Michael Donnelly (May 08 2019 at 13:28):

(filterBy syntax can look a lot like FHIR search syntax)

view this post on Zulip Michael Donnelly (May 08 2019 at 13:28):

How does a provider get notifications about patients he or she cares about?

view this post on Zulip Michael Donnelly (May 08 2019 at 13:30):

Today you might be able to do something like "Encounter?patient:_has:Group:patient:_id=my-group"

view this post on Zulip Michael Donnelly (May 08 2019 at 13:32):

With this proposal, you'd filterBy "matchType": "memberOfGroup" with "value": ["Group/my-high-risk-patients"]

view this post on Zulip Michael Donnelly (May 08 2019 at 13:33):

:white_medium_square: PARKING LOT: Filter syntax
:checkbox: PARKING LOT: Scheduling use case

view this post on Zulip Michael Donnelly (May 08 2019 at 13:34):

Previously, there was no clear way to learn about something falling out of your search set.

view this post on Zulip Michael Donnelly (May 08 2019 at 13:35):

In the current system, when you have a REST hook channel, you specify a URL that the server treats as a FHIR base.

view this post on Zulip Michael Donnelly (May 08 2019 at 13:35):

In this proposal, the server posts a bundle to that URL.

view this post on Zulip Michael Donnelly (May 08 2019 at 13:35):

A FHIR server can parse the Bundle and use it. Other clients will know it'll get everything to the same place.

view this post on Zulip Michael Donnelly (May 08 2019 at 13:36):

If a server only wants tobatch up notifications (e.g. twice a minute), it can put more things in the Bundle.

view this post on Zulip Michael Donnelly (May 08 2019 at 13:36):

Bundles can handle deletes.

view this post on Zulip Michael Donnelly (May 08 2019 at 13:37):

A client can say they only want the IDs and not the full resources.

view this post on Zulip Michael Donnelly (May 08 2019 at 13:37):

Some clients want nothing - jsut getting pinged on the endpoint with an empty payload will let them know something happened.

view this post on Zulip Michael Donnelly (May 08 2019 at 13:38):

The last case could be useful if the message is going through somewhere unsecure.

view this post on Zulip Michael Donnelly (May 08 2019 at 13:38):

How does a Bundle do a delete?
Bundle.entry.request.method=DELETE

view this post on Zulip Michael Donnelly (May 08 2019 at 13:39):

This Bundle is the server telling the client, "This is what you should execute to look like me."

view this post on Zulip Michael Donnelly (May 08 2019 at 13:41):

But many clients don't want to look like the server.

view this post on Zulip Michael Donnelly (May 08 2019 at 13:41):

Should this be a transaction bundle or a history bundle?

view this post on Zulip Michael Donnelly (May 08 2019 at 13:42):

A transaction Bundle only allows you to send the request part.

view this post on Zulip Michael Donnelly (May 08 2019 at 13:42):

So history is probably what we want. (Josh updated his Google doc)

view this post on Zulip Michael Donnelly (May 08 2019 at 13:43):

How can a server detect deletes?

view this post on Zulip Michael Donnelly (May 08 2019 at 13:46):

Before: Practitioner.org = 123
After: Practitioner.org:not=123

view this post on Zulip Michael Donnelly (May 08 2019 at 13:47):

But the latter won't work because there's nothing to evaluate.

view this post on Zulip Michael Donnelly (May 08 2019 at 13:47):

There's no resource to reason about.

view this post on Zulip Michael Donnelly (May 08 2019 at 13:53):

Even with an implied search criterion of _id being the current context, nothing will ever be true (in FHIRpath) for it.

view this post on Zulip Michael Donnelly (May 08 2019 at 13:53):

Maybe After: "$not-found"

view this post on Zulip Michael Donnelly (May 08 2019 at 13:53):

?

view this post on Zulip Michael Donnelly (May 08 2019 at 13:54):

Looks like in addition to Before and After with FHIRpath, we need boolean's of isDeletion and isCreation.

view this post on Zulip Michael Donnelly (May 08 2019 at 13:55):

:star: For later follow up: we need syntax to address detection of deletion and creation in native FHIR servers.

view this post on Zulip Michael Donnelly (May 08 2019 at 13:59):

Scheduling use case

view this post on Zulip Michael Donnelly (May 08 2019 at 14:00):

A client wants to know about schedule slots - when it can schedule appointments

view this post on Zulip Michael Donnelly (May 08 2019 at 14:00):

They're looking at Slots as a proxy for time periods that a Practitioner is available.

view this post on Zulip Michael Donnelly (May 08 2019 at 14:02):

Subscribe to Slot where Practitioner=123

view this post on Zulip Michael Donnelly (May 08 2019 at 14:02):

They get an update when the Slot changes

view this post on Zulip Michael Donnelly (May 08 2019 at 14:03):

The client does a couple of queries.

view this post on Zulip Michael Donnelly (May 08 2019 at 14:03):

The problem is that there's no Practitioner on Slot.

view this post on Zulip Michael Donnelly (May 08 2019 at 14:05):

Idea: instead of subscribing to Slot, the client could subscribe to changes in Schedule for Practitioner, but when there's a change the client would requery for Slots for that Practitioner.

view this post on Zulip Michael Donnelly (May 08 2019 at 14:06):

Canonical references

view this post on Zulip Michael Donnelly (May 08 2019 at 14:07):

Josh would like an Argonaut IG to point to topics out there somewhere.

view this post on Zulip Michael Donnelly (May 08 2019 at 14:07):

url - server declares its own canonical url
instantiatesUrl - declare alignment with an official topic

view this post on Zulip Michael Donnelly (May 08 2019 at 14:13):

Should a Subscription.topic be to a shared URL or one specific to the server?

view this post on Zulip Michael Donnelly (May 08 2019 at 14:14):

:star: This remains an open question.

view this post on Zulip Michael Donnelly (May 08 2019 at 14:15):

Filter Syntax

view this post on Zulip Michael Donnelly (May 08 2019 at 14:16):

Should we have filters split out into separate JSON elements or combined into comma separated lists?

view this post on Zulip Michael Donnelly (May 08 2019 at 14:18):

Arbitrary. The group has a weak preference for JSON, and we'll try that out first, but we're open to considering the other way in the future.

view this post on Zulip Michael Donnelly (May 08 2019 at 14:21):

Motion
@Eric Haas moved/Michael Donnelly seconded:

  • Use Josh's proposal to
    • draft a new Topic resource
    • update the Subscription resource
    • make best effort to resolve the outstanding issues (see stars in this Zulip topic)
    • get it into the CI build
  • test this in an HL7 FHIR Connectathon track this September.
    Vote: 13/0/0

view this post on Zulip Michael Donnelly (May 08 2019 at 14:23):

Considering Michele's alternate proposal
https://github.com/CareEvolution/Public/blob/master/Subscriptions.md

view this post on Zulip Michael Donnelly (May 08 2019 at 14:23):

Use a List for subscriptions.

view this post on Zulip Michael Donnelly (May 08 2019 at 14:24):

Entries are added to or removed from the List by the server. (The mechanism for this is up to the server.)

view this post on Zulip Michele Mottini (May 08 2019 at 14:25):

I have an alternative proposal: https://github.com/CareEvolution/Public/blob/master/Subscriptions.md (that is backward compatible, so it can be used in existing servers)

view this post on Zulip Michael Donnelly (May 08 2019 at 14:25):

There could be a list of "Admissions in the last 24 hours"

Josh: Since the items in the list are patients, the list should be called "Patients who were admitted in the last 24 hours".

view this post on Zulip Michael Donnelly (May 08 2019 at 14:26):

A client can subscribe to the List and get notification of changes to it.

view this post on Zulip Michael Donnelly (May 08 2019 at 14:26):

In the example of "patients admitted in the last 24 hours", the list would be updated when a new patient is admitted or when a patient on that list has been admitted for more than 24 hours.

view this post on Zulip Michael Donnelly (May 08 2019 at 14:27):

Josh: In my opinion, this doesn't address the core concerns we have including scalability.

view this post on Zulip Michael Donnelly (May 08 2019 at 14:27):

JM: the list could get longer and longer over time.

view this post on Zulip Michele Mottini (May 08 2019 at 14:28):

It works for us - and we have some fairly large deployments

view this post on Zulip Michele Mottini (May 08 2019 at 14:32):

(fairly large = tens of million patients, billion of data points)

view this post on Zulip Michael Donnelly (May 08 2019 at 14:33):

Q1 ended. Notes above aren't my opinions or arguments, they're notes on the discussion that took place at the WGM.

view this post on Zulip Michael Donnelly (May 08 2019 at 14:33):

@Josh Mandel you can put as more or little of this as you want into the minutes.

view this post on Zulip Michele Mottini (May 08 2019 at 14:34):

(thanks Michael for 'live-streaming' it)

view this post on Zulip Josh Mandel (May 08 2019 at 19:15):

Thanks a bundle @Michael Donnelly -- This is super helpful for folks who could not join. I've added pretty much all these notes verbatim to the official minutes as well.

view this post on Zulip Brian Postlethwaite (May 15 2019 at 00:59):

I'm not a big fan of using a deletion in a bundle to indicate that the item went out of the search.
Is this process also to be used to handle actual deletions?
I would have preferred including the new version of the resource (with whatever details it does have) and include an extension in the bundle entry to indicate that it went out of range. If the resource was excluded for security (or other) issues, there is enough detail to know without the actual resource. Deletion just feels wrong.
I do like the List idea.

view this post on Zulip Josh Mandel (May 15 2019 at 01:09):

On deletion, just to be clear: if the resource actually was deleted, then an entry with "DELETE" makes sense to you @Brian Postlethwaite ?

view this post on Zulip Josh Mandel (May 15 2019 at 01:12):

It's just for the "got updated" case that you're concerned? Because I think updates should be conveyed as "Bundle.entry.request.method": "UPDATE"

view this post on Zulip Brian Postlethwaite (May 15 2019 at 01:17):

yes a real deletion is fine. Its for cases where the filter was Practitioner.active = true and the record is updated to not be active.
Its still there, but isn't wanted to be included anymore. Don't want to delete it, as there is content referencing it.
Just need to know that this specific ID went out of range, and I should also mark it.
This would be very useful to have the new data to update in-place, then I can see why, and choose what to do with my own system.

view this post on Zulip Josh Mandel (May 15 2019 at 01:24):

Agreed. Is that inconsistent with what we wrote, or just unclear?

view this post on Zulip Brian Postlethwaite (May 15 2019 at 01:43):

Wasn't clear in the discussion above, I'll re-read the updated content.


Last updated: Apr 12 2022 at 19:14 UTC