Recruitment

class Recruitment(val studyId: UUID, id: UUID = UUID.randomUUID(), createdOn: Instant = Clock.System.now()) : AggregateRoot<Recruitment, RecruitmentSnapshot, Recruitment.Event>

Represents a set of participants recruited for a study identified by studyId.

Constructors

Link copied to clipboard
fun Recruitment(studyId: UUID, id: UUID = UUID.randomUUID(), createdOn: Instant = Clock.System.now())

Types

Link copied to clipboard
object Companion
Link copied to clipboard
sealed class Event : DomainEvent

Functions

Link copied to clipboard
fun addParticipant(email: EmailAddress, id: UUID = UUID.randomUUID()): Participant

Add a Participant identified by the specified email address. In case the email was already added before, the same Participant is returned.

Link copied to clipboard
fun addParticipantGroup(participantIds: Set<UUID>, id: UUID = UUID.randomUUID()): StagedParticipantGroup

Create and add the participants identified by participantIds as a participant group.

Link copied to clipboard
Link copied to clipboard
fun createInvitations(group: Set<AssignedParticipantRoles>): Pair<StudyProtocolSnapshot, List<ParticipantInvitation>>

Attempt creating ParticipantInvitations for the specified participant group, or throw exception in case preconditions are violated.

Link copied to clipboard
fun getParticipantGroupStatus(studyDeploymentStatus: StudyDeploymentStatus): ParticipantGroupStatus

Get the ParticipantGroupStatus of the study deployment identified by studyDeploymentStatus.

Link copied to clipboard
Link copied to clipboard

Get the status (serializable) of this Recruitment.

Link copied to clipboard
fun lockInStudy(protocol: StudyProtocolSnapshot, invitation: StudyInvitation)

Lock in the protocol which participants in this recruitment can participate in, and the invitation which is sent to them once they are deployed.

Link copied to clipboard

Properties

Link copied to clipboard
val createdOn: Instant
Link copied to clipboard
Link copied to clipboard
val id: UUID
Link copied to clipboard

Per study deployment ID, the group of participants that participates in it.

Link copied to clipboard

The participants which are part of this Recruitment.

Link copied to clipboard
val studyId: UUID