Skip to content

ProtocolService

Application service which allows managing (multiple versions of) StudyProtocols.

The protocol store in CARP Core. Clients usually call it through the CARP web services; a protocol is then deployed with a DeploymentService.

Constructors

ProtocolService

ProtocolService()

Constants

API_VERSION

String const API_VERSION

Methods

add

Future<void> add(
  1. StudyProtocol protocol, [
  2. String? versionTag
])

Add the specified study protocol.

versionTag is an optional label used to identify this first version of the protocol. Timestamp of initial creation by default.

addVersion

Future<void> addVersion(
  1. StudyProtocol protocol, [
  2. String? versionTag
])

Add a new version for the specified study protocol, of which a previous version with the same id, ownerId, and name is already stored.

versionTag is an optional unique label used to identify this specific version of the protocol. The current date/time by default.

getAllForOwner

Future<List<StudyProtocol>> getAllForOwner(
  1. String ownerId
)

Find all StudyProtocol's owned by the owner with ownerId.

Returns the last version of each StudyProtocol owned by the requested owner, or an empty list when none are found.

getBy

Future<StudyProtocol> getBy(
  1. String protocolId, [
  2. String? versionTag
])

Return the StudyProtocol with the specified protocolId,

versionTag is the tag of the specific version of the protocol to return. The latest version is returned when not specified.

getVersionHistoryFor

Future<List<ProtocolVersion>> getVersionHistoryFor(
  1. String protocolId
)

Returns all stored versions for the protocol with the specified protocolId.

updateParticipantDataConfiguration

Future<StudyProtocol> updateParticipantDataConfiguration(
  1. String protocolId,
  2. String versionTag,
  3. List<ExpectedParticipantData> expectedParticipantData
)

Replace the expected participant data for the study protocol with the specified protocolId and versionTag with expectedParticipantData.

Returns the updated StudyProtocol.