CANSProtocolService class

A ProtocolService that talks to the CARP Nervous System (CANS), i.e., the CARP backend server(s).

Inheritance

Constructors

CANSProtocolService()
Returns the singleton default instance of the CANSProtocolService. Before this instance can be used, it must be configured using the configure method.
factory

Properties

app CarpApp?
The CARP app associated with the CARP Web Service. Returns null if this service has not yet been congfigured via the configure method.
no setterinherited
currentUser CarpUser?
Gets the current user. Returns null if no user is authenticated.
no setterinherited
hashCode int
The hash code for this object.
no setterinherited
headers Map<String, String>
The headers for any authenticated HTTP REST call to a CarpBaseService.
no setterinherited
isConfigured bool
Has this service been configured?
no setterinherited
rpcEndpointName String
The endpoint name for this service at CARP.
no setteroverride
rpcEndpointUri String
The URL for this service's endpoint at CARP.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

add(StudyProtocol? protocol, [String? versionTag]) Future
Add the specified study protocol.
override
addVersion(StudyProtocol? protocol, [String? versionTag]) Future
Add a new version for the specified study protocol, of which a previous version with the same owner and name is already stored.
override
configure(CarpApp app) → void
Configure the this instance of a Carp Service.
inherited
configureFrom(CarpBaseService service) → void
Configure from another service which has alreay been configured and potentially authenticated.
inherited
createCustomProtocol(String? ownerId, String? name, String description, String customProtocol) Future<StudyProtocol>
Create a study protocol to be deployed to a single device which has its own way of describing study protocols that deviates from the CARP core study protocol model.
override
getAllFor(String? ownerId) Future<List<StudyProtocol>>
Find all StudyProtocol's owned by the owner with ownerId. In the CARP web service, the ownerId is the logged in user's accountId.
override
getBy(StudyProtocolId protocolId, [String? versionTag]) Future<StudyProtocol>
Return the StudyProtocol with the specified protocolId,
override
getVersionHistoryFor(StudyProtocolId protocolId) Future<List<ProtocolVersion>>
Returns all stored versions for the protocol with the specified protocolId.
override
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited
updateParticipantDataConfiguration(StudyProtocolId protocolId, String versionTag, List<ParticipantAttribute> expectedParticipantData) Future<StudyProtocol>
Replace the expected participant data for the study protocol with the specified protocolId and versionTag with expectedParticipantData.
override

Operators

operator ==(Object other) bool
The equality operator.
inherited