Skip to main content

User medications fact table (s3)

Bi_FactUserMedications_s3

Fact table recording medications logged against guests, including medication names, start and expiry dates, status, and clinical context.

Field

Field type

Description

Primary Key

Mapped Dimension table

Mapped Dimension field

FactSegmentId

DECIMAL(19,0)

Business/natural key for the fact segment

UserMedicationPK

BIGINT

Source system primary key of the user medication record

PK

MedicationId

VARCHAR(36)

GUID of the medication record

Bi_DimEMRMedicationMaster

MedicationName

NVARCHAR(255)

Name of the medication

StartDate

TIMESTAMP

Date when the medication was started

ExpiryDate

TIMESTAMP

Date when the medication expires or is expected to end

Notes

NVARCHAR(512)

Clinical notes associated with the medication record

UserId

VARCHAR(36)

GUID of the user/guest

Bi_DimUser

OrganizationId

VARCHAR(36)

GUID of the organization

Bi_DimCenter

Status

SMALLINT

Status code of the medication record; see EMR domain definition

RelatedType

INT

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

RelatedId

VARCHAR(36)

GUID of the related entity

FormId

VARCHAR(36)

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

CreatedBy

VARCHAR(36)

GUID of the user who created the record

CreatedDate

TIMESTAMP

Timestamp when the record was created

UpdatedBy

VARCHAR(36)

GUID of the user who last updated the record

UpdatedDate

TIMESTAMP

Timestamp when the record was last updated

CenterId

VARCHAR(36)

GUID of the center

Bi_DimCenter

EtlCreatedBy

DECIMAL(19,0)

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 is voided (soft-deleted)

PodName

VARCHAR(20)

Name of the source pod from which the data originated

groupid

BIGINT

Identifier for the data group used in ETL partitioning