Summary Table
Categories |
Total Count |
PII |
0 |
URL |
0 |
DNS |
0 |
EKL |
0 |
IP |
0 |
PORT |
0 |
VsID |
0 |
CF |
0 |
AI |
0 |
VPD |
0 |
PL |
0 |
Other |
0 |
File Content
?CREATE TABLE [zraw].[_conConsultFactor]
(
--source: A01/SQL52, SPV.Con.ConsultFactor
--fields
[ConsultFactorSID] BIGINT NOT NULL,
[Sta3n] SMALLINT NOT NULL, --doclean Index
[ConsultIEN] VARCHAR (50) NOT NULL, --index
[ConsultSID] BIGINT NOT NULL,
[ConsultActivityIEN] VARCHAR (50) NOT NULL, --index
[ConsultActivitySID] BIGINT NOT NULL,
[SConsultActivityCommentSID] BIGINT NOT NULL,
-- [ConsultFactorTypeID] INT NULL,
[ConsultFactorTypeSID] INT NULL,
[PatientSID] INT NULL,
[EnteredByStaffSID] INT NULL,
[ActivityDateTime] DATETIME2 (7) NULL,
[ConsultFactorType] VARCHAR (50) NULL,
[FactorData] VARCHAR (4000) NULL,
[DateFactorText] VARCHAR (100) NULL,
[DateFactorDateTime] DATETIME2 (7) NULL,
[CTBItemFlag] CHAR (1) NULL,
[PatientIEN] VARCHAR (50) NULL,
[EnteredByStaffIEN] VARCHAR (50) NULL, --Index
[ETLBatchID] INT NULL,
[OpCode] CHAR (1) NULL,
[ETLCreateDate] DATETIME2 (7) NULL,
[ETLEditDate] DATETIME2 (7) NULL,
[ExtractBatchID] BIGINT NOT NULL,
--BatchLogID should always be the last of the authoritative source fields listed
--in the data gathered by extractors, it should be the first of the EPRS-specific fields
BatchLogID BIGINT,
--EPRS table specific: Any fields beyond this point are EPRS specific fields/FKs
StationID smallint NULL, --EPRS assigned (FK), reference Stations
ConsultID bigint NULL, --EPRS assigned (FK), reference consults
ConsultActivityID bigint NULL, --EPRS assigned (FK), reference consultActivities
SConsultActivityCommentID bigint NULL, --EPRS assigned (FK), reference SConsultActivityComments
ConsultFactorTypeID smallint NULL, --EPRS assigned (FK), reference ConsultFactors
PatientID bigint NULL, --EPRS assigned (FK), reference Patients
StaffUserID bigint NULL, --EPRS assigned (FK), reference StaffUsers
RecordStatusID tinyint NULL, --EPRS assigned (FK), references RecordStatuses
--primary key
--unique key (if any)
)
--when using clustered columnstore index, can't set data compression to PAGE
WITH (DATA_COMPRESSION = PAGE)
GO