Search in sources :

Example 1 with ParticipantExtendedDTO

use of com.odysseusinc.arachne.portal.api.v1.dto.ParticipantExtendedDTO in project ArachneCentralAPI by OHDSI.

the class ParticipantLinkToParticipantExtendedDTOConverter method convert.

@Override
public ParticipantExtendedDTO convert(ParticipantLink participantLink) {
    final ParticipantExtendedDTO participantDTO = new ParticipantExtendedDTO();
    ParticipantRole role = participantLink.getRole();
    final IUser user = participantLink.getUser();
    participantDTO.setId(user.getUuid());
    participantDTO.setFullName(user.getFullName());
    participantDTO.setRole(new OptionDTO(role.name(), role.toString()));
    participantDTO.setStatus(participantLink.getStatus().toString());
    participantDTO.setAffilation(user.getAffiliation());
    participantDTO.setProfessionalType(user.getProfessionalType());
    return participantDTO;
}
Also used : IUser(com.odysseusinc.arachne.portal.model.IUser) OptionDTO(com.odysseusinc.arachne.commons.api.v1.dto.OptionDTO) ParticipantExtendedDTO(com.odysseusinc.arachne.portal.api.v1.dto.ParticipantExtendedDTO) ParticipantRole(com.odysseusinc.arachne.portal.model.ParticipantRole)

Aggregations

OptionDTO (com.odysseusinc.arachne.commons.api.v1.dto.OptionDTO)1 ParticipantExtendedDTO (com.odysseusinc.arachne.portal.api.v1.dto.ParticipantExtendedDTO)1 IUser (com.odysseusinc.arachne.portal.model.IUser)1 ParticipantRole (com.odysseusinc.arachne.portal.model.ParticipantRole)1