senaite/senaite.health

Patients can't be created nor edited when Unique Client Sample ID is active

juangallostra opened this issue · 0 comments

Steps to reproduce

  1. Navigate to Site Setup -> Bika Setup -> Id Server and activate the option Client Patient ID must be unique
  2. Go to the Patients listing and create or edit a patient
  3. Once done, click the Save button

Current behavior

If Client Patient ID must be unique is checked a validation error is always raised in the Edit/Create patient form stating that the Client Patient ID is not unique.

Expected behavior

If Client Patient ID must be unique is checked then the field is validated properly. This means that errors are only raised when there is a repeated Client Patient ID and Patients can be created and edited properly.

Screenshot (optional)

Current Patients List

seleccio_014

Validation Error (note that the CPID is unique)

seleccio_015