Appearance
kernel database schema
Generated from the EF Core model of Cadence.Kernel.Persistence.KernelDbContext, not from a live database. Unqualified tables live in the public schema.
kernel.activity_entries
Entity: ActivityEntryRecord
| Column | Type | Null | Default | Key |
|---|---|---|---|---|
event_id | uuid | no | PK | |
tenant_id | uuid | no | PK | |
actor_id | character varying(255) | no | ||
correlation_id | uuid | no | ||
family | character varying(32) | no | ||
occurred_valid | timestamp with time zone | yes | ||
recorded | timestamp with time zone | no | ||
scope | text[] | no | ||
subject | character varying(128) | yes | ||
subject_kind | character varying(48) | yes | ||
type | character varying(128) | no |
Foreign keys:
FK_activity_entries_tenants_tenant_id: (tenant_id) referenceskernel.tenants(id), on delete restrict
Indexes:
IX_activity_entries_scope: (scope)IX_activity_entries_tenant_id_recorded_event_id: (tenant_id,recorded,event_id)
kernel.artifact_versions
Entity: ArtifactVersion
| Column | Type | Null | Default | Key |
|---|---|---|---|---|
id | uuid | no | PK | |
artifact_id | uuid | no | ||
content_hash | character varying(71) | no | ||
media_type | character varying(255) | no | ||
number | integer | no | ||
recorded_at | timestamp with time zone | no | ||
size_bytes | bigint | no | ||
storage_ref | character varying(1024) | no | ||
tenant_id | uuid | no |
Foreign keys:
FK_artifact_versions_artifacts_tenant_id_artifact_id: (tenant_id,artifact_id) referenceskernel.artifacts(tenant_id,id), on delete restrict
Indexes:
AK_artifact_versions_tenant_id_id: unique constraint (tenant_id,id)IX_artifact_versions_tenant_id_artifact_id_content_hash: unique (tenant_id,artifact_id,content_hash)IX_artifact_versions_tenant_id_artifact_id_number: unique (tenant_id,artifact_id,number)
Check constraints:
ck_artifact_versions_content_hash:content_hash ~ '^sha256:[0-9a-f]{64}$'ck_artifact_versions_number:number > 0ck_artifact_versions_size:size_bytes > 0
kernel.artifacts
Entity: Artifact
| Column | Type | Null | Default | Key |
|---|---|---|---|---|
id | uuid | no | PK | |
created_at | timestamp with time zone | no | ||
created_by | character varying(255) | no | ||
kind | character varying(32) | no | ||
reason_for_change | character varying(1000) | no | ||
study_id | uuid | yes | ||
tenant_id | uuid | no | ||
title | character varying(500) | no | ||
version_index | bigint | no |
Foreign keys:
FK_artifacts_studies_tenant_id_study_id: (tenant_id,study_id) referenceskernel.studies(tenant_id,id), on delete restrictFK_artifacts_tenants_tenant_id: (tenant_id) referenceskernel.tenants(id), on delete restrict
Indexes:
AK_artifacts_tenant_id_id: unique constraint (tenant_id,id)IX_artifacts_tenant_id_study_id_kind: (tenant_id,study_id,kind)
kernel.assertions
Entity: Assertion
| Column | Type | Null | Default | Key |
|---|---|---|---|---|
id | uuid | no | PK | |
asserted_at | timestamp with time zone | no | ||
asserted_by | character varying(255) | no | ||
attestation_id | uuid | yes | ||
created_at | timestamp with time zone | no | ||
created_by | character varying(255) | no | ||
enrollment_id | uuid | yes | ||
kind | character varying(32) | no | ||
reason_for_change | character varying(1000) | no | ||
retracts_id | uuid | yes | ||
study_id | uuid | no | ||
target_id | uuid | no | ||
target_kind | character varying(64) | no | ||
target_revision | integer | yes | ||
tenant_id | uuid | no | ||
text | character varying(4000) | yes | ||
version_index | bigint | no |
Foreign keys:
FK_assertions_assertions_tenant_id_retracts_id: (tenant_id,retracts_id) referenceskernel.assertions(tenant_id,id), on delete restrictFK_assertions_attestations_tenant_id_attestation_id: (tenant_id,attestation_id) referenceskernel.attestations(tenant_id,id), on delete restrictFK_assertions_enrollments_tenant_id_enrollment_id: (tenant_id,enrollment_id) referenceskernel.enrollments(tenant_id,id), on delete restrictFK_assertions_studies_tenant_id_study_id: (tenant_id,study_id) referenceskernel.studies(tenant_id,id), on delete restrictFK_assertions_tenants_tenant_id: (tenant_id) referenceskernel.tenants(id), on delete restrict
Indexes:
AK_assertions_tenant_id_id: unique constraint (tenant_id,id)IX_assertions_tenant_id_attestation_id: (tenant_id,attestation_id)IX_assertions_tenant_id_enrollment_id: (tenant_id,enrollment_id)IX_assertions_tenant_id_retracts_id: unique (tenant_id,retracts_id) whereretracts_id IS NOT NULLIX_assertions_tenant_id_study_id: (tenant_id,study_id)IX_assertions_tenant_id_target_id_kind: (tenant_id,target_id,kind)
Check constraints:
ck_assertions_lock_attested:kind NOT IN ('Locked', 'Frozen') OR attestation_id IS NOT NULLck_assertions_target_revision:target_revision IS NULL OR target_revision > 0
kernel.attestations
Entity: Attestation
| Column | Type | Null | Default | Key |
|---|---|---|---|---|
id | uuid | no | PK | |
actor_id | character varying(255) | no | ||
authenticated_at | timestamp with time zone | no | ||
created_at | timestamp with time zone | no | ||
created_by | character varying(255) | no | ||
meaning | character varying(32) | no | ||
method | character varying(64) | no | ||
reason | character varying(1000) | no | ||
reason_for_change | character varying(1000) | no | ||
recorded_at | timestamp with time zone | no | ||
target_content_hash | character varying(71) | no | ||
target_id | uuid | no | ||
target_kind | character varying(64) | no | ||
tenant_id | uuid | no | ||
version_index | bigint | no |
Foreign keys:
FK_attestations_tenants_tenant_id: (tenant_id) referenceskernel.tenants(id), on delete restrict
Indexes:
AK_attestations_tenant_id_id: unique constraint (tenant_id,id)IX_attestations_tenant_id_target_kind_target_id: (tenant_id,target_kind,target_id)
Check constraints:
ck_attestations_target_content_hash:target_content_hash ~ '^sha256:[0-9a-f]{64}$'
kernel.audit_chain_heads
Entity: AuditChainHead
| Column | Type | Null | Default | Key |
|---|---|---|---|---|
tenant_id | uuid | no | PK | |
last_hash | character varying(64) | no | ||
last_sequence | bigint | no |
kernel.audit_chain_seals
Entity: AuditChainSeal
| Column | Type | Null | Default | Key |
|---|---|---|---|---|
id | uuid | no | PK | |
hash | character varying(64) | no | ||
sealed_at | timestamp with time zone | no | ||
sealed_by | character varying(256) | no | ||
sequence | bigint | no | ||
tenant_id | uuid | no |
Indexes:
IX_audit_chain_seals_tenant_id_sequence: unique (tenant_id,sequence)
kernel.audit_entries
Entity: AuditEntryRecord
| Column | Type | Null | Default | Key |
|---|---|---|---|---|
id | uuid | no | PK | |
action | character varying(64) | no | ||
activity_id | uuid | no | ||
actor_id | character varying(256) | no | ||
aggregate_id | character varying(200) | yes | ||
aggregate_type | character varying(200) | yes | ||
aggregate_version | bigint | yes | ||
changes | text | no | ||
hash | character varying(64) | no | ||
predecessor_hash | character varying(64) | no | ||
reason_for_change | character varying(2000) | no | ||
recorded_at | timestamp with time zone | no | ||
sequence | bigint | no | ||
tenant_id | uuid | no |
Indexes:
IX_audit_entries_activity_id: (activity_id)IX_audit_entries_tenant_id_sequence: unique (tenant_id,sequence)
kernel.code_system_entries
Entity: CodeSystemEntry
| Column | Type | Null | Default | Key |
|---|---|---|---|---|
code_system_version_id | uuid | no | PK | |
ordinal | integer | no | PK | |
tenant_id | uuid | no | PK | |
code | character varying(64) | no | ||
definition | text | yes | ||
display | character varying(1000) | no | ||
group_code | character varying(64) | yes | ||
submission_value | character varying(255) | yes | ||
synonyms | text[] | no |
Foreign keys:
FK_code_system_entries_code_system_versions_tenant_id_code_sys~: (tenant_id,code_system_version_id) referenceskernel.code_system_versions(tenant_id,id), on delete restrict
Indexes:
IX_code_system_entries_tenant_id_code_system_version_id_code: (tenant_id,code_system_version_id,code)IX_code_system_entries_tenant_id_code_system_version_id_group_~: unique (tenant_id,code_system_version_id,group_code,code)
kernel.code_system_versions
Entity: CodeSystemVersion
| Column | Type | Null | Default | Key |
|---|---|---|---|---|
id | uuid | no | PK | |
code_system_id | uuid | no | ||
created_at | timestamp with time zone | no | ||
created_by | character varying(255) | no | ||
entry_count | integer | no | ||
package_byte_length | bigint | no | ||
package_file_name | character varying(255) | no | ||
package_format | character varying(64) | no | ||
package_sha256 | character(64) | no | ||
package_source_uri | character varying(1024) | no | ||
reason_for_change | character varying(1000) | no | ||
released_on | date | no | ||
tenant_id | uuid | no | ||
version | character varying(64) | no | ||
version_index | bigint | no |
Foreign keys:
FK_code_system_versions_code_systems_tenant_id_code_system_id: (tenant_id,code_system_id) referenceskernel.code_systems(tenant_id,id), on delete restrictFK_code_system_versions_tenants_tenant_id: (tenant_id) referenceskernel.tenants(id), on delete restrict
Indexes:
AK_code_system_versions_tenant_id_id: unique constraint (tenant_id,id)IX_code_system_versions_tenant_id_code_system_id_version: unique (tenant_id,code_system_id,version)
kernel.code_systems
Entity: CodeSystem
| Column | Type | Null | Default | Key |
|---|---|---|---|---|
id | uuid | no | PK | |
created_at | timestamp with time zone | no | ||
created_by | character varying(255) | no | ||
license | character varying(32) | no | ||
name | character varying(255) | no | ||
publisher | character varying(255) | no | ||
reason_for_change | character varying(1000) | no | ||
tenant_id | uuid | no | ||
uri | character varying(512) | no | ||
version_index | bigint | no |
Foreign keys:
FK_code_systems_tenants_tenant_id: (tenant_id) referenceskernel.tenants(id), on delete restrict
Indexes:
AK_code_systems_tenant_id_id: unique constraint (tenant_id,id)IX_code_systems_tenant_id_uri: unique (tenant_id,uri)
kernel.collection_instance_members
Entity: CollectionInstanceMember
| Column | Type | Null | Default | Key |
|---|---|---|---|---|
id | uuid | no | PK | |
collection_instance_id | uuid | no | ||
item_id | character varying(128) | no | ||
joined_at | timestamp with time zone | no | ||
observation_id | uuid | no | ||
tenant_id | uuid | no |
Foreign keys:
FK_collection_instance_members_collection_instances_tenant_id_~: (tenant_id,collection_instance_id) referenceskernel.collection_instances(tenant_id,id), on delete restrictFK_collection_instance_members_observations_tenant_id_observat~: (tenant_id,observation_id) referenceskernel.observations(tenant_id,id), on delete restrict
Indexes:
IX_collection_instance_members_tenant_id_collection_instance_i~: unique (tenant_id,collection_instance_id,item_id)IX_collection_instance_members_tenant_id_observation_id: unique (tenant_id,observation_id)
kernel.collection_instances
Entity: CollectionInstance
| Column | Type | Null | Default | Key |
|---|---|---|---|---|
id | uuid | no | PK | |
collected_at | timestamp with time zone | no | ||
collection_spec_id | character varying(128) | no | ||
created_at | timestamp with time zone | no | ||
created_by | character varying(255) | no | ||
enrollment_id | uuid | no | ||
last_saved_at | timestamp with time zone | no | ||
opened_at | timestamp with time zone | no | ||
opened_by | character varying(255) | no | ||
participant_id | uuid | no | ||
planned_activity_id | character varying(128) | yes | ||
protocol_version_id | uuid | no | ||
reason_for_change | character varying(1000) | no | ||
saves | integer | no | ||
study_id | uuid | no | ||
study_site_id | uuid | no | ||
tenant_id | uuid | no | ||
version_index | bigint | no |
Foreign keys:
FK_collection_instances_enrollments_tenant_id_enrollment_id_pa~: (tenant_id,enrollment_id,participant_id,study_site_id) referenceskernel.enrollments(tenant_id,id,participant_id,study_site_id), on delete restrictFK_collection_instances_protocol_versions_tenant_id_protocol_v~: (tenant_id,protocol_version_id) referenceskernel.protocol_versions(tenant_id,id), on delete restrictFK_collection_instances_study_sites_tenant_id_study_site_id_st~: (tenant_id,study_site_id,study_id) referenceskernel.study_sites(tenant_id,id,study_id), on delete restrictFK_collection_instances_tenants_tenant_id: (tenant_id) referenceskernel.tenants(id), on delete restrict
Indexes:
AK_collection_instances_tenant_id_id: unique constraint (tenant_id,id)IX_collection_instances_tenant_id_enrollment_id_participant_id~: (tenant_id,enrollment_id,participant_id,study_site_id)IX_collection_instances_tenant_id_protocol_version_id: (tenant_id,protocol_version_id)IX_collection_instances_tenant_id_study_site_id_study_id: (tenant_id,study_site_id,study_id)
kernel.concept_mappings
Entity: ConceptMapping
| Column | Type | Null | Default | Key |
|---|---|---|---|---|
id | uuid | no | PK | |
code | character varying(64) | no | ||
code_system_version_id | uuid | no | ||
concept_id | uuid | no | ||
concept_version | integer | no | ||
created_at | timestamp with time zone | no | ||
created_by | character varying(255) | no | ||
evidence | character varying(2000) | no | ||
reason_for_change | character varying(1000) | no | ||
relation | character varying(32) | no | ||
status | character varying(32) | no | ||
tenant_id | uuid | no | ||
version_index | bigint | no |
Foreign keys:
FK_concept_mappings_code_system_versions_tenant_id_code_system~: (tenant_id,code_system_version_id) referenceskernel.code_system_versions(tenant_id,id), on delete restrictFK_concept_mappings_concept_revisions_tenant_id_concept_id_con~: (tenant_id,concept_id,concept_version) referenceskernel.concept_revisions(tenant_id,concept_id,version), on delete restrictFK_concept_mappings_tenants_tenant_id: (tenant_id) referenceskernel.tenants(id), on delete restrict
Indexes:
AK_concept_mappings_tenant_id_id: unique constraint (tenant_id,id)IX_concept_mappings_tenant_id_code_system_version_id_code: (tenant_id,code_system_version_id,code)IX_concept_mappings_tenant_id_concept_id: (tenant_id,concept_id)IX_concept_mappings_tenant_id_concept_id_concept_version: (tenant_id,concept_id,concept_version)
kernel.concept_revisions
Entity: ConceptRevision
| Column | Type | Null | Default | Key |
|---|---|---|---|---|
concept_id | uuid | no | PK | |
tenant_id | uuid | no | PK | |
version | integer | no | PK | |
definition | text | no | ||
preferred_label | character varying(500) | no | ||
recorded_at | timestamp with time zone | no |
Foreign keys:
FK_concept_revisions_concepts_tenant_id_concept_id: (tenant_id,concept_id) referenceskernel.concepts(tenant_id,id), on delete restrict
kernel.concepts
Entity: Concept
| Column | Type | Null | Default | Key |
|---|---|---|---|---|
id | uuid | no | PK | |
created_at | timestamp with time zone | no | ||
created_by | character varying(255) | no | ||
definition | text | no | ||
external_code | character varying(64) | yes | ||
kind | character varying(32) | no | ||
origin | character varying(32) | no | ||
preferred_label | character varying(500) | no | ||
reason_for_change | character varying(1000) | no | ||
status | character varying(32) | no | ||
tenant_id | uuid | no | ||
version | integer | no | ||
version_index | bigint | no |
Foreign keys:
FK_concepts_tenants_tenant_id: (tenant_id) referenceskernel.tenants(id), on delete restrict
Indexes:
AK_concepts_tenant_id_id: unique constraint (tenant_id,id)IX_concepts_tenant_id_external_code: unique (tenant_id,external_code) whereexternal_code IS NOT NULL
kernel.domain_events
Entity: DomainEventRecord
| Column | Type | Null | Default | Key |
|---|---|---|---|---|
event_id | uuid | no | PK | |
activity_id | uuid | no | ||
actor_id | character varying(256) | no | ||
causation_id | uuid | yes | ||
correlation_id | uuid | no | ||
occurred_valid | timestamp with time zone | yes | ||
payload | jsonb | no | ||
recorded | timestamp with time zone | no | ||
schema_version | integer | no | ||
tenant_id | uuid | no | ||
type | character varying(200) | no |
Indexes:
IX_domain_events_activity_id: (activity_id)IX_domain_events_tenant_id_recorded: (tenant_id,recorded)
kernel.effectivities
Entity: Effectivity
| Column | Type | Null | Default | Key |
|---|---|---|---|---|
id | uuid | no | PK | |
created_at | timestamp with time zone | no | ||
created_by | character varying(255) | no | ||
protocol_version_id | uuid | no | ||
reason_for_change | character varying(1000) | no | ||
scope_country | character varying(2) | yes | ||
scope_level | character varying(16) | no | ||
scope_study_site_id | uuid | yes | ||
status | character varying(32) | no | ||
status_since | timestamp with time zone | no | ||
study_id | uuid | no | ||
tenant_id | uuid | no | ||
version_index | bigint | no |
Foreign keys:
FK_effectivities_protocol_versions_tenant_id_protocol_version_~: (tenant_id,protocol_version_id) referenceskernel.protocol_versions(tenant_id,id), on delete restrictFK_effectivities_studies_tenant_id_study_id: (tenant_id,study_id) referenceskernel.studies(tenant_id,id), on delete restrictFK_effectivities_study_sites_tenant_id_scope_study_site_id_stu~: (tenant_id,scope_study_site_id,study_id) referenceskernel.study_sites(tenant_id,id,study_id), on delete restrictFK_effectivities_tenants_tenant_id: (tenant_id) referenceskernel.tenants(id), on delete restrict
Indexes:
AK_effectivities_tenant_id_id: unique constraint (tenant_id,id)IX_effectivities_tenant_id_protocol_version_id_scope_level_sco~: unique (tenant_id,protocol_version_id,scope_level,scope_country,scope_study_site_id)IX_effectivities_tenant_id_scope_study_site_id_study_id: (tenant_id,scope_study_site_id,study_id)IX_effectivities_tenant_id_study_id: (tenant_id,study_id)
Check constraints:
ck_effectivities_scope:(scope_level = 'Study' AND scope_country IS NULL AND scope_study_site_id IS NULL) OR (scope_level = 'Country' AND scope_country IS NOT NULL AND scope_country ~ '^[A-Z]{2}$' AND scope_study_site_id IS NULL) OR (scope_level = 'StudySite' AND scope_country IS NULL AND scope_study_site_id IS NOT NULL)
kernel.effectivity_status_periods
Entity: EffectivityStatusPeriod
| Column | Type | Null | Default | Key |
|---|---|---|---|---|
id | uuid | no | PK | |
effectivity_id | uuid | no | ||
evidence | uuid[] | no | ||
recorded_period | tstzrange | no | ||
status | character varying(32) | no | ||
tenant_id | uuid | no | ||
valid_period | tstzrange | no |
Foreign keys:
FK_effectivity_status_periods_effectivities_tenant_id_effectiv~: (tenant_id,effectivity_id) referenceskernel.effectivities(tenant_id,id), on delete restrict
Indexes:
IX_effectivity_status_periods_tenant_id_effectivity_id: (tenant_id,effectivity_id)
kernel.enrollment_status_periods
Entity: EnrollmentStatusPeriod
| Column | Type | Null | Default | Key |
|---|---|---|---|---|
id | uuid | no | PK | |
enrollment_id | uuid | no | ||
participant_id | uuid | no | ||
recorded_period | tstzrange | no | ||
status | character varying(16) | no | ||
study_site_id | uuid | no | ||
tenant_id | uuid | no | ||
valid_period | tstzrange | no |
Foreign keys:
FK_enrollment_status_periods_enrollments_tenant_id_enrollment_~: (tenant_id,enrollment_id,participant_id,study_site_id) referenceskernel.enrollments(tenant_id,id,participant_id,study_site_id), on delete restrict
Indexes:
IX_enrollment_status_periods_tenant_id_enrollment_id: (tenant_id,enrollment_id)IX_enrollment_status_periods_tenant_id_enrollment_id_participa~: (tenant_id,enrollment_id,participant_id,study_site_id)
kernel.enrollments
Entity: Enrollment
| Column | Type | Null | Default | Key |
|---|---|---|---|---|
id | uuid | no | PK | |
created_at | timestamp with time zone | no | ||
created_by | character varying(255) | no | ||
enrollment_number | integer | yes | ||
participant_id | uuid | no | ||
reason_for_change | character varying(1000) | no | ||
status | character varying(16) | no | ||
status_since | timestamp with time zone | no | ||
study_id | uuid | no | ||
study_site_id | uuid | no | ||
subject_code | character varying(64) | no | ||
tenant_id | uuid | no | ||
version_index | bigint | no | ||
withdrawal_attestation_id | uuid | yes | ||
withdrawal_kind | character varying(32) | yes |
Foreign keys:
FK_enrollments_attestations_tenant_id_withdrawal_attestation_id: (tenant_id,withdrawal_attestation_id) referenceskernel.attestations(tenant_id,id), on delete restrictFK_enrollments_participants_tenant_id_participant_id: (tenant_id,participant_id) referenceskernel.participants(tenant_id,id), on delete restrictFK_enrollments_study_sites_tenant_id_study_site_id_study_id: (tenant_id,study_site_id,study_id) referenceskernel.study_sites(tenant_id,id,study_id), on delete restrictFK_enrollments_tenants_tenant_id: (tenant_id) referenceskernel.tenants(id), on delete restrict
Indexes:
AK_enrollments_tenant_id_id: unique constraint (tenant_id,id)AK_enrollments_tenant_id_id_participant_id_study_site_id: unique constraint (tenant_id,id,participant_id,study_site_id)IX_enrollments_tenant_id_participant_id: (tenant_id,participant_id)IX_enrollments_tenant_id_study_id_enrollment_number: unique (tenant_id,study_id,enrollment_number) whereenrollment_number IS NOT NULLIX_enrollments_tenant_id_study_id_subject_code: unique (tenant_id,study_id,subject_code)IX_enrollments_tenant_id_study_site_id_study_id: (tenant_id,study_site_id,study_id)IX_enrollments_tenant_id_withdrawal_attestation_id: (tenant_id,withdrawal_attestation_id)
Check constraints:
ck_enrollments_number:enrollment_number IS NULL OR enrollment_number > 0ck_enrollments_numbered:(status IN ('Screening', 'ScreenFailed') AND enrollment_number IS NULL) OR (status IN ('Enrolled', 'Randomized', 'Active', 'Completed') AND enrollment_number IS NOT NULL) OR status = 'Withdrawn'
kernel.form_version_snapshots
Entity: FormVersionSnapshot
| Column | Type | Null | Default | Key |
|---|---|---|---|---|
id | uuid | no | PK | |
created_at | timestamp with time zone | no | ||
created_by | character varying(255) | no | ||
ddf_ir | jsonb | no | ||
form_hash | character varying(71) | no | ||
form_id | character varying(128) | no | ||
odm_xml | text | yes | ||
open_rosa_xml | text | no | ||
protocol_version | character varying(64) | no | ||
protocol_version_id | uuid | no | ||
reason_for_change | character varying(1000) | no | ||
recorded_at | timestamp with time zone | no | ||
study_id | uuid | no | ||
tenant_id | uuid | no | ||
version_index | bigint | no |
Foreign keys:
FK_form_version_snapshots_protocol_versions_tenant_id_protocol~: (tenant_id,protocol_version_id) referenceskernel.protocol_versions(tenant_id,id), on delete restrictFK_form_version_snapshots_studies_tenant_id_study_id: (tenant_id,study_id) referenceskernel.studies(tenant_id,id), on delete restrictFK_form_version_snapshots_tenants_tenant_id: (tenant_id) referenceskernel.tenants(id), on delete restrict
Indexes:
IX_form_version_snapshots_tenant_id_protocol_version_id: (tenant_id,protocol_version_id)IX_form_version_snapshots_tenant_id_study_id_protocol_version_~: unique (tenant_id,study_id,protocol_version,form_id)
Check constraints:
ck_form_version_snapshots_form_hash:form_hash ~ '^sha256:[0-9a-f]{64}$'
kernel.grant_periods
Entity: GrantPeriod
| Column | Type | Null | Default | Key |
|---|---|---|---|---|
id | uuid | no | PK | |
grant_id | uuid | no | ||
recorded_period | tstzrange | no | ||
tenant_id | uuid | no | ||
valid_period | tstzrange | no |
Foreign keys:
FK_grant_periods_grants_tenant_id_grant_id: (tenant_id,grant_id) referenceskernel.grants(tenant_id,id), on delete restrict
Indexes:
IX_grant_periods_tenant_id_grant_id: (tenant_id,grant_id)
kernel.grants
Entity: Grant
| Column | Type | Null | Default | Key |
|---|---|---|---|---|
id | uuid | no | PK | |
capability | character varying(96) | yes | ||
created_at | timestamp with time zone | no | ||
created_by | character varying(255) | no | ||
grantee_id | character varying(256) | no | ||
grantee_kind | character varying(32) | no | ||
issued_by | character varying(300) | no | ||
parent_grant_id | uuid | yes | ||
reason_for_change | character varying(1000) | no | ||
role_id | uuid | yes | ||
scope_country | character varying(2) | yes | ||
scope_level | character varying(16) | no | ||
scope_target_id | uuid | yes | ||
tenant_id | uuid | no | ||
version_index | bigint | no | ||
with_grant_option | boolean | no |
Foreign keys:
FK_grants_grants_tenant_id_parent_grant_id: (tenant_id,parent_grant_id) referenceskernel.grants(tenant_id,id), on delete restrictFK_grants_roles_tenant_id_role_id: (tenant_id,role_id) referenceskernel.roles(tenant_id,id), on delete restrictFK_grants_tenants_tenant_id: (tenant_id) referenceskernel.tenants(id), on delete restrict
Indexes:
AK_grants_tenant_id_id: unique constraint (tenant_id,id)IX_grants_tenant_id_grantee_kind_grantee_id: (tenant_id,grantee_kind,grantee_id)IX_grants_tenant_id_parent_grant_id: (tenant_id,parent_grant_id)IX_grants_tenant_id_role_id: (tenant_id,role_id)
Check constraints:
ck_grants_scope:(scope_level = 'Tenant' AND scope_target_id IS NULL AND scope_country IS NULL) OR (scope_level IN ('Organization', 'Study', 'StudySite') AND scope_target_id IS NOT NULL AND scope_country IS NULL) OR (scope_level = 'StudyCountry' AND scope_target_id IS NOT NULL AND scope_country IS NOT NULL AND scope_country ~ '^[A-Z]{2}$')ck_grants_target:(capability IS NULL) <> (role_id IS NULL)
kernel.idempotency_records
Entity: IdempotencyRecord
| Column | Type | Null | Default | Key |
|---|---|---|---|---|
idempotency_key | character varying(200) | no | PK | |
tenant_id | uuid | no | PK | |
activity_id | uuid | no | ||
command_type | character varying(200) | no | ||
recorded_at | timestamp with time zone | no | ||
request_hash | character varying(64) | no | ||
result_json | text | no |
kernel.library_items
Entity: LibraryItem
| Column | Type | Null | Default | Key |
|---|---|---|---|---|
id | uuid | no | PK | |
approval_attestation_id | uuid | yes | ||
content | text | no | ||
content_hash | character varying(71) | no | ||
created_at | timestamp with time zone | no | ||
created_by | character varying(255) | no | ||
deprecation_attestation_id | uuid | yes | ||
item_version | integer | no | ||
key | character varying(128) | no | ||
kind | character varying(64) | no | ||
reason_for_change | character varying(1000) | no | ||
standard_version_ids | uuid[] | no | ||
status | character varying(32) | no | ||
tenant_id | uuid | no | ||
title | character varying(500) | no | ||
version_index | bigint | no |
Foreign keys:
FK_library_items_tenants_tenant_id: (tenant_id) referenceskernel.tenants(id), on delete restrict
Indexes:
AK_library_items_tenant_id_id: unique constraint (tenant_id,id)IX_library_items_tenant_id_kind_key_item_version: unique (tenant_id,kind,key,item_version)
kernel.lineage_edges
Entity: LineageEdgeRecord
| Column | Type | Null | Default | Key |
|---|---|---|---|---|
id | uuid | no | PK | |
activity_id | uuid | no | ||
from_id | uuid | no | ||
from_kind | character varying(48) | no | ||
from_version | bigint | no | ||
kind | character varying(32) | no | ||
recorded_at | timestamp with time zone | no | ||
tenant_id | uuid | no | ||
to_id | uuid | no | ||
to_kind | character varying(48) | no | ||
to_version | bigint | no | ||
valid_from | timestamp with time zone | yes |
Foreign keys:
FK_lineage_edges_tenants_tenant_id: (tenant_id) referenceskernel.tenants(id), on delete restrict
Indexes:
IX_lineage_edges_tenant_id_from_id_from_kind_from_version_to_i~: unique (tenant_id,from_id,from_kind,from_version,to_id,to_kind,to_version,kind)IX_lineage_edges_tenant_id_to_id_to_kind_to_version: (tenant_id,to_id,to_kind,to_version)
kernel.lineage_nodes
Entity: LineageNodeRecord
| Column | Type | Null | Default | Key |
|---|---|---|---|---|
kind | character varying(48) | no | PK | |
node_id | uuid | no | PK | |
tenant_id | uuid | no | PK | |
version | bigint | no | PK | |
activity_id | uuid | no | ||
derived | boolean | no | ||
recorded_at | timestamp with time zone | no |
Foreign keys:
FK_lineage_nodes_tenants_tenant_id: (tenant_id) referenceskernel.tenants(id), on delete restrict
Indexes:
IX_lineage_nodes_tenant_id_derived: (tenant_id,derived)
kernel.observation_revisions
Entity: ObservationRevision
| Column | Type | Null | Default | Key |
|---|---|---|---|---|
id | uuid | no | PK | |
number | integer | no | ||
observation_id | uuid | no | ||
reason_for_change | character varying(1000) | no | ||
recorded_at | timestamp with time zone | no | ||
recorded_by | character varying(255) | no | ||
tenant_id | uuid | no | ||
value | jsonb | no |
Foreign keys:
FK_observation_revisions_observations_tenant_id_observation_id: (tenant_id,observation_id) referenceskernel.observations(tenant_id,id), on delete restrict
Indexes:
IX_observation_revisions_tenant_id_observation_id_number: unique (tenant_id,observation_id,number)
Check constraints:
ck_observation_revisions_number:number > 0
kernel.observations
Entity: Observation
| Column | Type | Null | Default | Key |
|---|---|---|---|---|
id | uuid | no | PK | |
concept_id | uuid | no | ||
concept_version | integer | no | ||
created_at | timestamp with time zone | no | ||
created_by | character varying(255) | no | ||
enrollment_id | uuid | no | ||
observed_at | timestamp with time zone | no | ||
participant_id | uuid | no | ||
reason_for_change | character varying(1000) | no | ||
revision | integer | no | ||
study_id | uuid | no | ||
tenant_id | uuid | no | ||
value | jsonb | no | ||
version_index | bigint | no |
Foreign keys:
FK_observations_enrollments_tenant_id_enrollment_id: (tenant_id,enrollment_id) referenceskernel.enrollments(tenant_id,id), on delete restrictFK_observations_participants_tenant_id_participant_id: (tenant_id,participant_id) referenceskernel.participants(tenant_id,id), on delete restrictFK_observations_studies_tenant_id_study_id: (tenant_id,study_id) referenceskernel.studies(tenant_id,id), on delete restrictFK_observations_tenants_tenant_id: (tenant_id) referenceskernel.tenants(id), on delete restrict
Indexes:
AK_observations_tenant_id_id: unique constraint (tenant_id,id)IX_observations_tenant_id_enrollment_id: (tenant_id,enrollment_id)IX_observations_tenant_id_participant_id_concept_id: (tenant_id,participant_id,concept_id)IX_observations_tenant_id_study_id: (tenant_id,study_id)
Check constraints:
ck_observations_revision:revision > 0
kernel.organizations
Entity: Organization
| Column | Type | Null | Default | Key |
|---|---|---|---|---|
id | uuid | no | PK | |
code | character varying(64) | no | ||
created_at | timestamp with time zone | no | ||
created_by | character varying(255) | no | ||
is_active | boolean | no | ||
kind | character varying(32) | no | ||
name | character varying(255) | no | ||
reason_for_change | character varying(1000) | no | ||
tenant_id | uuid | no | ||
version_index | bigint | no |
Foreign keys:
FK_organizations_tenants_tenant_id: (tenant_id) referenceskernel.tenants(id), on delete restrict
Indexes:
AK_organizations_tenant_id_id: unique constraint (tenant_id,id)IX_organizations_tenant_id_code: unique (tenant_id,code)
kernel.outbox_messages
Entity: OutboxMessageRecord
| Column | Type | Null | Default | Key |
|---|---|---|---|---|
id | uuid | no | PK | |
attempts | integer | no | ||
dispatched_at | timestamp with time zone | yes | ||
enqueued_at | timestamp with time zone | no | ||
envelope | jsonb | no | ||
event_id | uuid | no | ||
last_error | character varying(2000) | yes | ||
next_attempt_at | timestamp with time zone | yes | ||
tenant_id | uuid | no | ||
type | character varying(200) | no |
Indexes:
IX_outbox_messages_enqueued_at: (enqueued_at) wheredispatched_at IS NULLIX_outbox_messages_event_id: unique (event_id)IX_outbox_messages_tenant_id_enqueued_at: (tenant_id,enqueued_at) wheredispatched_at IS NULL
kernel.participants
Entity: Participant
| Column | Type | Null | Default | Key |
|---|---|---|---|---|
id | uuid | no | PK | |
created_at | timestamp with time zone | no | ||
created_by | character varying(255) | no | ||
reason_for_change | character varying(1000) | no | ||
tenant_id | uuid | no | ||
version_index | bigint | no |
Foreign keys:
FK_participants_tenants_tenant_id: (tenant_id) referenceskernel.tenants(id), on delete restrict
Indexes:
AK_participants_tenant_id_id: unique constraint (tenant_id,id)
kernel.people
Entity: Person
| Column | Type | Null | Default | Key |
|---|---|---|---|---|
id | uuid | no | PK | |
created_at | timestamp with time zone | no | ||
created_by | character varying(255) | no | ||
is_active | boolean | no | ||
reason_for_change | character varying(1000) | no | ||
version_index | bigint | no |
kernel.product_entitlements
Entity: ProductEntitlement
| Column | Type | Null | Default | Key |
|---|---|---|---|---|
id | uuid | no | PK | |
created_at | timestamp with time zone | no | ||
created_by | character varying(255) | no | ||
family | character varying(32) | no | ||
granted_at | timestamp with time zone | no | ||
is_enabled | boolean | no | ||
reason_for_change | character varying(1000) | no | ||
subscription_id | uuid | no | ||
tenant_id | uuid | no | ||
version_index | bigint | no |
Foreign keys:
FK_product_entitlements_subscriptions_tenant_id_subscription_id: (tenant_id,subscription_id) referenceskernel.subscriptions(tenant_id,id), on delete restrictFK_product_entitlements_tenants_tenant_id: (tenant_id) referenceskernel.tenants(id), on delete restrict
Indexes:
AK_product_entitlements_tenant_id_id: unique constraint (tenant_id,id)IX_product_entitlements_tenant_id_family: unique (tenant_id,family)IX_product_entitlements_tenant_id_subscription_id: (tenant_id,subscription_id)
kernel.proposals
Entity: Proposal
| Column | Type | Null | Default | Key |
|---|---|---|---|---|
id | uuid | no | PK | |
affected | text[] | no | ||
approval_attestation_id | uuid | yes | ||
confidence_score | double precision | yes | ||
content_hash | character varying(71) | no | ||
created_at | timestamp with time zone | no | ||
created_by | character varying(255) | no | ||
decided_at | timestamp with time zone | yes | ||
decided_by_id | character varying(256) | yes | ||
decided_by_kind | character varying(32) | yes | ||
decision_reason | character varying(1000) | yes | ||
escalated_at | timestamp with time zone | yes | ||
escalated_by_id | character varying(256) | yes | ||
escalated_by_kind | character varying(32) | yes | ||
escalated_to | character varying(256) | yes | ||
escalation_policy | character varying(200) | yes | ||
escalation_reason | character varying(1000) | yes | ||
expires_at | timestamp with time zone | no | ||
intent | character varying(2000) | no | ||
is_escalated | boolean | no | ||
model_id | character varying(200) | yes | ||
plan_artifact_version_id | uuid | no | ||
proposed_at | timestamp with time zone | no | ||
proposed_by_id | character varying(256) | no | ||
proposed_by_kind | character varying(32) | no | ||
reason_for_change | character varying(1000) | no | ||
requested_by_id | character varying(256) | yes | ||
requested_capabilities | text[] | no | ||
simulated_impact | character varying(71) | yes | ||
status | character varying(16) | no | ||
study_id | uuid | no | ||
tenant_id | uuid | no | ||
version_index | bigint | no |
Foreign keys:
FK_proposals_artifact_versions_tenant_id_plan_artifact_version~: (tenant_id,plan_artifact_version_id) referenceskernel.artifact_versions(tenant_id,id), on delete restrictFK_proposals_attestations_tenant_id_approval_attestation_id: (tenant_id,approval_attestation_id) referenceskernel.attestations(tenant_id,id), on delete restrictFK_proposals_studies_tenant_id_study_id: (tenant_id,study_id) referenceskernel.studies(tenant_id,id), on delete restrictFK_proposals_tenants_tenant_id: (tenant_id) referenceskernel.tenants(id), on delete restrict
Indexes:
AK_proposals_tenant_id_id: unique constraint (tenant_id,id)IX_proposals_tenant_id_approval_attestation_id: (tenant_id,approval_attestation_id)IX_proposals_tenant_id_plan_artifact_version_id: (tenant_id,plan_artifact_version_id)IX_proposals_tenant_id_study_id_status: (tenant_id,study_id,status)
Check constraints:
ck_proposals_affected:cardinality(affected) <= 200ck_proposals_confidence_score:confidence_score IS NULL OR (confidence_score >= 0.0 AND confidence_score <= 1.0)ck_proposals_content_hash:content_hash ~ '^sha256:[0-9a-f]{64}$'ck_proposals_decision:(status = 'Open' AND decided_at IS NULL AND decided_by_id IS NULL AND decided_by_kind IS NULL AND approval_attestation_id IS NULL AND decision_reason IS NULL) OR (status = 'Approved' AND decided_at IS NOT NULL AND decided_by_id IS NOT NULL AND decided_by_kind = 'Person' AND approval_attestation_id IS NOT NULL) OR (status IN ('Rejected', 'Withdrawn') AND decided_at IS NOT NULL AND decided_by_id IS NOT NULL AND decided_by_kind IS NOT NULL AND approval_attestation_id IS NULL AND decision_reason IS NOT NULL)ck_proposals_expiry:expires_at > proposed_at AND expires_at <= proposed_at + interval '90 days'ck_proposals_intent:char_length(intent) BETWEEN 1 AND 2000ck_proposals_model:(proposed_by_kind = 'AutomationAgent' AND model_id IS NOT NULL AND char_length(model_id) > 0) OR (proposed_by_kind <> 'AutomationAgent' AND model_id IS NULL)ck_proposals_requested_by:(proposed_by_kind = 'AutomationAgent' AND requested_by_id IS NOT NULL AND char_length(requested_by_id) > 0) OR (proposed_by_kind <> 'AutomationAgent' AND requested_by_id IS NULL)ck_proposals_requested_capabilities:cardinality(requested_capabilities) BETWEEN 1 AND 20ck_proposals_simulated_impact:simulated_impact IS NULL OR simulated_impact ~ '^sha256:[0-9a-f]{64}$'
kernel.protocol_versions
Entity: ProtocolVersion
| Column | Type | Null | Default | Key |
|---|---|---|---|---|
id | uuid | no | PK | |
amendment | jsonb | yes | ||
approval_attestation_id | uuid | yes | ||
content | text | no | ||
content_hash | character varying(71) | yes | ||
created_at | timestamp with time zone | no | ||
created_by | character varying(255) | no | ||
number | integer | no | ||
parent_version_id | uuid | yes | ||
reason_for_change | character varying(1000) | no | ||
status | character varying(16) | no | ||
study_id | uuid | no | ||
tenant_id | uuid | no | ||
version_index | bigint | no | ||
withdrawal_attestation_id | uuid | yes | ||
withdrawal_reason | character varying(1000) | yes |
Foreign keys:
FK_protocol_versions_attestations_tenant_id_approval_attestati~: (tenant_id,approval_attestation_id) referenceskernel.attestations(tenant_id,id), on delete restrictFK_protocol_versions_attestations_tenant_id_withdrawal_attesta~: (tenant_id,withdrawal_attestation_id) referenceskernel.attestations(tenant_id,id), on delete restrictFK_protocol_versions_protocol_versions_tenant_id_parent_versio~: (tenant_id,parent_version_id) referenceskernel.protocol_versions(tenant_id,id), on delete restrictFK_protocol_versions_studies_tenant_id_study_id: (tenant_id,study_id) referenceskernel.studies(tenant_id,id), on delete restrictFK_protocol_versions_tenants_tenant_id: (tenant_id) referenceskernel.tenants(id), on delete restrict
Indexes:
AK_protocol_versions_tenant_id_id: unique constraint (tenant_id,id)IX_protocol_versions_tenant_id_approval_attestation_id: (tenant_id,approval_attestation_id)IX_protocol_versions_tenant_id_parent_version_id: (tenant_id,parent_version_id)IX_protocol_versions_tenant_id_study_id_number: unique (tenant_id,study_id,number)IX_protocol_versions_tenant_id_withdrawal_attestation_id: (tenant_id,withdrawal_attestation_id)
Check constraints:
ck_protocol_versions_content_hash:content_hash IS NULL OR content_hash ~ '^sha256:[0-9a-f]{64}$'ck_protocol_versions_number:number > 0
kernel.provenance_activities
Entity: ProvenanceActivityRecord
| Column | Type | Null | Default | Key |
|---|---|---|---|---|
id | uuid | no | PK | |
actor_id | character varying(256) | no | ||
actor_kind | character varying(32) | no | ||
aggregate_id | character varying(200) | yes | ||
aggregate_type | character varying(200) | yes | ||
authorization | jsonb | yes | ||
causation_id | uuid | yes | ||
command_type | character varying(200) | no | ||
correlation_id | uuid | no | ||
idempotency_key | character varying(200) | no | ||
outcome | character varying(32) | no | ||
proposal_id | uuid | yes | ||
reason_for_change | character varying(2000) | no | ||
recorded_at | timestamp with time zone | no | ||
requested_by | character varying(256) | yes | ||
tenant_id | uuid | no |
Indexes:
IX_provenance_activities_correlation_id: (correlation_id)IX_provenance_activities_tenant_id_proposal_id: (tenant_id,proposal_id) whereproposal_id IS NOT NULLIX_provenance_activities_tenant_id_recorded_at: (tenant_id,recorded_at)
kernel.qualification_periods
Entity: QualificationPeriod
| Column | Type | Null | Default | Key |
|---|---|---|---|---|
id | uuid | no | PK | |
qualification_id | uuid | no | ||
recorded_period | tstzrange | no | ||
tenant_id | uuid | no | ||
valid_period | tstzrange | no |
Foreign keys:
FK_qualification_periods_qualifications_tenant_id_qualificatio~: (tenant_id,qualification_id) referenceskernel.qualifications(tenant_id,id), on delete restrict
Indexes:
IX_qualification_periods_tenant_id_qualification_id: (tenant_id,qualification_id)
kernel.qualification_requirement_periods
Entity: QualificationRequirementPeriod
| Column | Type | Null | Default | Key |
|---|---|---|---|---|
id | uuid | no | PK | |
recorded_period | tstzrange | no | ||
requirement_id | uuid | no | ||
tenant_id | uuid | no | ||
valid_period | tstzrange | no |
Foreign keys:
FK_qualification_requirement_periods_qualification_requirement~: (tenant_id,requirement_id) referenceskernel.qualification_requirements(tenant_id,id), on delete restrict
Indexes:
IX_qualification_requirement_periods_tenant_id_requirement_id: (tenant_id,requirement_id)
kernel.qualification_requirements
Entity: QualificationRequirement
| Column | Type | Null | Default | Key |
|---|---|---|---|---|
id | uuid | no | PK | |
capability | character varying(96) | no | ||
created_at | timestamp with time zone | no | ||
created_by | character varying(255) | no | ||
defined_by | character varying(300) | no | ||
protocol_version_id | uuid | yes | ||
qualification_code | character varying(64) | no | ||
reason_for_change | character varying(1000) | no | ||
scope_country | character varying(2) | yes | ||
scope_level | character varying(16) | no | ||
scope_target_id | uuid | yes | ||
tenant_id | uuid | no | ||
version_index | bigint | no |
Foreign keys:
FK_qualification_requirements_protocol_versions_tenant_id_prot~: (tenant_id,protocol_version_id) referenceskernel.protocol_versions(tenant_id,id), on delete restrictFK_qualification_requirements_tenants_tenant_id: (tenant_id) referenceskernel.tenants(id), on delete restrict
Indexes:
AK_qualification_requirements_tenant_id_id: unique constraint (tenant_id,id)IX_qualification_requirements_tenant_id_capability: (tenant_id,capability)IX_qualification_requirements_tenant_id_protocol_version_id: (tenant_id,protocol_version_id)
Check constraints:
ck_qualification_requirements_code:qualification_code ~ '^[a-z][a-z0-9]*(_[a-z0-9]+)*$'ck_qualification_requirements_scope:(scope_level = 'Tenant' AND scope_target_id IS NULL AND scope_country IS NULL) OR (scope_level IN ('Organization', 'Study', 'StudySite') AND scope_target_id IS NOT NULL AND scope_country IS NULL) OR (scope_level = 'StudyCountry' AND scope_target_id IS NOT NULL AND scope_country IS NOT NULL AND scope_country ~ '^[A-Z]{2}$')
kernel.qualifications
Entity: Qualification
| Column | Type | Null | Default | Key |
|---|---|---|---|---|
id | uuid | no | PK | |
code | character varying(64) | no | ||
created_at | timestamp with time zone | no | ||
created_by | character varying(255) | no | ||
evidence_artifact_version_id | uuid | no | ||
holder_id | character varying(256) | no | ||
holder_kind | character varying(32) | no | ||
kind | character varying(32) | no | ||
protocol_version_id | uuid | yes | ||
reason_for_change | character varying(1000) | no | ||
recorded_by | character varying(300) | no | ||
tenant_id | uuid | no | ||
version_index | bigint | no |
Foreign keys:
FK_qualifications_artifact_versions_tenant_id_evidence_artifac~: (tenant_id,evidence_artifact_version_id) referenceskernel.artifact_versions(tenant_id,id), on delete restrictFK_qualifications_protocol_versions_tenant_id_protocol_version~: (tenant_id,protocol_version_id) referenceskernel.protocol_versions(tenant_id,id), on delete restrictFK_qualifications_tenants_tenant_id: (tenant_id) referenceskernel.tenants(id), on delete restrict
Indexes:
AK_qualifications_tenant_id_id: unique constraint (tenant_id,id)IX_qualifications_tenant_id_evidence_artifact_version_id: (tenant_id,evidence_artifact_version_id)IX_qualifications_tenant_id_holder_kind_holder_id: (tenant_id,holder_kind,holder_id)IX_qualifications_tenant_id_protocol_version_id: (tenant_id,protocol_version_id)
Check constraints:
ck_qualifications_code:code ~ '^[a-z][a-z0-9]*(_[a-z0-9]+)*$'ck_qualifications_protocol_version:(kind = 'ProtocolTraining') = (protocol_version_id IS NOT NULL)
kernel.roles
Entity: Role
| Column | Type | Null | Default | Key |
|---|---|---|---|---|
id | uuid | no | PK | |
capabilities | text[] | no | ||
code | character varying(32) | no | ||
created_at | timestamp with time zone | no | ||
created_by | character varying(255) | no | ||
name | character varying(200) | no | ||
reason_for_change | character varying(1000) | no | ||
tenant_id | uuid | no | ||
version_index | bigint | no |
Foreign keys:
FK_roles_tenants_tenant_id: (tenant_id) referenceskernel.tenants(id), on delete restrict
Indexes:
AK_roles_tenant_id_id: unique constraint (tenant_id,id)IX_roles_tenant_id_code: unique (tenant_id,code)
Check constraints:
ck_roles_capabilities:cardinality(capabilities) > 0
kernel.sites
Entity: Site
| Column | Type | Null | Default | Key |
|---|---|---|---|---|
id | uuid | no | PK | |
country | character varying(2) | no | ||
created_at | timestamp with time zone | no | ||
created_by | character varying(255) | no | ||
institution_id | uuid | no | ||
is_active | boolean | no | ||
name | character varying(255) | no | ||
reason_for_change | character varying(1000) | no | ||
site_code | character varying(64) | no | ||
tenant_id | uuid | no | ||
version_index | bigint | no |
Foreign keys:
FK_sites_organizations_tenant_id_institution_id: (tenant_id,institution_id) referenceskernel.organizations(tenant_id,id), on delete restrictFK_sites_tenants_tenant_id: (tenant_id) referenceskernel.tenants(id), on delete restrict
Indexes:
AK_sites_tenant_id_id: unique constraint (tenant_id,id)IX_sites_institution_id_site_code: unique (institution_id,site_code)IX_sites_tenant_id_institution_id: (tenant_id,institution_id)
kernel.standard_datasets
Entity: StandardDataset
| Column | Type | Null | Default | Key |
|---|---|---|---|---|
name | character varying(64) | no | PK | |
standard_version_id | uuid | no | PK | |
tenant_id | uuid | no | PK | |
class | character varying(255) | yes | ||
label | character varying(500) | no | ||
ordinal | integer | no | ||
structure | character varying(1000) | yes |
Foreign keys:
FK_standard_datasets_standard_versions_tenant_id_standard_vers~: (tenant_id,standard_version_id) referenceskernel.standard_versions(tenant_id,id), on delete restrict
kernel.standard_terminology
Entity: StandardTerminologyBinding
| Column | Type | Null | Default | Key |
|---|---|---|---|---|
code_system | character varying(64) | no | PK | |
standard_version_id | uuid | no | PK | |
tenant_id | uuid | no | PK | |
version | character varying(64) | no | PK | |
code_system_version_id | uuid | yes |
Foreign keys:
FK_standard_terminology_code_system_versions_tenant_id_code_sy~: (tenant_id,code_system_version_id) referenceskernel.code_system_versions(tenant_id,id), on delete restrictFK_standard_terminology_standard_versions_tenant_id_standard_v~: (tenant_id,standard_version_id) referenceskernel.standard_versions(tenant_id,id), on delete restrict
Indexes:
IX_standard_terminology_tenant_id_code_system_version_id: (tenant_id,code_system_version_id)
kernel.standard_value_level_definitions
Entity: StandardValueLevelDefinition
| Column | Type | Null | Default | Key |
|---|---|---|---|---|
ordinal | integer | no | PK | |
standard_version_id | uuid | no | PK | |
tenant_id | uuid | no | PK | |
codelists | text[] | no | ||
data_type | character varying(16) | no | ||
dataset | character varying(64) | no | ||
description | text | yes | ||
length | integer | yes | ||
value_list | text[] | no | ||
variable | character varying(64) | no | ||
where | jsonb | no |
Foreign keys:
FK_standard_value_level_definitions_standard_variables_tenant_~: (tenant_id,standard_version_id,dataset,variable) referenceskernel.standard_variables(tenant_id,standard_version_id,dataset_name,name), on delete restrictFK_standard_value_level_definitions_standard_versions_tenant_i~: (tenant_id,standard_version_id) referenceskernel.standard_versions(tenant_id,id), on delete restrict
Indexes:
IX_standard_value_level_definitions_tenant_id_standard_version~: (tenant_id,standard_version_id,dataset,variable)
kernel.standard_variables
Entity: StandardVariable
| Column | Type | Null | Default | Key |
|---|---|---|---|---|
dataset_name | character varying(64) | no | PK | |
name | character varying(64) | no | PK | |
standard_version_id | uuid | no | PK | |
tenant_id | uuid | no | PK | |
codelists | text[] | no | ||
core | character varying(16) | no | ||
data_type | character varying(16) | no | ||
described_value_domain | character varying(255) | yes | ||
description | text | yes | ||
label | character varying(500) | no | ||
ordinal | integer | no | ||
role | character varying(255) | yes | ||
value_list | text[] | no |
Foreign keys:
FK_standard_variables_standard_datasets_tenant_id_standard_ver~: (tenant_id,standard_version_id,dataset_name) referenceskernel.standard_datasets(tenant_id,standard_version_id,name), on delete restrict
kernel.standard_versions
Entity: StandardVersion
| Column | Type | Null | Default | Key |
|---|---|---|---|---|
id | uuid | no | PK | |
approval_attestation_id | uuid | yes | ||
content_hash | character varying(71) | no | ||
created_at | timestamp with time zone | no | ||
created_by | character varying(255) | no | ||
deprecation_attestation_id | uuid | yes | ||
effective_date | date | yes | ||
name | character varying(500) | no | ||
publisher | character varying(255) | no | ||
reason_for_change | character varying(1000) | no | ||
source | character varying(1000) | yes | ||
standard_code | character varying(64) | no | ||
status | character varying(32) | no | ||
tenant_id | uuid | no | ||
version | character varying(64) | no | ||
version_index | bigint | no |
Foreign keys:
FK_standard_versions_tenants_tenant_id: (tenant_id) referenceskernel.tenants(id), on delete restrict
Indexes:
AK_standard_versions_tenant_id_id: unique constraint (tenant_id,id)IX_standard_versions_tenant_id_standard_code_version: unique (tenant_id,standard_code,version)
kernel.studies
Entity: Study
| Column | Type | Null | Default | Key |
|---|---|---|---|---|
id | uuid | no | PK | |
created_at | timestamp with time zone | no | ||
created_by | character varying(255) | no | ||
is_active | boolean | no | ||
phase | character varying(32) | no | ||
reason_for_change | character varying(1000) | no | ||
sponsor_id | uuid | no | ||
study_code | character varying(64) | no | ||
tenant_id | uuid | no | ||
title | character varying(1000) | no | ||
version_index | bigint | no |
Foreign keys:
FK_studies_organizations_tenant_id_sponsor_id: (tenant_id,sponsor_id) referenceskernel.organizations(tenant_id,id), on delete restrictFK_studies_tenants_tenant_id: (tenant_id) referenceskernel.tenants(id), on delete restrict
Indexes:
AK_studies_tenant_id_id: unique constraint (tenant_id,id)IX_studies_tenant_id_sponsor_id: (tenant_id,sponsor_id)IX_studies_tenant_id_study_code: unique (tenant_id,study_code)
kernel.study_sites
Entity: StudySite
| Column | Type | Null | Default | Key |
|---|---|---|---|---|
id | uuid | no | PK | |
created_at | timestamp with time zone | no | ||
created_by | character varying(255) | no | ||
is_active | boolean | no | ||
reason_for_change | character varying(1000) | no | ||
site_id | uuid | no | ||
status | character varying(32) | no | ||
study_id | uuid | no | ||
tenant_id | uuid | no | ||
version_index | bigint | no |
Foreign keys:
FK_study_sites_sites_tenant_id_site_id: (tenant_id,site_id) referenceskernel.sites(tenant_id,id), on delete restrictFK_study_sites_studies_tenant_id_study_id: (tenant_id,study_id) referenceskernel.studies(tenant_id,id), on delete restrictFK_study_sites_tenants_tenant_id: (tenant_id) referenceskernel.tenants(id), on delete restrict
Indexes:
AK_study_sites_tenant_id_id: unique constraint (tenant_id,id)AK_study_sites_tenant_id_id_study_id: unique constraint (tenant_id,id,study_id)IX_study_sites_study_id_site_id: unique (study_id,site_id)IX_study_sites_tenant_id_site_id: (tenant_id,site_id)IX_study_sites_tenant_id_study_id: (tenant_id,study_id)
kernel.study_standards_profiles
Entity: StudyStandardsProfile
| Column | Type | Null | Default | Key |
|---|---|---|---|---|
id | uuid | no | PK | |
controlled_terminology | text[] | no | ||
controlled_terminology_versions | uuid[] | no | ||
created_at | timestamp with time zone | no | ||
created_by | character varying(255) | no | ||
library_pins | uuid[] | no | ||
reason_for_change | character varying(1000) | no | ||
standard_version_ids | uuid[] | no | ||
study_id | uuid | no | ||
tenant_id | uuid | no | ||
version_index | bigint | no |
Foreign keys:
FK_study_standards_profiles_studies_tenant_id_study_id: (tenant_id,study_id) referenceskernel.studies(tenant_id,id), on delete restrictFK_study_standards_profiles_tenants_tenant_id: (tenant_id) referenceskernel.tenants(id), on delete restrict
Indexes:
AK_study_standards_profiles_tenant_id_id: unique constraint (tenant_id,id)IX_study_standards_profiles_tenant_id_study_id: unique (tenant_id,study_id)
kernel.subscriptions
Entity: Subscription
| Column | Type | Null | Default | Key |
|---|---|---|---|---|
id | uuid | no | PK | |
activated_at | timestamp with time zone | yes | ||
active_study_count | integer | yes | ||
billing_confirmation | character varying(128) | yes | ||
countries_csv | character varying(1024) | yes | ||
created_at | timestamp with time zone | no | ||
created_by | character varying(255) | no | ||
expired_at | timestamp with time zone | yes | ||
participant_count | integer | yes | ||
reason_for_change | character varying(1000) | no | ||
site_count | integer | yes | ||
started_at | timestamp with time zone | no | ||
status | character varying(32) | no | ||
study_duration_months | integer | yes | ||
study_phase | character varying(64) | yes | ||
tenant_id | uuid | no | ||
tier | character varying(32) | no | ||
trial_ends_at | timestamp with time zone | yes | ||
version_index | bigint | no |
Foreign keys:
FK_subscriptions_tenants_tenant_id: (tenant_id) referenceskernel.tenants(id), on delete restrict
Indexes:
AK_subscriptions_tenant_id_id: unique constraint (tenant_id,id)IX_subscriptions_tenant_id: unique (tenant_id)
kernel.tenant_memberships
Entity: TenantMembership
| Column | Type | Null | Default | Key |
|---|---|---|---|---|
id | uuid | no | PK | |
created_at | timestamp with time zone | no | ||
created_by | character varying(255) | no | ||
is_active | boolean | no | ||
person_id | uuid | no | ||
reason_for_change | character varying(1000) | no | ||
tenant_id | uuid | no | ||
version_index | bigint | no |
Foreign keys:
FK_tenant_memberships_people_person_id: (person_id) referenceskernel.people(id), on delete restrictFK_tenant_memberships_tenants_tenant_id: (tenant_id) referenceskernel.tenants(id), on delete restrict
Indexes:
AK_tenant_memberships_tenant_id_id: unique constraint (tenant_id,id)IX_tenant_memberships_person_id: (person_id)IX_tenant_memberships_tenant_id_person_id: unique (tenant_id,person_id)
kernel.tenants
Entity: Tenant
| Column | Type | Null | Default | Key |
|---|---|---|---|---|
id | uuid | no | PK | |
code | character varying(64) | no | ||
created_at | timestamp with time zone | no | ||
created_by | character varying(255) | no | ||
is_active | boolean | no | ||
name | character varying(255) | no | ||
reason_for_change | character varying(1000) | no | ||
residency | character varying(8) | yes | ||
version_index | bigint | no |
Indexes:
IX_tenants_code: unique (code)
Check constraints:
ck_tenants_residency:residency IS NULL OR residency ~ '^[A-Z]{2,8}$'
kernel.validation_detections
Entity: ValidationDetectionRecord
| Column | Type | Null | Default | Key |
|---|---|---|---|---|
finding_id | uuid | no | PK | |
run_id | uuid | no | PK | |
tenant_id | uuid | no | PK | |
dataset | character varying(64) | no | ||
expected | character varying(2000) | yes | ||
message | character varying(2000) | no | ||
observed | jsonb | no | ||
pack_item_id | uuid | no | ||
pack_key | character varying(128) | no | ||
rule_id | character varying(64) | no | ||
rule_version | integer | no | ||
severity | character varying(16) | no | ||
stage | character varying(32) | no | ||
study_id | uuid | no | ||
target_key | character varying(200) | no | ||
target_kind | character varying(32) | no | ||
variable | character varying(64) | yes |
Foreign keys:
FK_validation_detections_validation_run_datasets_tenant_id_run~: (tenant_id,run_id,dataset) referenceskernel.validation_run_datasets(tenant_id,run_id,dataset), on delete restrictFK_validation_detections_validation_run_packs_tenant_id_run_id~: (tenant_id,run_id,pack_key) referenceskernel.validation_run_packs(tenant_id,run_id,pack_key), on delete restrictFK_validation_detections_validation_runs_tenant_id_run_id: (tenant_id,run_id) referenceskernel.validation_runs(tenant_id,id), on delete restrict
Indexes:
IX_validation_detections_tenant_id_finding_id: (tenant_id,finding_id)IX_validation_detections_tenant_id_run_id_dataset: (tenant_id,run_id,dataset)IX_validation_detections_tenant_id_run_id_pack_key: (tenant_id,run_id,pack_key)IX_validation_detections_tenant_id_study_id_stage: (tenant_id,study_id,stage)
kernel.validation_findings
Entity: ValidationFinding
| Column | Type | Null | Default | Key |
|---|---|---|---|---|
id | uuid | no | PK | |
attestation_id | uuid | yes | ||
classification | character varying(32) | yes | ||
created_at | timestamp with time zone | no | ||
created_by | character varying(255) | no | ||
decided_at | timestamp with time zone | yes | ||
decided_by | character varying(255) | yes | ||
decided_on_run | uuid | yes | ||
decision | character varying(32) | yes | ||
decision_text | character varying(4000) | yes | ||
reason_for_change | character varying(1000) | no | ||
study_id | uuid | no | ||
tenant_id | uuid | no | ||
version_index | bigint | no |
Foreign keys:
FK_validation_findings_attestations_tenant_id_attestation_id: (tenant_id,attestation_id) referenceskernel.attestations(tenant_id,id), on delete restrictFK_validation_findings_studies_tenant_id_study_id: (tenant_id,study_id) referenceskernel.studies(tenant_id,id), on delete restrictFK_validation_findings_tenants_tenant_id: (tenant_id) referenceskernel.tenants(id), on delete restrictFK_validation_findings_validation_runs_tenant_id_decided_on_run: (tenant_id,decided_on_run) referenceskernel.validation_runs(tenant_id,id), on delete restrict
Indexes:
AK_validation_findings_tenant_id_id: unique constraint (tenant_id,id)IX_validation_findings_tenant_id_attestation_id: (tenant_id,attestation_id)IX_validation_findings_tenant_id_decided_on_run: (tenant_id,decided_on_run)IX_validation_findings_tenant_id_study_id: (tenant_id,study_id)
kernel.validation_run_datasets
Entity: ValidationRunDataset
| Column | Type | Null | Default | Key |
|---|---|---|---|---|
dataset | character varying(64) | no | PK | |
run_id | uuid | no | PK | |
tenant_id | uuid | no | PK |
Foreign keys:
FK_validation_run_datasets_validation_runs_tenant_id_run_id: (tenant_id,run_id) referenceskernel.validation_runs(tenant_id,id), on delete restrict
kernel.validation_run_inputs
Entity: ValidationRunInput
| Column | Type | Null | Default | Key |
|---|---|---|---|---|
input | character varying(128) | no | PK | |
run_id | uuid | no | PK | |
tenant_id | uuid | no | PK |
Foreign keys:
FK_validation_run_inputs_validation_runs_tenant_id_run_id: (tenant_id,run_id) referenceskernel.validation_runs(tenant_id,id), on delete restrict
kernel.validation_run_packs
Entity: ValidationRunPack
| Column | Type | Null | Default | Key |
|---|---|---|---|---|
pack_key | character varying(128) | no | PK | |
run_id | uuid | no | PK | |
tenant_id | uuid | no | PK | |
content_hash | character varying(71) | no | ||
library_item_id | uuid | no | ||
pack_version | integer | no |
Foreign keys:
FK_validation_run_packs_library_items_tenant_id_library_item_id: (tenant_id,library_item_id) referenceskernel.library_items(tenant_id,id), on delete restrictFK_validation_run_packs_validation_runs_tenant_id_run_id: (tenant_id,run_id) referenceskernel.validation_runs(tenant_id,id), on delete restrict
Indexes:
IX_validation_run_packs_tenant_id_library_item_id: (tenant_id,library_item_id)
kernel.validation_runs
Entity: ValidationRun
| Column | Type | Null | Default | Key |
|---|---|---|---|---|
id | uuid | no | PK | |
agency | character varying(64) | yes | ||
as_of | date | no | ||
completed_at | timestamp with time zone | no | ||
created_at | timestamp with time zone | no | ||
created_by | character varying(255) | no | ||
detection_count | integer | no | ||
reason_for_change | character varying(1000) | no | ||
stage | character varying(32) | no | ||
standard | character varying(64) | yes | ||
standard_version | character varying(64) | yes | ||
started_at | timestamp with time zone | no | ||
study_id | uuid | no | ||
tenant_id | uuid | no | ||
version_index | bigint | no |
Foreign keys:
FK_validation_runs_studies_tenant_id_study_id: (tenant_id,study_id) referenceskernel.studies(tenant_id,id), on delete restrictFK_validation_runs_tenants_tenant_id: (tenant_id) referenceskernel.tenants(id), on delete restrict
Indexes:
AK_validation_runs_tenant_id_id: unique constraint (tenant_id,id)IX_validation_runs_tenant_id_study_id_stage_created_at: (tenant_id,study_id,stage,created_at)
kernel.work_queue_definitions
Entity: WorkQueueDefinition
| Column | Type | Null | Default | Key |
|---|---|---|---|---|
id | uuid | no | PK | |
capability | character varying(100) | no | ||
code | character varying(64) | no | ||
created_at | timestamp with time zone | no | ||
created_by | character varying(255) | no | ||
reason_for_change | character varying(1000) | no | ||
source | character varying(100) | no | ||
tenant_id | uuid | no | ||
title | character varying(200) | no | ||
verb_class | character varying(16) | no | ||
version | integer | no | ||
version_index | bigint | no |
Foreign keys:
FK_work_queue_definitions_tenants_tenant_id: (tenant_id) referenceskernel.tenants(id), on delete restrict
Indexes:
AK_work_queue_definitions_tenant_id_id: unique constraint (tenant_id,id)IX_work_queue_definitions_tenant_id_code_version: unique (tenant_id,code,version)
Check constraints:
ck_work_queue_definitions_version:version > 0