Patients
Delete patient
Delete patient using Ovok’s Slim API.
| Method | Path |
|---|---|
DELETE | /v1/slim/patient/:id |
Authentication · Access policies
Deletes a resident (patient) who has no device.
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).
Request
Path parameters
| Name | Type | Required | Description |
|---|---|---|---|
id | string (uuid) | Yes | Patient id. |
Behaviour
- A resident who is still assigned to a device cannot be deleted. The request returns
409and changes nothing. The message names each device by itsDeviceIDidentifier, or by its name when it has noDeviceID. - First remove the resident from every device with
PUT /v1/slim/patient/{id}withoutlocationId, then delete the resident. - 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 | The FHIR backend 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 | The resident still has a device: Resident still has device <serial>[, <serial>]. Unassign it first. Nothing changes. A concurrent write or device reassignment also returns 409; retry. |
422 | id is not a UUID, or the patient is archived. |
Last updated on