failed to validate with reason: error.preferredIdentifier

while writing tests I have executed the database by executeDataSet and running this code

`

     Patient patient = patientService.getPatientByUuid(patientUuid);
     Person person = patient.getPerson();
     person.addAttribute(personAttribute);
     personService.savePerson(person);`

Getting the following Error on line 4 while saving the person. Link to error https://pastebin.com/c5Tv0hfV

Hey @vankineenitawrun, this may help you : [SOLVED] Preferred Identifier - Patient Registration + Removing Automatic Assignment Question

1 Like

Thanks @rushikesh. I solved the errror by patient identifier to patient.

1 Like