Check patient name exists
| Method | Path |
|---|---|
POST | /v1/slim/patient/check-name-exists |
Authentication · Access policies
Checks whether a Resident ID (the resident's nickname) is already used in your project. Use it to validate the Resident ID field before you create or rename a resident.
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:read (admins and super admins skip this check).
Scope: Residents in the caller's project (from the token).
Behaviour
- Read-only.
- Only the
nameentry withuse: "nickname"is compared. Official and maiden names are ignored. Without a nickname entry the answer isexists: false. - A match needs the same
giventokens in the same order and the samefamily(or nofamilyon both sides). Tokens are trimmed and compared case-insensitively. - When you edit an existing resident, pass their id as
excludePatientIdso their own record does not count as a match. - The create and update routes run the same check, so a
truehere means those requests would be refused with a 422.
Example
curl -X POST 'https://api.sandbox.ovok.com/v1/slim/patient/check-name-exists' \
-H "Authorization: Bearer ${OVOK_TOKEN}" \
-H 'Content-Type: application/json' \
-d '{
"name": [{ "use": "nickname", "given": ["demo-resident"] }],
"excludePatientId": "3f1c2b7e-8d4a-4c1e-9b2f-6a7d5e4c3b21"
}'
| Field | Type | Meaning |
|---|---|---|
exists | boolean | true when a matching Resident ID is already used in the project. |
Successful response
201 — Result of the name existence check.
Errors
| Status | Meaning |
|---|---|
401 | Bearer token is missing, invalid or expired. |
403 | You are not a practitioner, admin or System Owner, or you lack Patient:read. |
422 | The body fails validation. |