0

Is there a way to search for a resource by its referencing resources? For example, is the a way to find all Observations of code = X with Provenance by agent Y?

GET [base]/Observation?code=X&???

One could:

GET [base]/Provenance?userid=Y&_include=Provenance:target:Observation

but that prevents any kind of filtering on Observation (which may create a volume problem in the response!). Also, I don't need the provenance resource - I just need to make sure that the Observations I'm using have a certain provenance.

Chris Grenz
  • 161
  • 9

1 Answers1

0

Right now, to the best of my knowledge, there's no way to apply filters to multiple resources unless you're using _filter or using a custom OperationDefinition.

Lloyd McKenzie
  • 6,345
  • 1
  • 13
  • 10
  • Chaining allows filtering by attributes across reference boundaries - the "reverse" nature of the Provenance target reference though is the barrier... – Chris Grenz Mar 18 '16 at 22:36
  • Chaining allows filtering the base resource based on relationships it has, but there's no way to apply filters to both the base resource *and* included resources, whether using _include or _revinclude – Lloyd McKenzie Mar 19 '16 at 19:17
  • My use case only requires filtering the Observations - existence of a particular flavor of provenance is the criteria. Just need "reverse reference" chaining! – Chris Grenz Mar 21 '16 at 15:50