For AI agents: the documentation index is at /docs/mdmbox/llms.txt. A Markdown version of this page is available at /docs/mdmbox/referencing-operation.md or by requesting it with the Accept: text/markdown header.
MDMbox Docs

Referencing operation

The $referencing operation finds resources that reference a given record. Specify which resource types to search, such as Encounter and Observation. Use the results when building a merge plan.

Request

POST https://<mdmbox-host>/api/fhir/Patient/123/$referencing
Content-Type: application/json
{
  "resourceType": "Parameters",
  "parameter": [
    { "name": "type", "valueString": "Encounter" },
    { "name": "type", "valueString": "Observation" },
    { "name": "count", "valueInteger": 50 },
    { "name": "offset", "valueInteger": 0 }
  ]
}

Parameters

NameTypeRequiredDescription
typevalueStringYes, to get resultsResource types to search. Repeat once per type. Omitting all types returns an empty Bundle.
countvalueIntegerNoMaximum results across all requested types (default: 20)
offsetvalueIntegerNoPagination offset (default: 0)

Response

A FHIR searchset Bundle contains the requested page, ordered by resource type and ID. Increase offset by count to read the next page. Resource bodies below are abbreviated:

{
  "resourceType": "Bundle",
  "type": "searchset",
  "total": 2,
  "entry": [
    {
      "resource": {
        "resourceType": "Encounter",
        "id": "enc-1",
        "subject": { "reference": "Patient/123" }
      }
    },
    {
      "resource": {
        "resourceType": "Observation",
        "id": "obs-1",
        "subject": { "reference": "Patient/123" }
      }
    }
  ]
}

Audit

Every successful $referencing records an AuditEvent naming the subject and returned resources before sending the response. If the event cannot be persisted, the operation returns HTTP 500 instead of the results. See Audit for failure handling and the 1000-reference recording limit.

See also

Last updated: