FHIR Chat · search: chaining _has and normal chained parameters · implementers

Stream: implementers

Topic: search: chaining _has and normal chained parameters


view this post on Zulip Michael Calderero (Apr 05 2018 at 21:37):

I have a
Model: There is a reference link Medication<-MedicationRequest<-DiagnosticReport->Encounter->Patient
Goal: Get all Medication requested during all Patient "molly"'s visits
request: Medication?_has:MedicationRequest:medication:_has:DiagnosticReport:based-on:context.subject.name=molly

The Vonk server seems to supports this and gives me the medication record, while HAPI and tx.fhir.org give me errors. Given that at least one server returns results I'm assuming that this kind of chaining is allowed as per the spec.

Suppose I have a
Model: There is a reference link DiagnosticReport->Observation<-Condition
Goal: Get DiagnosticReports with result Observations referred to by Condition ddd

Is the following request correct/possible? I tried to do DiagnosticReport?result=_has:Condition:evidence-detail:code=ddd
but I got an error on HAPI, tx.fhir.org. Vonk just returned an empty bundle. Not sure if it's due to the syntax or it's completely not allowed as per the spec.

view this post on Zulip Grahame Grieve (Apr 05 2018 at 22:01):

tx.fhir.org doesn't yet implement reverse include - it's on my list

view this post on Zulip Michael Calderero (Apr 05 2018 at 22:10):

I'm not talking about reverse include though, but rather chaining/reverse chaining parameters and asking about the possible ways you could combine them in a single search parameter.

view this post on Zulip Christiaan Knaap (Apr 06 2018 at 10:27):

DiagnosticReport?result=_has:Condition:evidence-detail:code=ddd is accepted by Vonk because "_has:Condition:evidence-detail:code=ddd" is accepted as a relative uri. But it does not make sense, and will never match any resource. Hence the empty bundle. We may need to be more strict on the format of references.

view this post on Zulip Michael Calderero (Apr 06 2018 at 12:01):

Ok understood.

So is there no possible way to search on the last example I gave? Maybe adding some additional param that has the same idea as _has but used for forward chaining, like:

DiagnosticReport?_its:Observation:result:_has:Condition:evidence-detail:code=ddd

view this post on Zulip Michael Calderero (Apr 06 2018 at 12:23):

Using my first example, the query could be written in two ways; (1) which is already defined above or by using this new imaginary param:

Medication?_has:MedicationRequest:medication:_has:DiagnosticReport:based-on:_its:Encounter:context:_its:Patient:subject:name=molly


Last updated: Apr 12 2022 at 19:14 UTC