Stream: implementers
Topic: filtering on revinclude
Lieven Peeters (Aug 27 2020 at 14:54):
There's a lastn-operation described for the observation-resource, but currently, that's only defined in the observation-resource.
Did anyone already face the same use case on other resources? And if so, how did you solve that?
E.g. show in a patient overview all patients with their most recent deviceRequest as well.
Fetching all related resources (deviceRequests in this case) from the FHIR-server and filter in the backend of the client-app would be an option, but depending on the kind of resource, that might generate a lot of data-traffic between fhir-client and -server.
For now, I've started from a query to the patient-resources, with a revInclude to get all the related resources. Is there a way to add filtering to that revInclude?
That would also open opportunities for other use cases, like:
"give me the patient(s) and by the way, also their related deviceRequests for devices of type x"
Jose Costa Teixeira (Aug 27 2020 at 14:58):
Would be interesting to also see "patient and the MedRequests, but only the latest 5 medRequests"
René Spronk (Aug 27 2020 at 15:17):
The search syntax doesn't allow for operations on (rev)includes. Try multiple subsequent (related) searches instead..
Last updated: Apr 12 2022 at 19:14 UTC