createCustomProtocol method

  1. @override
Future<StudyProtocol> createCustomProtocol(
  1. String ownerId,
  2. String name,
  3. String description,
  4. String customProtocol,
)
override

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.

The customProtocol is stored in a single CustomProtocolTask which in the CARP study protocol model is described as being triggered at the start of the study for a CustomProtocolDevice with role name "Custom device".

Implementation

@override
Future<StudyProtocol> createCustomProtocol(
  String ownerId,
  String name,
  String description,
  String customProtocol,
) async =>
    StudyProtocol.fromJson(await _rpc(
        CreateCustomProtocol(ownerId, name, description, customProtocol),
        'protocol-factory-service'));