use of com.odysseusinc.arachne.portal.model.UserStudy in project ArachneCentralAPI by OHDSI.
the class BaseUserServiceImpl method processInvitation.
@Override
public UserStudy processInvitation(U user, Long id, Boolean accepted, String comment) {
UserStudy userStudy = userStudyRepository.findByIdAndUser(id, user);
if (userStudy != null) {
ParticipantStatus status = TRUE.equals(accepted) ? APPROVED : DECLINED;
userStudy.setStatus(status);
userStudy.setComment(DECLINED == status ? comment : null);
userStudyRepository.save(userStudy);
}
return userStudy;
}
Aggregations