Patients

Delete patient

Delete patient using Ovok’s Slim API.

MethodPath
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

NameTypeRequiredDescription
idstring (uuid)YesPatient id.

Behaviour

  • A resident who is still assigned to a device cannot be deleted. The request returns 409 and changes nothing. The message names each device by its DeviceID identifier, or by its name when it has no DeviceID.
  • First remove the resident from every device with PUT /v1/slim/patient/{id} without locationId, 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

StatusMeaning
400The FHIR backend refuses the delete.
401Bearer token is missing, invalid or expired.
403You are not a practitioner, admin or System Owner, you lack Patient:delete or Device:update, or the patient is outside your project.
404No patient with this id exists.
409The 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.
422id is not a UUID, or the patient is archived.

Last updated on

On this page