Create Data

You can use a POST request to create a FHIR® resource on the 1up FHIR Server using an access token or client credential headers. You can create a single resource or multiple resources.

When a FHIR resource is posted to the 1up FHIR Server, a corresponding Provenance FHIR resource is created automatically that references the newly created resource. 1up automatically performs base R4 specification validation when FHIR resources are posted to the FHIR Server.

Create a Single Resource

You can create one FHIR resource at a time using either an access token or a client credential header.

Create Multiple FHIR Resources with a Bundle

You can also POST to [baseUrl]/[fhirVersion] (such as /r4) to submit a bundle of up to 20 FHIR resources at the same time. Each individual FHIR resource in the bundle is posted independently and each is validated. If you POST a bundle of 10 resources, and nine pass validation, and one has validation errors, the nine valid resources are added to the FHIR Server, and the invalid resource is not.

You can POST the bundle using either OAuth 2.0 Access Token or client credential headers.

When you POST resources with a transaction bundle, the FHIR server assigns IDs to the resources in the entry payload. You can either specify those IDs, the FHIR server can randomly assign them, or the FHIR server can randomly assign them and resolve references between resources.

If you want to specify the IDs, include them as valid FHIR identifiers in each fullUrl or resource id.

If you want to allow the FHIR server to randomly assign IDs to the resources, you can exclude the fullUrl and resource id fields.

If you want the FHIR server to randomly assign IDs to the resources and resolve any underlying references between resources, you can use urn identifiers as placeholder IDs. The FHIR server assigns a placeholder ID to the resource as a UUID and assigns that temporary placeholder ID in any other bundle resources that reference that placeholder ID. This placeholder ID temporarily links the resources in the bundle until the FHIR server can determine the correct resource ID. After the FHIR server identifies the actual resource ID, the FHIR server replaces the temporary placeholder ID with the actual resource ID in all of the affected resources.

For more information about FHIR Bundles and placeholder IDs, see Resource URL & Uniqueness Rules in a Bundle and Resolving References in Bundles in the HL7 FHIR R4 documentation.