Skip to main content

User social history fact table (Redshift)

Bi_FactUserSocialHistory

Fact table recording guests' social-history entries captured via custom EMR fields, including field values and clinical context.

Field

Field type

Description

Primary Key

Mapped Dimension table

Mapped Dimension field

FactUserSocialHistoryWId

BIGINT IDENTITY

Surrogate warehouse key for the user social history fact record

PK

FactSegmentId

DECIMAL(19,0)

Business/natural key for the fact segment

UserSocialHistoryPK

BIGINT

Source system primary key of the user social history record

UserWid

BIGINT

Foreign key to the user dimension

Bi_DimUser

userwid

UserId

VARCHAR(36)

Unique identifier (GUID) of the user/guest

OrganizationId

VARCHAR(36)

Unique identifier (GUID) of the organization

entityfieldwid

BIGINT

Foreign key to the EMR entity field dimension

Bi_DimEMREntityField

EMREntityFieldWId

EntityFieldId

INT

Source system integer identifier of the entity field

FieldValue

NVARCHAR(512)

Value entered for the entity field

FieldValueId

NVARCHAR(255)

Identifier of the selected option value for the field

RelatedType

INT

Code indicating the type of entity this social history is related to; see EMR domain definition

RelatedId

VARCHAR(36)

Unique identifier (GUID) of the related entity

FormId

VARCHAR(36)

Unique identifier (GUID) of the form through which the record was captured

RelatedTime

TIMESTAMP

Timestamp of the related entity event

CriticalType

SMALLINT

Criticality classification code; see EMR domain definition

CreatedByWid

BIGINT

Foreign key to the user dimension for the record creator

Bi_DimUser

userwid

CreatedBy

VARCHAR(36)

Identifier (GUID) of the user who created the record

CreatedDate

TIMESTAMP

Timestamp when the record was created

UpdatedByWid

BIGINT

Foreign key to the user dimension for the last updater

Bi_DimUser

userwid

UpdatedBy

VARCHAR(36)

Identifier (GUID) of the user who last updated the record

UpdatedDate

TIMESTAMP

Timestamp when the record was last updated

centerwid

BIGINT

Foreign key to the center dimension

Bi_DimCenter

centerwid

CenterId

VARCHAR(36)

Unique identifier (GUID) of the center

EtlCreatedBy

BIGINT

ID of the ETL process/user that created this record

EtlCreatedDate

TIMESTAMP

Timestamp when the ETL process created this record

Void

BOOLEAN

Indicates whether the record has been voided/soft-deleted

PodName

NVARCHAR(100)

Name of the source pod from which the data originated

groupid

BIGINT

Group identifier for multi-tenant partitioning