Stream: implementers
Topic: Searching for a specific bundle
Teun Pronk (May 22 2019 at 14:05):
Hi all,
I can't seem to figure out how to search for a specific bundle.
The bundles are received and they are of the document type.
For example the bundle contains:
a composition, which has an identifier with system: <SystemUrl> and value: <123>
Is there a way to search for bundles that have a composition with an identifier that has those values?
John Moehrke (May 22 2019 at 14:13):
Bundles are not persisted. It is possible that an import action chooses to archive the Bundle. It would then tend to do this with a DocumentReference or Provenance to a Binary, where the Binary holds the Bundle as it was received. See http://build.fhir.org/provenance.html#6.3.5.5
Paul Church (May 22 2019 at 14:25):
There's Bundle?composition.identifier, but note that the composition has to be the first entry in the document bundle (the composition search parameter is Bundle.entry[0].resource).
Lloyd McKenzie (May 22 2019 at 14:38):
@John Moehrke It's not true that Bundles aren't persisted. If you POST a document or message Bundle to the Bundle endpoint, it will absolutely be persisted there. And you can search the Bundle endpoint using chaining to filter based on the search parameters in Composition or MessageHeader. E.g. Bundle?composition.message=123 or Bundle?composition.type=ABC
Yunwei Wang (May 22 2019 at 14:40):
Bundle?composition.identifier=<systemUrl>|123
Teun Pronk (May 24 2019 at 09:02):
@Yunwei Wang (or anyone else :) ) I have tried this and for some reason it will not yield any results.
Bundle?composition.identifier=http://zorgdomein.nl/zdnumber/|ZP10002970 wont return anything even though there is a result for it (or rather, there should be)
So I have tried searching for:
Bundle?composition.title=ZP10002970
and
Bundle?composition.title:contains=ZP10002970
Which will also give no results.
Any ideas?
René Spronk (May 24 2019 at 09:48):
Have you verified whether the server you're using supports those parameters?
Teun Pronk (May 24 2019 at 09:51):
The server im using has very little documentation available but seeing issues on the github repository and an answer on StackOverflow would indicate that it should allow chained searching
Edit: Im using Spark, if that helps
René Spronk (May 24 2019 at 10:28):
Have you inspected it's capability statement? That should tell you what parameters it supports for Bundle as well as Composition.
Teun Pronk (May 24 2019 at 10:52):
The capabilityStament doesnt seem to exist, but google led me to the endpoint/metadata which shows it supports Composition as search parameter for bundles, and it does support identifier for composition aswell
René Spronk (May 24 2019 at 11:05):
In that case: your query looks OK to me, and it doesn't work as expected. Does it simply return an empty bundle, or is there an OperationOutcome ?
Teun Pronk (May 24 2019 at 11:07):
It returns an empty searchset.
Teun Pronk (May 24 2019 at 11:09):
Bundle/5 shows exactly what im looking for in the composition but the search doesnt seem to pick it up
Teun Pronk (May 24 2019 at 11:10):
Teun Pronk (May 24 2019 at 14:10):
Found the cause of the problem.
Spark runs on MongoDb, it contains a table searchindex, this contains all searchfields for each individual resource.
So for each patient, for each bundle, for each organization it shows the searchfields and the values that goes with it.
It would appear that the fields for composition are not added for bundles of type document as you would expect.
Going to look for a solution now, if anyone with Spark experience has an idea on how to fix this please let me know :)
Yunwei Wang (May 24 2019 at 15:48):
@Teun Pronk Are you developing a server or client? First I thought you are working on a client solution. In that case, you can only cross your fingers and hope the server supports that one day. If you are working on a server solution, you need to figure out your own way to provide this search capabilities.
Teun Pronk (May 27 2019 at 05:48):
@Yunwei Wang we work on both, that said.. we arent making our own server, we use Spark which is an open source solution.
Last updated: Apr 12 2022 at 19:14 UTC