Page Status: Outdated

Guardian - Fetch

Page index

Introduction

Sv: användningsfall - hantera vårdnadshavare

This section describes possible operations for the resource RelatedPerson and scenarios, such as how a guardian relation between a person and a patient (child) can be checked.

It is not supported to fetch all related persons such as

GET [base]/fhir/RelatedPerson?[queryparameter]=[value]

Sequence diagram

This interactions shows a sequence where the client is fetching a related person resource. The interaction requires a valid authorization token as an initial step, which is not shown in the diagram.

Note that the requests shown in the diagram doesn't include the full basepath. It only shows the last part of the http request including resource and possible search/query parameters.

Examples

HTTP Header

Parameter Mandatory Comment
Authorization Yes Bearer [valid OAuth2 token]
X-Access Yes Applicable access type, e.g. VARDNADSHAVARE
X-Purpose Yes Applicable access type, e.g. LASA_EGNA_UPPGIFTER
X-Provenance N/A
X-Request-ID Yes UUID
X-User-Agent Yes
X-OrgInfo Yes Only applicapble for health care organizations

Full list of access and purpose types will be enclosed in the developer portal Confluence, EHM

Example 1

Client performs a search for a related person, based on the swedish personal identity number and the swedish personal identity number of the child to verify that the person is a guardian of the patient.

Search-query:

GET [base]/fhir/RelatedPerson?
identifier= http://electronichealth.se/identifier/personnummer|194710282239&patient.identifier= http://electronichealth.se/identifier/personnummer|201009072388

Response

Status: 200 OK

{
        "resourceType": "RelatedPerson",
        "id": "f6ecfcc3-ef87-4e6b-8269-0ed84b8b0145",
        "meta": {
          "profile": [
            "http://electronichealth.se/fhir/StructureDefinition/NLLRelatedPerson"
          ]
        },
        "identifier": [
          {
            "system": "http://electronichealth.se/identifier/personnummer",
            "value": "192402149237"
          }
        ],
        "patient": {
          "reference": "Patient/0027f523-2b86-4b10-8b38-24584b74708a"
        },
        "relationship": [
          {
            "coding": [
              {
                "system": "http://terminology.hl7.org/CodeSystem/v3-RoleCode",
                "code": "GUARD"
              }
            ]
          }
        ]
      }
    }

Example 2

Client performs a Read based on the logical identifier (UUID) of the related person resource

Search-query:

GET [base]/fhir/RelatedPerson/f6ecfcc3-ef87-4e6b-8269-0ed84b8b0145

Response

Status: 200 OK

{
        "resourceType": "RelatedPerson",
        "id": "f6ecfcc3-ef87-4e6b-8269-0ed84b8b0145",
        "meta": {
          "profile": [
            "http://electronichealth.se/fhir/StructureDefinition/NLLRelatedPerson"
          ]
        },
        "identifier": [
          {
            "system": "http://electronichealth.se/identifier/personnummer",
            "value": "192402149237"
          }
        ],
        "patient": {
          "reference": "Patient/0027f523-2b86-4b10-8b38-24584b74708a"
        },
        "relationship": [
          {
            "coding": [
              {
                "system": "http://terminology.hl7.org/CodeSystem/v3-RoleCode",
                "code": "GUARD"
              }
            ]
          }
        ]
      }
    }