Stream: implementers
Topic: Search on bundle of type document
Jakob Hartl (Aug 07 2019 at 13:06):
We are currently implementing the $document operation on composition resource. If the persist parameter is set to true, the bundle will be stored. Of course, the composition is the first element in the bundle.
The question is now, how to search for the bundle? Is it just possible to search for the id of the composition? e.g. Bundle/?type=document&composition=0e00ea44-febf-4b78-ad77-d89d242a9c3b
I searched the web and the chats, but couldn't find the answer.
Lloyd McKenzie (Aug 07 2019 at 14:23):
Use chaining. E.g. Bundle?composition.date=1990&composition.subject=foo
Shovan Roy (Aug 07 2019 at 23:18):
Can this be GET [base]/Composition/[id]/$document ? or if it was stored as Bundle, then can be read on the Bundle endpoint using Bundle.id.. isn't it ?
Lloyd McKenzie (Aug 08 2019 at 00:54):
It depends - are you trying to generate a document or query a document that's already been created and stored? You can certainly retrieve something by Bundle.id - if you know the id. But most of the time if you're searching for documents, you won't.
Shovan Roy (Aug 08 2019 at 00:57):
Agreed, in that case searching the corresponding DocumentReference ( if managed in that way) then get access to the respective Bundle (document) would be better choice in my understanding.
Jakob Hartl (Aug 08 2019 at 07:39):
We've created the bundle already and stored it. For the next call of the operation we want to see, if there is already a bundle.
The question was, how the search on a bundle of type document works? See https://www.hl7.org/fhir/bundle.html#search
Is your example Bundle?composition.date=1990...
correct? As the search parameter is from type reference, I should just be able to search for the composition by id, right? Bundle?composition=1234
Lloyd McKenzie (Aug 08 2019 at 08:01):
The id of the composition would typically be a GUID. In theory, there could be multiple versions of a document generated with the same Composition, so that might not give you a single hit. (However in that case, a search based on other elmeents would probably also not give you a single hit.)
sean zitello (Mar 19 2020 at 16:25):
Jakob Hartl said:
We've created the bundle already and stored it. For the next call of the operation we want to see, if there is already a bundle.
The question was, how the search on a bundle of type document works? See https://www.hl7.org/fhir/bundle.html#search
Is your exampleBundle?composition.date=1990...
correct? As the search parameter is from type reference, I should just be able to search for the composition by id, right?Bundle?composition=1234
Were you able find anything that works for Bundle?composition searches ... I have tried several servers and cant find one that returns non-0 results?
Last updated: Apr 12 2022 at 19:14 UTC