Reading a FHIR resource - AWS HealthLake

Reading a FHIR resource

The FHIR read interaction reads the current state of a resource in a HealthLake data store. For additional information, see read in the FHIR R4 RESTful API documentation.

To read a FHIR resource

  1. Collect HealthLake region and datastoreId values. For more information, see Getting data store properties.

  2. Determine the type of FHIR Resource to read and collect the associated id value. For more information, see Resource types.

  3. Construct a URL for the request using the collected values for HealthLake region and datastoreId. Also include the FHIR Resource type and its associated id. To view the entire URL path in the following example, scroll over the Copy button.

    GET https://healthlake.region.amazonaws.com/datastore/datastoreId/r4/Resource/id
  4. Send the request. The FHIR read interaction uses a GET request with either AWS Signature Version 4 or SMART on FHIR authorization. The following curl example reads the current state of a FHIR Patient resource in HealthLake. To view the entire example, scroll over the Copy button.

    curl

    SigV4 authorization

    curl --request GET \ 'https://healthlake.region.amazonaws.com/datastore/datastoreId/r4/Patient/id \ --aws-sigv4 'aws:amz:region:healthlake' \ --user "$AWS_ACCESS_KEY_ID:$AWS_SECRET_ACCESS_KEY" \ --header "x-amz-security-token:$AWS_SESSION_TOKEN" \ --header 'Accept: application/json'
    AWS Console

    1. Sign in to the Run query page on the HealthLake Console.

    2. Under the Query settings section, make the following selections.

    • Data Store ID — choose a data store ID to generate a query string.

    • Query type — choose Read.

    • Resource type — choose the FHIR resource type to read.

    • Resource ID — enter the FHIR resource ID.

    3. Choose Run query.