StudyServiceHost

class StudyServiceHost(repository: StudyRepository, eventBus: ApplicationServiceEventBus<StudyService, StudyService.Event>) : StudyService

Implementation of StudyService which allows creating and managing studies.

Constructors

StudyServiceHost
Link copied to clipboard
fun StudyServiceHost(repository: StudyRepository, eventBus: ApplicationServiceEventBus<StudyService, StudyService.Event>)

Functions

createStudy
Link copied to clipboard
open suspend override fun createStudy(owner: StudyOwner, name: String, description: String?, invitation: StudyInvitation?): StudyStatus

Create a new study for the specified owner.

getStudiesOverview
Link copied to clipboard
open suspend override fun getStudiesOverview(owner: StudyOwner): List<StudyStatus>

Get status for all studies created by the specified owner.

getStudyDetails
Link copied to clipboard
open suspend override fun getStudyDetails(studyId: UUID): StudyDetails

Gets detailed information about the study with the specified studyId, including which study protocol is set.

getStudyStatus
Link copied to clipboard
open suspend override fun getStudyStatus(studyId: UUID): StudyStatus

Get the status for a study with the given studyId.

goLive
Link copied to clipboard
open suspend override fun goLive(studyId: UUID): StudyStatus

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

remove
Link copied to clipboard
open suspend override fun remove(studyId: UUID): Boolean

Remove the study with the specified studyId and all related data.

setInternalDescription
Link copied to clipboard
open suspend override fun setInternalDescription(studyId: UUID, name: String, description: String): StudyStatus

Set study details which are visible only to the StudyOwner.

setInvitation
Link copied to clipboard
open suspend override fun setInvitation(studyId: UUID, invitation: StudyInvitation): StudyStatus

Specify an invitation, shared with participants once they are invited to the study with the specified studyId.

setProtocol
Link copied to clipboard
open suspend override fun setProtocol(studyId: UUID, protocol: StudyProtocolSnapshot): StudyStatus

Specify the study protocol to use for the study with the specified studyId.