SBBConsentManagerProtocol Protocol Reference

Conforms to SBBBridgeAPIManagerProtocol
Declared in SBBConsentManager.h

Overview

This protocol defines the interface to the SBBConsentManager’s non-constructor, non-initializer methods. The interface is abstracted out for use in mock objects for testing, and to allow selecting among multiple implementations at runtime.

– consentSignature:birthdate:signatureImage:dataSharing:completion: required method

Submit the user’s “signature” and birthdate to indicate consent to participate in this research project. (Deprecated: use consentSignature:forSubpopulationGuid:birthdate:signatureImage:dataSharing:completion: instead.)

- (nonnull NSURLSessionTask *)consentSignature:(nonnull NSString *)name birthdate:(nullable NSDate *)date signatureImage:(nullable UIImage *)signatureImage dataSharing:(SBBParticipantDataSharingScope)scope completion:(nullable SBBConsentManagerCompletionBlock)completion

Parameters

name

The user’s name.

date

The user’s birthday in the format “YYYY-MM-DD”. Must be nonnull if the study has a minimum age set.

signatureImage

Image file of the user’s signature. Should be less than 10kb. Optional, can be nil.

scope

The scope of data sharing to which the user has consented.

completion

An SBBConsentManagerCompletionBlock to be called upon completion.

Return Value

An NSURLSessionTask object so you can cancel or suspend/resume the request.

Declared In

SBBConsentManager.h

– consentSignature:forSubpopulationGuid:birthdate:signatureImage:dataSharing:completion: required method

Submit the user’s “signature” and birthdate to indicate consent to participate in this research project.

- (nonnull NSURLSessionTask *)consentSignature:(nonnull NSString *)name forSubpopulationGuid:(nonnull NSString *)subpopGuid birthdate:(nullable NSDate *)date signatureImage:(nullable UIImage *)signatureImage dataSharing:(SBBParticipantDataSharingScope)scope completion:(nullable SBBConsentManagerCompletionBlock)completion

Parameters

name

The user’s name.

subpopGuid

The GUID of the subpopulation for which the consent is being signed.

date

The user’s birthday in the format “YYYY-MM-DD”. Must be nonnull if the study has a minimum age set.

signatureImage

Image file of the user’s signature. Should be less than 10kb. Optional, can be nil.

scope

The scope of data sharing to which the user has consented.

completion

An SBBConsentManagerCompletionBlock to be called upon completion.

Return Value

An NSURLSessionTask object so you can cancel or suspend/resume the request.

Declared In

SBBConsentManager.h

– retrieveConsentSignatureWithCompletion: required method

Retrieve the user’s consent signature as previously submitted. If the user has not submitted a consent signature, this method throws an Entity Not Found error. (Deprecated: use getConsentSignatureWithCompletion:notConsented: instead.)

- (nonnull NSURLSessionTask *)retrieveConsentSignatureWithCompletion:(nullable SBBConsentManagerRetrieveCompletionBlock)completion

Parameters

completion

An SBBConsentManagerRetrieveCompletionBlock to be called upon completion.

Return Value

An NSURLSessionTask object so you can cancel or suspend/resume the request.

Declared In

SBBConsentManager.h

– getConsentSignatureForSubpopulation:completion: required method

Get the user’s consent signature as previously submitted. If the user has not submitted a required consent signature, the SBBBridgeAppDelegate method handleUserNotConsentedError:sessionInfo:networkManager: will be called if it has been implemented in the app delegate, just before calling the completion handler.

- (nonnull NSURLSessionTask *)getConsentSignatureForSubpopulation:(nonnull NSString *)subpopGuid completion:(nullable SBBConsentManagerGetCompletionBlock)completion

Parameters

subpopGuid

The GUID of the subpopulation for which the consent signature is being fetched.

completion

An SBBConsentManagerGetCompletionBlock to be called upon completion. See the documentation of that block type for details on what is passed to it under various circumstances.

Return Value

An NSURLSessionTask object so you can cancel or suspend/resume the request.

Declared In

SBBConsentManager.h

– withdrawConsentWithReason:completion: required method

Withdraw all consents to research for this participant, whether currently applicable or not.

- (nonnull NSURLSessionTask *)withdrawConsentWithReason:(nullable NSString *)reason completion:(nullable SBBConsentManagerCompletionBlock)completion

Parameters

reason

A freeform text string entered by the participant describing their reasons for withdrawing from the study. Optional, can be nil or empty.

completion

An SBBConsentManagerCompletionBlock to be called upon completion.

Return Value

An NSURLSessionTask object so you can cancel or suspend/resume the request.

Declared In

SBBConsentManager.h

– withdrawConsentForSubpopulation:withReason:completion: required method

Withdraw the user’s consent signature previously submitted for a specific subpopulation.

- (nonnull NSURLSessionTask *)withdrawConsentForSubpopulation:(nonnull NSString *)subpopGuid withReason:(nullable NSString *)reason completion:(nullable SBBConsentManagerCompletionBlock)completion

Parameters

subpopGuid

The GUID of the subpopulation for which the consent signature is being withdrawn.

reason

A freeform text string entered by the participant describing their reasons for withdrawing from the study subpopulation. Optional, can be nil or empty.

completion

An SBBConsentManagerCompletionBlock to be called upon completion.

Return Value

An NSURLSessionTask object so you can cancel or suspend/resume the request.

Declared In

SBBConsentManager.h

– emailConsentForSubpopulation:completion: required method

Email (again) the consent document signed by the user when consenting as a member of a particular subpopulation.

- (nonnull NSURLSessionTask *)emailConsentForSubpopulation:(nonnull NSString *)subpopGuid completion:(nullable SBBConsentManagerCompletionBlock)completion

Parameters

subpopGuid

The GUID of the subpopulation for which the consent document is to be emailed.

completion

An SBBConsentManagerCompletionBlock to be called upon completion.

Return Value

An NSURLSessionTask object so you can cancel or suspend/resume the request.

Declared In

SBBConsentManager.h