Appearance
econsent database schema
Generated from the EF Core model of Cadence.Apps.Econsent.Infrastructure.Persistence.EconsentDbContext, not from a live database. Unqualified tables live in the econsent schema.
| Table | Entity | Columns |
|---|---|---|
econsent.InboxState | InboxState | 11 |
econsent.OutboxMessage | OutboxMessage | 21 |
econsent.OutboxState | OutboxState | 6 |
econsent.audit_log_entries | AuditLogEntry | 12 |
econsent.biometric_liveness_verifications | BiometricLivenessVerification | 13 |
econsent.comprehension_checks | ComprehensionCheck | 10 |
econsent.comprehension_results | ComprehensionResult | 14 |
econsent.consent_audit_logs | ConsentAuditLog | 11 |
econsent.consent_clauses | ConsentClause | 10 |
econsent.consent_documents | ConsentDocument | 10 |
econsent.consent_signatures | ConsentSignature | 16 |
econsent.consent_templates | ConsentTemplate | 14 |
econsent.consent_translations | ConsentTranslation | 14 |
econsent.consent_withdrawals | ConsentWithdrawal | 15 |
econsent.consumed_signature_tokens | ConsumedSignatureToken | 3 |
econsent.etmf_archival_deliveries | EtmfArchivalDelivery | 19 |
econsent.granular_consent_options | GranularConsentOption | 13 |
econsent.reconsent_requirements | ReconsentRequirement | 16 |
econsent.subject_consent_option_selections | SubjectConsentOptionSelection | 9 |
econsent.subject_consents | SubjectConsent | 16 |
econsent.InboxState
Entity: InboxState
| Column | Type | Null | Default | Key |
|---|---|---|---|---|
Id | bigint | no | PK | |
Consumed | timestamp with time zone | yes | ||
ConsumerId | uuid | no | ||
Delivered | timestamp with time zone | yes | ||
ExpirationTime | timestamp with time zone | yes | ||
LastSequenceNumber | bigint | yes | ||
LockId | uuid | no | ||
MessageId | uuid | no | ||
ReceiveCount | integer | no | ||
Received | timestamp with time zone | no | ||
RowVersion | bytea | yes |
Indexes:
AK_InboxState_MessageId_ConsumerId: unique constraint (MessageId,ConsumerId)IX_InboxState_Delivered: (Delivered)
econsent.OutboxMessage
Entity: OutboxMessage
| Column | Type | Null | Default | Key |
|---|---|---|---|---|
SequenceNumber | bigint | no | PK | |
Body | text | no | ||
ContentType | character varying(256) | no | ||
ConversationId | uuid | yes | ||
CorrelationId | uuid | yes | ||
DestinationAddress | character varying(256) | yes | ||
EnqueueTime | timestamp with time zone | yes | ||
ExpirationTime | timestamp with time zone | yes | ||
FaultAddress | character varying(256) | yes | ||
Headers | text | yes | ||
InboxConsumerId | uuid | yes | ||
InboxMessageId | uuid | yes | ||
InitiatorId | uuid | yes | ||
MessageId | uuid | no | ||
MessageType | text | no | ||
OutboxId | uuid | yes | ||
Properties | text | yes | ||
RequestId | uuid | yes | ||
ResponseAddress | character varying(256) | yes | ||
SentTime | timestamp with time zone | no | ||
SourceAddress | character varying(256) | yes |
Foreign keys:
FK_OutboxMessage_InboxState_InboxMessageId_InboxConsumerId: (InboxMessageId,InboxConsumerId) referenceseconsent.InboxState(MessageId,ConsumerId), on delete no actionFK_OutboxMessage_OutboxState_OutboxId: (OutboxId) referenceseconsent.OutboxState(OutboxId), on delete no action
Indexes:
IX_OutboxMessage_EnqueueTime: (EnqueueTime)IX_OutboxMessage_ExpirationTime: (ExpirationTime)IX_OutboxMessage_InboxMessageId_InboxConsumerId_SequenceNumber: unique (InboxMessageId,InboxConsumerId,SequenceNumber)IX_OutboxMessage_OutboxId_SequenceNumber: unique (OutboxId,SequenceNumber)
econsent.OutboxState
Entity: OutboxState
| Column | Type | Null | Default | Key |
|---|---|---|---|---|
OutboxId | uuid | no | PK | |
Created | timestamp with time zone | no | ||
Delivered | timestamp with time zone | yes | ||
LastSequenceNumber | bigint | yes | ||
LockId | uuid | no | ||
RowVersion | bytea | yes |
Indexes:
IX_OutboxState_Created: (Created)
econsent.audit_log_entries
Entity: AuditLogEntry
| Column | Type | Null | Default | Key |
|---|---|---|---|---|
Id | uuid | no | PK | |
Action | character varying(50) | no | ||
BlockHash | character varying(64) | no | ||
ChangesJson | text | yes | ||
EntityId | character varying(255) | no | ||
EntityName | character varying(255) | no | ||
PredecessorHash | character varying(64) | no | ||
ReasonForChange | character varying(1000) | no | ||
Timestamp | timestamp with time zone | no | ||
UserId | character varying(255) | no | ||
VersionIndex | bigint | no | ||
tenant_id | uuid | no |
Indexes:
IX_audit_log_entries_EntityName_Timestamp: (EntityName,Timestamp)IX_audit_log_entries_tenant_id: (tenant_id)
econsent.biometric_liveness_verifications
Entity: BiometricLivenessVerification
| Column | Type | Null | Default | Key |
|---|---|---|---|---|
Id | character varying(36) | no | PK | |
AntiSpoofScore | numeric(5,4) | no | ||
ConsentId | character varying(36) | no | ||
CreatedAt | timestamp with time zone | no | ||
CreatedBy | character varying(255) | no | ||
IsLive | boolean | no | ||
LivenessToken | text | no | ||
LivenessTokenHash | character varying(64) | no | ||
ReasonForChange | character varying(1000) | no | ||
Status | character varying(50) | no | ||
SubjectPseudonym | character varying(255) | no | ||
VerifiedAt | timestamp with time zone | no | ||
tenant_id | uuid | no |
Indexes:
IX_biometric_liveness_verifications_ConsentId: (ConsentId)IX_biometric_liveness_verifications_LivenessTokenHash: (LivenessTokenHash)IX_biometric_liveness_verifications_SubjectPseudonym: (SubjectPseudonym)IX_biometric_liveness_verifications_tenant_id: (tenant_id)
econsent.comprehension_checks
Entity: ComprehensionCheck
| Column | Type | Null | Default | Key |
|---|---|---|---|---|
Id | character varying(36) | no | PK | |
CreatedAt | timestamp with time zone | no | ||
CreatedBy | character varying(255) | no | ||
ExpectedAnswersJson | jsonb | no | ||
QuestionsJson | jsonb | no | ||
ReasonForChange | character varying(1000) | no | ||
TemplateId | character varying(255) | no | ||
ThresholdPolicyJson | jsonb | no | ||
VersionIndex | integer | no | ||
tenant_id | uuid | no |
Indexes:
IX_comprehension_checks_TemplateId: (TemplateId)IX_comprehension_checks_tenant_id: (tenant_id)
econsent.comprehension_results
Entity: ComprehensionResult
| Column | Type | Null | Default | Key |
|---|---|---|---|---|
Id | character varying(36) | no | PK | |
CreatedAt | timestamp with time zone | no | ||
CreatedBy | character varying(255) | no | ||
ExpectedAnswersJson | jsonb | no | ||
Passed | boolean | no | ||
QuestionsJson | jsonb | no | ||
ReasonForChange | character varying(1000) | no | ||
Score | numeric(5,2) | no | ||
SubjectPseudonym | character varying(255) | no | ||
SubmittedAnswersJson | jsonb | no | ||
TemplateId | character varying(255) | no | ||
ThresholdPolicyJson | jsonb | no | ||
VersionIndex | integer | no | ||
tenant_id | uuid | no |
Indexes:
IX_comprehension_results_SubjectPseudonym: (SubjectPseudonym)IX_comprehension_results_TemplateId: (TemplateId)IX_comprehension_results_tenant_id: (tenant_id)
econsent.consent_audit_logs
Entity: ConsentAuditLog
| Column | Type | Null | Default | Key |
|---|---|---|---|---|
Id | character varying(36) | no | PK | |
Action | character varying(50) | no | ||
ActorId | character varying(255) | no | ||
ActorRole | character varying(255) | no | ||
Details | character varying(1000) | no | ||
DocumentId | character varying(36) | yes | ||
PreviousDigest | character varying(64) | yes | ||
ReasonForChange | character varying(1000) | no | ||
Sha256Digest | character varying(64) | yes | ||
Timestamp | timestamp with time zone | no | ||
tenant_id | uuid | no |
Indexes:
IX_consent_audit_logs_ActorId: (ActorId)IX_consent_audit_logs_DocumentId: (DocumentId)IX_consent_audit_logs_Timestamp: (Timestamp)IX_consent_audit_logs_tenant_id: (tenant_id)
econsent.consent_clauses
Entity: ConsentClause
| Column | Type | Null | Default | Key |
|---|---|---|---|---|
Id | character varying(36) | no | PK | |
ClauseId | character varying(255) | no | ||
CreatedAt | timestamp with time zone | no | ||
CreatedBy | character varying(255) | no | ||
ReasonForChange | character varying(1000) | no | ||
StudyId | character varying(255) | no | ||
Text | text | no | ||
Title | character varying(255) | no | ||
VersionIndex | integer | no | ||
tenant_id | uuid | no |
Indexes:
IX_consent_clauses_ClauseId: (ClauseId)IX_consent_clauses_StudyId: (StudyId)IX_consent_clauses_tenant_id: (tenant_id)
econsent.consent_documents
Entity: ConsentDocument
| Column | Type | Null | Default | Key |
|---|---|---|---|---|
Id | character varying(36) | no | PK | |
Content | text | no | ||
CreatedAt | timestamp with time zone | no | ||
CreatedBy | character varying(255) | no | ||
DocumentName | character varying(255) | no | ||
ReasonForChange | character varying(1000) | no | ||
SiteId | character varying(255) | no | ||
StudyId | character varying(255) | no | ||
VersionIndex | integer | no | ||
tenant_id | uuid | no |
Indexes:
IX_consent_documents_SiteId: (SiteId)IX_consent_documents_StudyId: (StudyId)IX_consent_documents_tenant_id: (tenant_id)
econsent.consent_signatures
Entity: ConsentSignature
| Column | Type | Null | Default | Key |
|---|---|---|---|---|
Id | character varying(36) | no | PK | |
CreatedBy | character varying(255) | no | ||
DigestSha256 | character varying(64) | yes | ||
LarAuthorityBasis | character varying(500) | yes | ||
LarRelationship | character varying(100) | yes | ||
Meaning | character varying(255) | yes | ||
ReasonForChange | character varying(1000) | no | ||
Role | character varying(50) | no | ||
SignatureBindingSha256 | character varying(64) | yes | ||
SignedAt | timestamp with time zone | no | ||
SignerEmail | character varying(1424) | yes | ||
SignerName | character varying(255) | yes | ||
SubjectPseudonym | character varying(255) | no | ||
TemplateId | character varying(255) | no | ||
VersionIndex | integer | no | ||
tenant_id | uuid | no |
Indexes:
IX_consent_signatures_SubjectPseudonym: (SubjectPseudonym)IX_consent_signatures_TemplateId: (TemplateId)IX_consent_signatures_tenant_id: (tenant_id)
econsent.consent_templates
Entity: ConsentTemplate
| Column | Type | Null | Default | Key |
|---|---|---|---|---|
Id | character varying(36) | no | PK | |
ClausesJson | jsonb | no | ||
CreatedAt | timestamp with time zone | no | ||
CreatedBy | character varying(255) | no | ||
IsPublished | boolean | no | ||
ProtocolVersion | character varying(255) | no | ||
ReasonForChange | character varying(1000) | no | ||
RequiresReconsent | boolean | no | ||
StudyId | character varying(255) | no | ||
TemplateId | character varying(255) | no | ||
TemplateName | character varying(255) | no | ||
VersionIndex | integer | no | ||
WorkflowStepsJson | jsonb | no | ||
tenant_id | uuid | no |
Indexes:
IX_consent_templates_StudyId: (StudyId)IX_consent_templates_TemplateId: (TemplateId)IX_consent_templates_tenant_id: (tenant_id)
econsent.consent_translations
Entity: ConsentTranslation
| Column | Type | Null | Default | Key |
|---|---|---|---|---|
Id | character varying(36) | no | PK | |
CreatedAt | timestamp with time zone | no | ||
CreatedBy | character varying(255) | no | ||
LanguageCode | character varying(10) | no | ||
ReasonForChange | character varying(1000) | no | ||
SourceId | character varying(255) | no | ||
SourceType | character varying(50) | no | ||
SourceVersionIndex | integer | no | ||
Status | character varying(50) | no | ||
TranslatedText | text | no | ||
TranslatedTitle | character varying(255) | no | ||
TranslationId | character varying(255) | no | ||
VersionIndex | integer | no | ||
tenant_id | uuid | no |
Indexes:
IX_consent_translations_LanguageCode: (LanguageCode)IX_consent_translations_SourceId: (SourceId)IX_consent_translations_TranslationId: (TranslationId)IX_consent_translations_tenant_id: (tenant_id)
econsent.consent_withdrawals
Entity: ConsentWithdrawal
| Column | Type | Null | Default | Key |
|---|---|---|---|---|
Id | character varying(36) | no | PK | |
AcknowledgedByInvestigator | boolean | no | ||
CreatedAt | timestamp with time zone | no | ||
CreatedBy | character varying(255) | no | ||
InvestigatorId | character varying(255) | yes | ||
ReasonCategory | character varying(100) | no | ||
ReasonDetail | character varying(1000) | no | ||
ReasonForChange | character varying(1000) | no | ||
Scope | character varying(100) | no | ||
SiteId | character varying(255) | no | ||
StudyId | character varying(255) | no | ||
SubjectPseudonym | character varying(255) | no | ||
TemplateId | character varying(255) | no | ||
WithdrawalDate | timestamp with time zone | no | ||
tenant_id | uuid | no |
Indexes:
IX_consent_withdrawals_SiteId: (SiteId)IX_consent_withdrawals_StudyId: (StudyId)IX_consent_withdrawals_SubjectPseudonym: (SubjectPseudonym)IX_consent_withdrawals_TemplateId: (TemplateId)IX_consent_withdrawals_tenant_id: (tenant_id)
econsent.consumed_signature_tokens
Entity: ConsumedSignatureToken
| Column | Type | Null | Default | Key |
|---|---|---|---|---|
TokenId | character varying(128) | no | PK | |
ConsumedAt | timestamp with time zone | no | ||
RetainUntil | timestamp with time zone | no |
Indexes:
IX_consumed_signature_tokens_RetainUntil: (RetainUntil)
econsent.etmf_archival_deliveries
Entity: EtmfArchivalDelivery
| Column | Type | Null | Default | Key |
|---|---|---|---|---|
Id | character varying(36) | no | PK | |
ArtifactContent | text | no | ||
Attempts | integer | no | ||
CompletedAt | timestamp with time zone | yes | ||
CorrelationId | character varying(255) | no | ||
CreatedAt | timestamp with time zone | no | ||
CreatedBy | character varying(255) | no | ||
EtmfDocumentId | character varying(36) | yes | ||
LastError | text | yes | ||
NextRetryAt | timestamp with time zone | yes | ||
ReasonForChange | character varying(1000) | no | ||
RetryEligible | boolean | no | ||
SiteId | character varying(255) | yes | ||
Status | character varying(50) | no | ||
StudyId | character varying(255) | no | ||
SubjectPseudonym | character varying(255) | no | ||
TemplateId | character varying(255) | no | ||
VersionIndex | integer | no | ||
tenant_id | uuid | no |
Indexes:
IX_etmf_archival_deliveries_CorrelationId: unique (CorrelationId)IX_etmf_archival_deliveries_SubjectPseudonym: (SubjectPseudonym)IX_etmf_archival_deliveries_TemplateId: (TemplateId)IX_etmf_archival_deliveries_tenant_id: (tenant_id)
econsent.granular_consent_options
Entity: GranularConsentOption
| Column | Type | Null | Default | Key |
|---|---|---|---|---|
Id | character varying(36) | no | PK | |
Category | character varying(50) | no | ||
CreatedAt | timestamp with time zone | no | ||
CreatedBy | character varying(255) | no | ||
DefaultSelected | boolean | no | ||
Description | text | no | ||
IsMandatory | boolean | no | ||
OptionCode | character varying(100) | no | ||
ReasonForChange | character varying(1000) | no | ||
TemplateId | character varying(255) | no | ||
Title | character varying(255) | no | ||
VersionIndex | integer | no | ||
tenant_id | uuid | no |
Indexes:
IX_granular_consent_options_OptionCode: (OptionCode)IX_granular_consent_options_TemplateId: (TemplateId)IX_granular_consent_options_tenant_id: (tenant_id)
econsent.reconsent_requirements
Entity: ReconsentRequirement
| Column | Type | Null | Default | Key |
|---|---|---|---|---|
Id | character varying(36) | no | PK | |
ChangeSummary | character varying(1000) | no | ||
CompletedConsentId | character varying(36) | yes | ||
CreatedAt | timestamp with time zone | no | ||
CreatedBy | character varying(255) | no | ||
DeadlineAt | timestamp with time zone | yes | ||
NewVersionIndex | integer | no | ||
PriorVersionIndex | integer | no | ||
ReasonForChange | character varying(1000) | no | ||
SiteId | character varying(255) | yes | ||
Status | character varying(50) | no | ||
StudyId | character varying(255) | no | ||
SubjectPseudonym | character varying(255) | no | ||
SubstantiveChangesJson | jsonb | no | ||
TemplateId | character varying(255) | no | ||
tenant_id | uuid | no |
Indexes:
IX_reconsent_requirements_SiteId: (SiteId)IX_reconsent_requirements_StudyId: (StudyId)IX_reconsent_requirements_SubjectPseudonym: (SubjectPseudonym)IX_reconsent_requirements_TemplateId: (TemplateId)IX_reconsent_requirements_tenant_id: (tenant_id)
econsent.subject_consent_option_selections
Entity: SubjectConsentOptionSelection
| Column | Type | Null | Default | Key |
|---|---|---|---|---|
Id | character varying(36) | no | PK | |
ConsentId | character varying(36) | no | ||
CreatedBy | character varying(255) | no | ||
OptionCode | character varying(100) | no | ||
ReasonForChange | character varying(1000) | no | ||
Selected | boolean | no | ||
SelectedAt | timestamp with time zone | no | ||
SubjectPseudonym | character varying(255) | no | ||
tenant_id | uuid | no |
Indexes:
IX_subject_consent_option_selections_ConsentId: (ConsentId)IX_subject_consent_option_selections_OptionCode: (OptionCode)IX_subject_consent_option_selections_SubjectPseudonym: (SubjectPseudonym)IX_subject_consent_option_selections_tenant_id: (tenant_id)
econsent.subject_consents
Entity: SubjectConsent
| Column | Type | Null | Default | Key |
|---|---|---|---|---|
Id | character varying(36) | no | PK | |
CreatedAt | timestamp with time zone | no | ||
CreatedBy | character varying(255) | no | ||
DeviceTimestamp | timestamp with time zone | yes | ||
ProtocolVersion | character varying(255) | no | ||
ReasonForChange | character varying(1000) | no | ||
ServerTimestamp | timestamp with time zone | no | ||
SignatureManifestJson | jsonb | no | ||
SiteId | character varying(255) | no | ||
SourceContentIdentity | text | no | ||
Status | character varying(50) | no | ||
StudyId | character varying(255) | no | ||
SubjectPseudonym | character varying(255) | no | ||
TemplateId | character varying(255) | no | ||
VersionIndex | integer | no | ||
tenant_id | uuid | no |
Indexes:
IX_subject_consents_SiteId: (SiteId)IX_subject_consents_StudyId: (StudyId)IX_subject_consents_SubjectPseudonym: (SubjectPseudonym)IX_subject_consents_TemplateId: (TemplateId)IX_subject_consents_tenant_id: (tenant_id)