Chained Parameters

Search by associated resources
For a more accurate search, we can filter by nested fields of related entities. Reference parameters may be "chained" through .
Obtain all encounters with patients (subject — link to the patient) with the name Alex:
GET /Encounter?
You can use several chained parameters by the base resource:
GET /Encounter?part-of:Encounter._id=enc1&subject:Patient._id=patient1
"Reversed chaining" is a selection of resources based on the properties of resources that refer to them.
Obtain patient resources where the encounter has the id = enc1 and refer to the patient through the subject field:
GET /Patient?_has:Encounter:subject:_id=enc1