Study

class Study(owner: StudyOwner, name: String, description: String?, invitation: StudyInvitation, id: UUID) : AggregateRoot<Study, StudySnapshot, Study.Event>

Represents a study which can be pilot tested and eventually 'go live', for which a recruitment goal can be set, and participants can be recruited.

Constructors

Study
Link copied to clipboard
fun Study(owner: StudyOwner, name: String, description: String? = null, invitation: StudyInvitation = StudyInvitation( name ), id: UUID = UUID.randomUUID())

Types

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

Functions

consumeEvents
Link copied to clipboard
fun consumeEvents(): List<Study.Event>
getSnapshot
Link copied to clipboard
open override fun getSnapshot(): StudySnapshot

Get a serializable snapshot of the current state of this Study.

getStatus
Link copied to clipboard
fun getStatus(): StudyStatus

Get the status (serializable) of this Study.

getStudyDetails
Link copied to clipboard
fun getStudyDetails(): StudyDetails

Get StudyDetails for this Study.

goLive
Link copied to clipboard
fun goLive()

Lock in the current study protocol so that the study may be deployed to participants.

Properties

canDeployToParticipants
Link copied to clipboard
val canDeployToParticipants: Boolean

Determines whether the study in its current state is ready to be deployed to participants.

canSetInvitation
Link copied to clipboard
val canSetInvitation: Boolean
canSetStudyProtocol
Link copied to clipboard
val canSetStudyProtocol: Boolean
createdOn
Link copied to clipboard
var createdOn: Instant
description
Link copied to clipboard
var description: String?

A description for the study, assigned by, and only visible to, the StudyOwner.

id
Link copied to clipboard
val id: UUID
invitation
Link copied to clipboard
var invitation: StudyInvitation

A description of the study, shared with participants once they are invited to the study.

isLive
Link copied to clipboard
var isLive: Boolean = false

Determines whether a study protocol has been locked in and the study may be deployed to real participants.

name
Link copied to clipboard
var name: String

A descriptive name for the study, assigned by, and only visible to, the StudyOwner.

owner
Link copied to clipboard
val owner: StudyOwner

The person or group that created this Study.

protocolSnapshot
Link copied to clipboard
var protocolSnapshot: StudyProtocolSnapshot? = null

A snapshot of the protocol to use in this study, or null when not yet defined.