Delete patient
| Method | Path |
|---|---|
DELETE | /v1/slim/patient/:id |
Authentication · Access policies
Deletes a resident (patient) and releases their devices.
Auth: Bearer token. The caller must be a practitioner, an admin, a super admin, or hold the "System Owner" access policy. The access policy must grant Patient:delete and Device:update (admins and super admins skip this check).
Scope: The resident must belong to the caller's project (from the token).
Behaviour
- The resident is removed from every device they are on, their device use history is closed, and their active out-of-bed notification is revoked. Then the Patient resource is deleted.
- These steps are all or nothing: if the delete fails, the device changes are undone.
- After the delete, the live telemetry state of the released devices is cleared.
- Only the Patient resource is deleted. This route does not delete the resident's other records.
- Archived residents cannot be deleted.
- The response has no body.
Example
curl -X DELETE 'https://api.sandbox.ovok.com/v1/slim/patient/3f1c2b7e-8d4a-4c1e-9b2f-6a7d5e4c3b21' \
-H "Authorization: Bearer ${OVOK_TOKEN}"
Successful response
200 — Patient deleted. The response has no body.
Errors
| Status | Meaning |
|---|---|
400 | Medplum refuses the delete. |
401 | Bearer token is missing, invalid or expired. |
403 | You are not a practitioner, admin or System Owner, you lack Patient:delete or Device:update, or the patient is outside your project. |
404 | No patient with this id exists. |
409 | Another write holds the patient or one of its devices, or a device was reassigned while the request ran. Retry. |
422 | id is not a UUID, or the patient is archived. |