Skip to main content

Creating Data

Data is created in FHIR by using the create operation, which is performed by sending a POST request to the server.

Medplum also provides the createResource method on the MedplumClient which implements the create operation. When creating a resource, you do not need to provide an id, as it will be assigned by the server.

Example: Creating a Practitioner
const practitioner: Practitioner = await medplum.createResource({
resourceType: 'Practitioner',
name: [{ family: 'Smith', given: ['Alice'], prefix: ['Dr.'] }],
});