// because it (as of 1.8) also tests to make sure that an identifier has a location associated with it; when validating an
// individual identifier widget, there will be no location because the location is collected in another widget
PatientIdentifierValidator.validateIdentifier(pi.getIdentifier(), pi.getIdentifierType());
if (Context.getPatientService().isIdentifierInUseByAnotherPatient(pi)) {
throw new IdentifierNotUniqueException(Context.getMessageSourceService().getMessage(
"PatientIdentifier.error.notUniqueWithParameter", new Object[] { pi.getIdentifier() },
Context.getLocale()));
}
}
catch (Exception e) {