Skip to main content

Get a resource graph

$graph starts from one resource and follows the links in a GraphDefinition, returning the root and linked resources in a FHIR Bundle.

MethodPath
GET/fhir/R4/:type/:id/$graph

Request​

The query parameter graph identifies a GraphDefinition by name. Its start type must match :type in the URL.

curl --get "https://api.sandbox.ovok.com/fhir/R4/Patient/${PATIENT_ID}/\$graph" \
--header "Authorization: Bearer ${OVOK_TOKEN}" \
--data-urlencode 'graph=patient-summary'
ParameterRequiredDescription
graphYesName of a GraphDefinition whose start matches the requested resource type.

Successful response​

The operation returns a FHIR Bundle with type: collection.

Response pathExampleMeaning
resourceTypeBundleIdentifies the result as a FHIR Bundle.
typecollectionIndicates the Bundle contains the graph result.
entry[].resourcePatient/<patient-id>, Observation/<observation-id>Root or linked FHIR resources included by the GraphDefinition.

The example is illustrative; the actual entries depend on the GraphDefinition and linked data. An invalid graph name or mismatched start type returns an error outcome.