return "P" + person.getNumeroDocumentoIdentificacao();
return "P" + person.getIdInternal();
    private static String generateNewUsername(String oldUsername, RoleType roleType, Person person) {        if (oldUsername.startsWith("INA") || roleType.equals(RoleType.MASTER_DEGREE_CANDIDATE)) {            return oldUsername;        }        if (roleType.equals(RoleType.TEACHER)) {            if (person.getTeacher() != null) {                return "D" + person.getTeacher().getTeacherNumber();            } else {                throw new DomainException("error.person.addingInvalidRole", RoleType.TEACHER.getName());            }        } else if (roleType.equals(RoleType.EMPLOYEE)) {            if (person.getEmployee() != null) {                return "F" + person.getEmployee().getEmployeeNumber();            } else {                throw new DomainException("error.person.addingInvalidRole", RoleType.EMPLOYEE.getName());            }        } else if (roleType.equals(RoleType.FIRST_TIME_STUDENT)) {            Student student = person.getStudentByType(DegreeType.DEGREE);            return "L" + student.getNumber();        } else if (roleType.equals(RoleType.STUDENT)) {            Student student = person.getStudentByType(DegreeType.MASTER_DEGREE);            if (student != null) {                return "M" + student.getNumber();            }            student = person.getStudentByType(DegreeType.DEGREE);            if (student != null) {                return "L" + student.getNumber();            }            throw new DomainException("error.person.addingInvalidRole", RoleType.STUDENT.getName());        } else if (roleType.equals(RoleType.GRANT_OWNER)) {            if (person.getGrantOwner() != null) {                return "B" + person.getGrantOwner().getNumber();            }        } else if (roleType.equals(RoleType.PROJECTS_MANAGER) || roleType.equals(RoleType.INSTITUCIONAL_PROJECTS_MANAGER)) {            return "G" + person.getNumeroDocumentoIdentificacao();        } else if (roleType.equals(RoleType.PERSON)) {            return "P" + person.getNumeroDocumentoIdentificacao();        }        return oldUsername;    }