Skip to content

ParticipationReference

A reference to the participant data of one study deployment in CAWS.

Obtained from CarpParticipationService.participation. Following the CARP Core deployment sub-system, it is used to:

It also has methods for setting, getting, and removing an InformedConsentInput as participant data. This replaces the deprecated consent endpoints of CarpService.

Inheritance

Properties

rpcEndpointUri

String get rpcEndpointUri
override

The URL for the participation endpoint.

{{PROTOCOL}}://{{SERVER_HOST}}:{{SERVER_PORT}}/api/participation-service

studyDeploymentId

String get studyDeploymentId

The CARP study deployment ID.

Methods

getInformedConsent

Future<Map<String, InformedConsentInput?>> getInformedConsent()

Gets informed consent data for all participants (by role name) in this study deployment. Informed consent which is not set equals null.

getInformedConsentByRole

Future<InformedConsentInput?> getInformedConsentByRole([
  1. String? roleName
])

Gets the informed consent uploaded by a participant with roleName in this study deployment.

If roleName is not specified, it is resolved by getParticipantRoleName.

Returns null if not available.

getParticipantData

Future<ParticipantData> getParticipantData()

Gets currently set data for all expected participant data in this study deployment. Data which is not set equals null.

getParticipantRoleName

String getParticipantRoleName(
  1. String? roleName
)

Resolves the role name of a participant.

Returns roleName if not null. Otherwise returns the participant role name of the CarpBaseService.study of service, if available. Throws a CarpServiceException if the role name cannot be resolved.

removeInformedConsent

Future<void> removeInformedConsent([
  1. String? inputByParticipantRole
])

Removes the informed consent for the given inputByParticipantRole in this study deployment. If inputByParticipantRole is not specified, it is resolved by getParticipantRoleName.

setInformedConsent

Future<void> setInformedConsent(
  1. InformedConsentInput consent, [
  2. String? inputByParticipantRole
])

Sets informed consent for the given inputByParticipantRole in this study deployment. If inputByParticipantRole is not specified, it is resolved by getParticipantRoleName.

setParticipantData

Future<ParticipantData> setParticipantData(
  1. Map<String, Data> data, [
  2. String? inputByParticipantRole
])

Sets participant data for the given inputByParticipantRole in this study deployment. The keys of data are input data types, like InputType.INFORMED_CONSENT. If inputByParticipantRole is null, the data is shared input that any participant role may supply. Specify the role to set input assigned to one participant role.

Returns all data for the specified study deployment, including the newly set data.