SBBConsentManager Class Reference

Inherits from SBBBridgeAPIManager : NSObject
Conforms to SBBComponent
SBBConsentManagerProtocol
Declared in SBBConsentManager.h
SBBConsentManager.m

Overview

This class handles communication with the Bridge Consent API.

– consentSignature:birthdate:signatureImage:dataSharing:completion:

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.)

- (NSURLSessionTask *)consentSignature:(NSString *)name birthdate:(NSDate *)date signatureImage:(UIImage *)signatureImage dataSharing:(SBBParticipantDataSharingScope)scope completion:(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:

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

- (NSURLSessionTask *)consentSignature:(NSString *)name forSubpopulationGuid:(NSString *)subpopGuid birthdate:(NSDate *)date signatureImage:(UIImage *)signatureImage dataSharing:(SBBParticipantDataSharingScope)scope completion:(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:

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.)

- (NSURLSessionTask *)retrieveConsentSignatureWithCompletion:(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:

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.

- (NSURLSessionTask *)getConsentSignatureForSubpopulation:(NSString *)subpopGuid completion:(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:

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

- (NSURLSessionTask *)withdrawConsentWithReason:(NSString *)reason completion:(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:

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

- (NSURLSessionTask *)withdrawConsentForSubpopulation:(NSString *)subpopGuid withReason:(NSString *)reason completion:(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:

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

- (NSURLSessionTask *)emailConsentForSubpopulation:(NSString *)subpopGuid completion:(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