0

Is there any way to 'filter' Resources that are included or reverse included?

For instance if I wanted to get all Patient resources and the Flags that reference them:

Patient?_revinclude=Flag:subject

But what if I want to get all the Patient resources and the Flags that reference them, but only include the Flags that have an active status (assuming there is a SearchParameter on Flag.status):

Patient?_revinclude=Flag:subject&Flag.status=active

Is there a way to do this? I am assuming FHIR only allows to 'filter' the Resource that is being queried.

Amit Joshi
  • 15,448
  • 21
  • 77
  • 141
Halie
  • 5
  • 1
  • 3

1 Answers1

2

There is no mechanism to do this using regular RESTful query.

Lloyd McKenzie
  • 6,345
  • 1
  • 13
  • 10
  • Lloyd is correct, there is no way to filter on the (rev)included resources with the standard RESTful queries. However, in your example you say you want ALL patients, so no filter there. Then, why not write the query the other way around? GET Flag?status=active&_include=Flag:patient – Mirjam Baltus Aug 25 '22 at 11:18