core.medplumclient.deleteresource
Home > @medplum/core > MedplumClient > deleteResource
MedplumClient.deleteResource() method
Deletes a FHIR resource by resource type and ID.
Signature:
deleteResource(resourceType: ResourceType, id: string, options?: MedplumRequestOptions): Promise<any>;
Parameters
Parameter | Type | Description |
---|---|---|
resourceType | ResourceType | The FHIR resource type. |
id | string | The resource ID. |
options | (Optional) Optional fetch options. |
Returns:
Promise<any>
The result of the delete operation.
Example
Example:
await medplum.deleteResource('Patient', '123');
See the FHIR "delete" operation for full details: https://www.hl7.org/fhir/http.html\#delete