Skip to main content

User allergies fact table (Redshift)

Bi_FactUserAllergies

Fact table recording allergy entries logged against guests, including allergen details, severity, status, and the context in which they were captured.

Field

Field type

Description

Primary Key

Mapped Dimension table

Mapped Dimension field

FactUserAllergiesWId

BIGINT IDENTITY

Surrogate warehouse key for the user allergy fact record

PK

FactSegmentId

DECIMAL(19,0)

Business/natural key for the fact segment

UserAllergyPK

BIGINT

Source system primary key of the user allergy record

allergymasterwid

BIGINT

Foreign key to the allergy master dimension

Bi_DimEMRAllergyMaster

EMRAllergyMasterWId

AllergyId

VARCHAR(36)

Unique identifier (GUID) of the allergy record

AllergenName

NVARCHAR(255)

Name of the allergen

AllergenCategory

SMALLINT

Category code classifying the allergen type; see EMR domain definition

SeverityLevel

SMALLINT

Severity level code of the allergy reaction; see EMR domain definition

Notes

NVARCHAR(512)

Clinical notes associated with the allergy record

SourceFK

INT

Source code indicating the origin context of the allergy record; see EMR domain definition

Status

SMALLINT

Status code of the allergy record; see EMR domain definition

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

RelatedType

INT

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

RelatedId

VARCHAR(36)

Unique identifier (GUID) of the related entity (e.g., appointment, form)

FormId

VARCHAR(36)

Unique identifier (GUID) of the form through which the allergy was recorded

RelatedTime

TIMESTAMP

Timestamp of the related entity event

CriticalType

SMALLINT

Criticality classification code of the allergy; 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