Search __revinclude usage doubt


Hi everyone,

I have read the documentation about __revinclude (
__revinclude docs) and some concepts remain unclear to me.

According to the docs, the explanation for this query is the following:

GET [base]/MedicationRequest?_revinclude=Provenance:target&;criteria…
This search requests all matching prescriptions, return all the provenance resources that refer to them.

Besides, the definition for target is:

The name of the search parameter which must be of type reference

So my doubts are:

  1. What is the format for the target criteria? Is something like MedicationRequest/12 valid?
  2. What could be a reasonable value for target in this case?
  3. Can you search from a specific resource’s given endpoint using another resource as a target. E.g. is the following query valid?:

GET [base]/ResourceA?_revinclude=Provenance:ResourceB&criteria…

  1. If various elements meet the searching criteria and __revinclude is specified, should the request return all the matches of these elements in the source resource?

Thanks everyone for the help,