RelatedPerson REST interactions

The chapter gives some examples of how to retreive relationsship information from the REST interface provided by the Grunndata Person Service. The results are always formatted according to the FHIR profiles, details about the information structure of the returned information can be found in the RelatedPerson information or GdRelatedPerson

Examples of REST interactions

The full list of available search parameters supported for the RelatedPerson resources on the Person Grunndata service is documented in the CapabilityStatement. The following documentation are examples only and does not provide information about all the supported search parameters . The full list of search parameters can be found here Read and Search

Get Relatedperson information based on Identifier

This search should provide all relationships for a person registered in FREG. You can search for RelatedPerson information based on the identifier of the person (FNR or DNR). The search interaction on Identifiers SHOULD only use the POST operation to prevent the identifier from being recorded in HTTP logs. The search parameters should be provided in the body of the message. For testing this does not matter and the GET operation can be used.

POST [base]/RelatedPerson/_search

parameters in HTTP body: 
identifier=urn:oid:2.16.578.1.12.4.1.4.1|05073500186

Curl command example:

curl -X POST -d identifier=urn%3Aoid%3A2.16.578.1.12.4.1.4.1%7C05073500186 [base]/RelatedPerson/_search

Get RelatedPerson including relation to a given person

On the HAPI test server this only works with literal references like this

GET [base]/RelatedPerson?patient=Patient/597064

Or in combination with a relationship type:

GET [base]/RelatedPerson?patient=Patient/597064&relationship=gift

include and revinclude (next release)

The Search on RelatedPerson can be combined with a Person search using the include and revinclude operations.

GET [base]/Patient?identifier=urn:oid:2.16.578.1.12.4.1.4.1|&_revinclude=RelatedPerson:patient