core.medplumclient.deleteresource | Medplum
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 | MedplumRequestOptions | (Optional) Optional fetch options. |
Returns:
Promise
The result of the delete operation.
Example
Example:
await medplum.deleteResource('Patient', '123');
See the FHIR "delete" operation for full details.