Creating a resource with POST - AWS HealthLake

Creating a resource with POST

You use a POST request to create a new resource in a HealthLake data store. POST requests do not require that you provide an id element. The HealthLake servers return a 201 Created HTTP status code when a resource has been successfully created.

Note

When you make a POST request on the DocumentReference resource type, the existing extensions are not modified. Instead, AWS HealthLake adds the new extensions with the existing ones to your data store. For more details about how HealthLake uses natural language processing (NLP) on the DocumentReference resource type to extract valuable medical data, see Using automated resource generation based on natural language processing (NLP) of the FHIR DocumentReference resource type in AWS HealthLake.

Example Creating a Patient resource using a POST request.

To create a HealthLake data store POST request, use your data store's endpoint and provide a JSON request body. To find a data store's endpoint, look in the HealthLake console under Data Stores or by using the DescribeFHIRDatastore operation in the AWS HealthLake API Reference.

POST Request
POST https://healthlake.your-region.amazonaws.com/datastore/your-datastore-id/r4/Patient
JSON Request Body
{ "resourceType": "Patient", "identifier": [ { "system": "urn:oid:1.2.36.146.595.217.0.1", "value": "12345" } ], "name": [ { "family": "Silva", "given": ["Ana", "Carolina"] } ], "gender": "female", "birthDate": "1992-02-10" }
JSON Response

To confirm the creation of the patient resource, you will receive a 201 Created HTTP status code and the following JSON response.

{ "resourceType": "Patient", "identifier": [ { "system": "urn:oid:1.2.36.146.595.217.0.1", "value": "12345" } ], "name": [ { "family": "Silva", "given": [ "Ana", "Carolina" ] } ], "gender": "female", "birthDate": "1992-02-10", "id": "274b408a-1201-4e9f-a621-1df937f1a26d", "meta": { "lastUpdated": "2022-06-13T23:31:24.427Z" } }