...
Code Block | ||
---|---|---|
| ||
class Enrollment { String studyId; // optional String externalId; // the consent signed to enrollment String consentGuid; // true if consentGuid != the study's required consent GUID, // and the required consent requires reconsent. User is // still considered to be enrolled in study, e.g. uploads // will not fail. boolean reconsentRequired; // behaves similarly to logical deletion boolean withdrawn; } |
SQL
The consent signatures table may be able to store signatures for the v2 version of consent, if the consent GUID can be stored in the subpopulation GUID column (the values are in fact globally unique). If a new Hibernate model can be associated to to the same table, it may reduce confusion.
UserSession v2
These changes to consent lead to some significant changes to the user session. In v2 apps, I would like to clean up the session in the following ways:
...
And in place of many of these, I would add one field: enrollments
. This would be an array of enrollment records without withdrawn records (see above). A user is considered “consented” to access participant-facing APIs without receiving a 412 from the API if they have at least one enrollment record.
SQL
The new consent objects will be created in SQL and will replace StudyConsent, Subpopulation. ConsentSignature will continue to be stored in SQL as it is now, repurposing the AccountConsents table (the content of a signature is not changing).
The consent signatures table may be able to store signatures for the v2 version of consent, if the consent GUID can be stored in the subpopulation GUID column (the values are in fact globally unique).
Candidates API
Code Block |
---|
Candidate { String anonymousId; DateTime firstContactOn; DateTime mostRecentContactOn; String anonSessionToken; // should map 1:1 with a consent, but we can include consentGuid String studyId; String userId; String stepCompleted; // eligibility, comprehension, consented, demographics Enum eligibility; // eligible, ineligible List<RejectedAnswer> eligibilityRejections; JsonNode clientState; } |
...