Stream: subscriptions
Topic: multiple criteria
Eric Haas (Jan 23 2019 at 18:00):
The Subscription documentation suggests that multiple criteria are possible in a single Subscription resource...
The criteria are Search strings that ...
But no guidance or instruction how to delimit the strings. For example for a provider directory push to a local directory, I would like to query for the all the updated Practitioners, PractitionerRoles and Endpoints in a single subscription.
- Practitioner?address-postalcode=[zip list]
- PractitionerRole?practitioner.address-postalcode=[zip list]
- Endpoint?_has:PractitionerRole:endpoint:practitioner.address-postalcode=[zip list]
something like...
{ "resourceType": "Subscription", "id": "vhdir-connectathon-scenario-12", "status": "requested", "contact": [ { "system": "phone", "value": "ext 4123" } ], "end": "2020-01-01T00:00:00Z", "reason": "(push) healthcare directory data to multiple local directories", "criteria": "Practitioner?address-postalcode=[zip list],PractitionerRole?practitioner.address-postalcode=[zip list],Endpoint?_has:PractitionerRole:endpoint:practitioner.address-postalcode=[zip list]", "channel": { "type": "rest-hook", "endpoint": "https://directory.com/sub-endpoint", "payload": "application/fhir+json", "header": [ "Authorization: Bearer secret-token-abc-123" ] } }
spaces, commas? am I interpreting this correctly?
Grahame Grieve (Jan 23 2019 at 18:20):
that's misleading language. It's a set of search parameters in a single string
Eric Haas (Jan 23 2019 at 20:59):
so within the string are the set of search parameters separated by a space?
Grahame Grieve (Jan 23 2019 at 21:57):
no a single normal search string
Eric Haas (Jan 23 2019 at 22:18):
let me restate this.. I want all the updated Practitioners, PractiionerRoles and Endpoints. Since this isn't possible in a single search expression - do I need 3 separate Subscriptions?
Grahame Grieve (Jan 23 2019 at 22:21):
I think so
Grahame Grieve (Jan 23 2019 at 22:22):
is there anything else?
Eric Haas (Jan 23 2019 at 23:39):
I'd like to know from others whether or not is appropriate to have multiple criteria in a single subscription. If I'm a directory, I'd like all the information pushed at once in a single bundle e.g for referential integrity i'd expect the new Practitioner and all her PractitionerRoles and Endpoints to come as a bundle... @Brian Postlethwaite ?
Grahame Grieve (Jan 24 2019 at 10:09):
It wouldn’t make many difference. You’d get individual resources either way, and you can use multiple subscriptions for the same channel
Eric Haas (Jan 24 2019 at 16:38):
OK I misunderstood how the REST Hook works, to clarify: The subscription resource is based upon a single search string. The subscription service " forwards" ( e.g. updates) a copy of each individual resource to the nominated endpoint aka FHIR Server ( for the sake of argument - a middleman server) as opposed to rebundling a resultant search bundle as a batch and batching it. The Subscriber would then pull from the middleman server at its leisure. With a middleman this workflow is more like directed polling than pure push. if I described this correctly , I think it would be helpful to create trackers for:
- flesh out an example rest hook workflow a little more in the spec with pretty diagrams etc
- clarify the text to state one search: one subscription resource
- clarify that the payload is a resource and not a (search bundle) if that is true
Eric Haas (Jan 24 2019 at 16:41):
BTW TY @GG
Grahame Grieve (Jan 24 2019 at 19:50):
depends on whether there's a payload or not - no payload = directed polling. Payload = push
Last updated: Apr 12 2022 at 19:14 UTC