FHIR Chat · Chained searches · implementers

Stream: implementers

Topic: Chained searches


view this post on Zulip Ben Spencer (Oct 10 2017 at 06:06):

I have a few questions on chained searches (https://www.hl7.org/fhir/search.html#chaining):

1) is it possible to combine chained and reverse chained parameters? (contrived examples for Observation: patient._has:Condition:subject:identifier=myid, _has:Procedure:part-of:patient.active=true

2) can a (possibly reverse) chained search specify multiple restrictions on one join? eg search for all patients with an Appointment with status booked today, or all patients with an active EpisodeOfCare for a particularOrganization (I'm assuming that _has:EpisodeOfCare:patient:identifier=myid&_has:EpisodeOfCare:patient:active=true does two separate joins, is this correct?)

3) taking 2) a bit further, can I specify conditions along the join path, eg all patients with an active EpisodeOfCare for an Organization whose name matches 'foo'?

view this post on Zulip Christiaan Knaap (Oct 10 2017 at 06:58):

1 is possible.
2 is not, except if a Composite SearchParameter is defined on the two components that you want to combine. (You could define and add it yourself on some servers).
3 is not possible, there is not even syntax for it.
NB: If you try it on Vonk, example 1b will fail because of the searchparameter with the hyphen (part-of) - will be fixed soon.

view this post on Zulip Ben Spencer (Oct 10 2017 at 10:46):

thanks

view this post on Zulip Michael Calderero (Nov 15 2017 at 16:01):

Hi All - I'd just like to confirm my understanding of chained searching.

The spec says I can (for lack of a better phrase) chain search parameters, like the following contrived example: DiagnosticReport?context.subject.managingOrganization.identifier=http://a.b/c|123

And the spec says I can limit the chain to a particular type. So can I take the following search above and modify it to something like this?: DiagnosticReport?context:Encounter.subject:Patient.managingOrganization:Organization.identifier=http://a.b/c|123

view this post on Zulip Lloyd McKenzie (Nov 15 2017 at 17:23):

That looks correct to me

view this post on Zulip Christiaan Knaap (Dec 03 2017 at 20:00):

The format is indeed right. But the managingOrganization is not, the searchparameter for that is called 'organization'.
A good way to find out about this is to simply try the search on one or several of the public test servers: http://wiki.hl7.org/index.php?title=Publicly_Available_FHIR_Servers_for_testing


Last updated: Apr 12 2022 at 19:14 UTC