Stream: implementers
Topic: Inter-dependent requests in transaction
Shlomy Reinstein (Aug 08 2017 at 13:37):
Hi,
Shlomy Reinstein (Aug 08 2017 at 13:41):
I use HAPI FHIR, and would like to do the following: Search for some DiagnosticReport resources, and include all the Procedure resources which refer to these resources. It seems like _revinclude cannot be used in this case, so currently we first search for the DiagnosticReports, and then, sequentially, search for all Procedure resources of the same patient, and filter out those which refer to the DiagnosticReports that were found.
Is there a way to do this in a transaction? Can I make the original DiagnosticReport search request (which may or may not contain a "patient" parameter in the search criteria) and the other search request (for all procedures of the patient) in the same transaction? Thanks!
Lloyd McKenzie (Aug 09 2017 at 02:04):
There's no ability for the results of one query within a transaction to populate variables that are used in the execution of a subsequent query in the same transaction.
Shlomy Reinstein (Aug 10 2017 at 08:17):
Thanks! Any reason why _revinclude cannot bring all referencing resources? For a database-backed server, this should not be a problem. Why is it limited to particular fields? Same goes for search parameters and _include.
Lloyd McKenzie (Aug 10 2017 at 15:05):
FHIR doesn't presume the use of any particular persistence layer approach. Each search parameter supported (whether for direct search or for including or reverse-including) may require code to be written to support that capability. Implementations wishing to search/include/revinclude on alternate elements are free to define additional search criteria to allow declaration of additional search capabilities.
Last updated: Apr 12 2022 at 19:14 UTC