Ovianta Developers

Patients

Find a patient by NIF, and register a new one.

The agent identifies the patient by NIF (DNI, NIE) before it books, moves or cancels anything. Ovianta always looks the patient up first, and only registers them when the lookup finds nobody.

Find a patient

GET/patients

Looks a patient up by NIF. Ovianta calls it before every other patient operation.

Query parameters

Prop

Type

Response: 200

Prop

Type

Example request

GET {baseUrl}/patients?nif=33557799V
Accept: application/json
X-Signature: 5f2b9c…

Example response

{
  "id": "345345",
  "name": "Marta",
  "surname": "Ruiz López",
  "birthDate": "18/07/1966",
  "nif": "33557799V",
  "phone": "+34654654654",
  "extra": null
}

When you have no patient with that NIF, answer 404, 204 or 200 {}. See Patient not found.

Create a patient

POST/patients

Registers a new patient. Ovianta first checks with GET /patients that the NIF is not already registered.

Request body

Prop

Type

Response: 201

Prop

Type

Example request

POST {baseUrl}/patients
Content-Type: application/json
Accept: application/json
X-Signature: 5f2b9c…

{
  "name": "Marta",
  "surname": "Ruiz López",
  "birthDate": "18/07/1966",
  "nif": "33557799V",
  "phone": "+34654654654"
}

Example response

{
  "patientId": "345345"
}

Ovianta calls GET /patients?nif= right before, and does not create a patient whose NIF you already have. You can still reject a duplicate yourself with a 409.

On this page