Stream: hapi
Topic: Search Inside Bundle Entry
Chiranjiv Roy (Nov 19 2020 at 20:32):
We have bundles stored in fhir server as 'document'. These bundles have resources of resourceType 'composition'. We want to search with identifier in these composite resources inside the bundle. Is it possible with hapi fhir?
Example bundle: http://hapi.fhir.org/baseR4/Bundle/1680668
We want to search resources inside this bundle that match this zdnumber:
"identifier": {
"system": "http://zorgdomein.nl/zdnumber/",
"value": "ZP10006208"
},
Bishakh Ghosh (Nov 20 2020 at 07:33):
Interesting. Can somebody suggest something?
Patrick Werner (Nov 20 2020 at 11:09):
I would suggest to not persist the whole bundle, but the individual resources. If you need the document, generate it with $document operation.
Patrick Werner (Nov 20 2020 at 11:10):
Bundle has the searchParameter composition
, this would work if hapi would support identifier references: http://hapi.fhir.org/baseR4/Bundle?composition:identifier=ZP10006208
Jens Villadsen (Nov 20 2020 at 11:59):
@Patrick Werner doesn't that only apply for the identifier of the document itself? It sounds like the need here is to search for references inside the document
Patrick Werner (Nov 20 2020 at 12:02):
Ah, you are right. I thought the question was only about the composition identifier.
Patrick Werner (Nov 20 2020 at 12:02):
Then i would go with individual resources
Lin Zhang (Nov 20 2020 at 13:18):
Followed:fire:
Jens Villadsen (Nov 20 2020 at 18:42):
or ... add custom search indexes into the bundle according to your needs. We actually did that in an installation as the storing of the document was way faster compared to splitting it up and store the entries individually (there where roughly 200 entries in the document if I remember correctly).
Jens Villadsen (Nov 20 2020 at 18:43):
storing the document was a matter of millis - whereas storing 200 entries took around 2-3 secs
Jens Villadsen (Nov 20 2020 at 18:44):
and ofc. one could then create an async job to do the splitting afterwards ... but then we are talking a bit more complexity
Lin Zhang (Nov 21 2020 at 06:00):
How about both storing the document (including the individual resource entries) and storing the entries?
Lin Zhang (Nov 21 2020 at 06:01):
Is it allowable/permitted according to the FHIR spec?
Kevin Mayfield (Nov 21 2020 at 06:33):
We add a facade in front of the hapi server which converts the message or document into a transaction bundle.
This stored a lot faster in hapi
Jens Villadsen (Nov 21 2020 at 11:59):
@Kevin Mayfield you did that synchronously without a performance penalty?
Kevin Mayfield (Nov 21 2020 at 13:02):
Sync, individually it was taking around 2-3 mins, afterwards less than a minute
Jens Villadsen (Nov 21 2020 at 13:05):
Well ... I have 400 ms - but good to know others also have had a look at this
Derek Ritz (Nov 21 2020 at 17:18):
Please can I confirm what I think I'm understanding, here... If a document is persisted to the FHIR server (that includes a composition... such as an International Patient Summary, for example) -- then the resources inside the document, such as medication statement etc., are not individually searchable. Do I understand that correctly?
Kevin Mayfield (Nov 22 2020 at 20:28):
Yes
Derek Ritz (Nov 24 2020 at 15:58):
Thanks @Kevin Mayfield . Is it true that they are not searchable only within the document itself... or is it also true that they are not discoverable when looking for (for example) medication orders related to the patient?
Kevin Mayfield (Nov 24 2020 at 16:55):
I understand it is stored in HAPI as a Bundle, so only the Bundle is searchable. Not it's contents, so I don't believe either would work.
If you break up the bundle into it's component parts and store those in HAPI separately it would be searchable.
Jens Villadsen (Nov 24 2020 at 17:00):
yep - or add custom search parameters (as described pr. https://blog.smilecdr.com/2017/02/08/custom-search-parameters-in-hapi-fhir/)
Jens Villadsen (Nov 24 2020 at 17:01):
that points inside the bundle that is - but that shouldn't be your first resort
Derek Ritz (Nov 25 2020 at 23:08):
Thanks, guys... this is helpful. :+1:
Last updated: Apr 12 2022 at 19:14 UTC