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 dbo.Consults
(
--source:
--SPV.Con.Consult
/**************!!!RULE OF THUMB!!!****************/
/*
"ID"--only used in conjunction with fields specifically generated / unique to EPRS (e.g., ConsultID)
"SysNumber"--used to replace any "SID" nomenclature in incoming data fields (e.g., ConsultSID = CDWConsultSysNumber)
*/
--fields
ConsultID bigint IDENTITY(1,1) NOT NULL, --EPRS assigned (PK)
PatientID bigint NOT Null, --EPRS assigned (FK), referencess Patients
StationID smallint NULL, --EPRS assigned (FK), references Stations
OrderingStationID smallint NULL, --EPRS assigned (FK), references Stations
RemoteConsultStationID smallint NULL, --EPRS assigned (FK), references Stations
SendingStaffUserID bigint NULL, --EPRS assigned (FK), referencess StaffUsers
ToStaffUserID bigint NULL, --EPRS assigned (FK), referencess StaffUsers
InstitutionID tinyint NULL, --EPRS assigned (FK), references Institutions
OrderingInstitutionID tinyint NULL, --EPRS assigned (FK), references Institutions
RemoteConsultInstitutionID tinyint NULL, --EPRS assigned (FK), references Institutions
PatientLocationID int NULL, --EPRS assigned (FK), references Locations
FromLocationID int NULL, --EPRS assigned (FK), references Locations
UrgencyProtocolID int NULL, --EPRS assigned (FK), referencess Protocals
ConsultPlaceProtocolID int NULL, --EPRS assigned (FK), referencess Protocals
ToRequestServiceID int NULL, --EPRS assigned (FK), references RequestServices
GMRCProcedureSubspecialtyTypeID int NULL, --EPRS assigned (FK), references ProcedureSubspeicaltyTypes
ClinicalProcedureSubspecialtyTypeID int NULL, --EPRS assigned (FK), references ProcedureSubspeicaltyTypes
OrderStatusID tinyint NULL, --EPRS assigned (FK), references Statuses
CPRSStatusTypeID tinyint NULL, --EPRS assigned (FK), references StatusTypes
ActivityTypeID int NULL, --EPRS assigned (FK), references ActivityTypes
RecentActivityTypeID int NULL, --EPRS assigned (FK), references ActivityTypes
RecordStatusID tinyint NULL, --EPRS assigned (Fk), referencess RecordStatuses
TIUDocumentID int NULL, --EPRS Assigned (FK), referencess TIUDocument
BatchLogID bigint NULL, --EPRS assigned (FK), referencess BatchLogs
CDWConsultSysNumber bigint NOT NULL, --CDW ConsultSID
CDWRemoteConsultSysNumber bigint NOT NULL, --CDW RemoteConsultSID
CDWExtractBatchSysNumber bigint NULL, --extractBatchID
ConsultIEN bigint NULL, --CDW ConsultIEN
RequestDateTime datetime2(7) NULL, --CDW value; can be null, use FileEntryDateTime
RequestVistaErrorDate datetime2(7) NULL, --Check VARCHAR
FileEntryDateTime datetime2(7) NULL, --Consult entered datetime
FileEntryVistaErrorDate datetime2(7) NULL, --Check VARCHAR
EarliestDate datetime2(7) NULL, --CID
EarliestVistaErrorDate datetime2(7) NULL, --CDW EarliestVistaErrorDate
VistaCreateDate datetime2(7) NULL, --ETL capture date
VistaEditDate datetime2(7) NULL, --ETL changes based on opcode changes
RequestType VARCHAR (50) NULL, --CDW Value; This field will indicate whether the order is a consult or procedurerequest order. C = Consult P= Procedure Request
ProvisionalDiagnosisCode varchar (10) NULL, --CDWValue; indicates the DX upon entry of the consult
ProvisionalDiagnosis VARCHAR (255) NULL, --CDWValue; the text definition of the DX code entered upon consult creatation
ProvisionalDiagnosisMergeCode VARCHAR (255) NULL, --Mine and merge CDWProvisionalDx and CDWProvisionalDx to have a full saturated list
RemoteService VARCHAR (100) NULL,
RemoteRole VARCHAR (50) NULL,
PlaceOfConsultation VARCHAR (50) NULL, --where the provider wrote up the consult ie, Bed side, ER, on call.
InpatOutpat varchar(50) NULL, --results of a query do not match definition provided many unknowns...
SignificantFindings VARCHAR (5) NULL, --inconsistant values and no magic decoder ring
--primary key
CONSTRAINT PK_ConsultID PRIMARY KEY CLUSTERED
(
ConsultID ASC
)
)
ON DefinitionData
--WITH (DATA_COMPRESSION = PAGE) --less than 10,000 rows, don't need compression
GO
/**
--[ConsultSID] BIGINT NOT NULL, --CDWConsultSysNumber
--[ConsultIEN] VARCHAR (50) NOT NULL, --Consultien
--[Sta3n] SMALLINT NOT NULL, --Moved to Stations Table
--[PatientSID] INT NULL, --Moved to Patients Tables
--[PatientLocationSID] INT NULL, --Moved to Locations table
--[ProtocolSID] INT NULL, --Moved to Protocols Table
--[GMRCProcedureSID] INT NULL, --Moved to ProcedureSubspecialtyTypes
--[GMRCProcedure] VARCHAR (100) NULL, --GMRCProcedureSubspecialtyTypeID; moved to ProcedureSubspecialtyTypes Table ProcedureSubspecialtyType
[ClinicalProcedureSID] INT NULL, --Moved to ClinicalProcedureSubspecialtyTypeID
[ToRequestServiceSID] INT NULL, --Moved to ServiceSections table
[ToRequestServiceName] VARCHAR (100) NULL, --moved to Servicesections table; ServiceSectionname
[RequestDateTime] DATETIME2 (0) NULL, --EPRS noted there are null values; use fileentrydatetime
[RequestVistaErrorDate] VARCHAR (50) NULL, --IGNORED
[RequestDateTimeTransformSID] BIGINT NULL, --IGNORED
[RequestDateSID] INT NULL, --CDWRequestDatesysnumber
[FileEntryDateTime] DATETIME2 (0) NULL, --FileEntryDateTime
[FileEntryVistaErrorDate] VARCHAR (50) NULL, --IGNORED
[FileEntryDateTimeTransformSID] BIGINT NULL, --IGNORED
[FromLocationSID] INT NULL, --StationID for the LOCATIONSID-location where the consult came from
[RequestType] VARCHAR (50) NULL, --NOT SURE what 'O' or 'I' is defined as and only 2 results returned. More research if we keep...
[ToStaffSID] INT NULL, --ToStaffUserID
[OrderStatusSID] INT NULL, --CDWOrderStatussysnumber; EPRS FK OrderStatusID
[CPRSOrderSID] BIGINT NULL, --IGNORE (for now, not related to UM Metric; might need later)
[CPRSStatus] VARCHAR (50) NULL, --moved to CPRSStatusTypes
[RecentActivityTypeSID] INT NULL, --Ignored
[RecentActivityType] VARCHAR (100) NULL, --moved to ActivityTypes Table; ActivityTypes
[SendingStaffSID] INT NULL, --SendingStaffUserID
[SignificantFindings] CHAR (1) NULL, --Y = Yes with appropriate comments in the "Comment" Field
[UrgencyProtocolSID] INT NULL, --CDWUrgencyProtocolsysnumber
[Urgency] VARCHAR (50) NULL, --moved; Reference Protocolname via Protocals Table
[ConsultPlaceProtocolSID] INT NULL, --Reference Protocol via Protocals Table
[PlaceOfConsultation] VARCHAR (50) NULL, --IGNORE
[DisplayTextOfItemOrdered] VARCHAR (100) NULL, --IGNORE
[OrderingInstitutionSID] INT NULL, --OrderingInstitutionID; CDWOrderingInstitutionsysnumber
[OrderingSta3n] SMALLINT NULL, --OrderingStationID
[InpatOutpat] VARCHAR (50) NULL, --IGNORE; Captured as RequestType
[ProvisionalDiagnosis] VARCHAR (255) NULL, --CDWProvisionalDiagnosis
[ProvisionalDiagnosisCode] VARCHAR (50) NULL, --CDWProvisionalDiagnosisCode
[RemoteRole] VARCHAR (50) NULL,
[RemoteService] VARCHAR (100) NULL,
[RemoteConsultInstitutionSID] INT NULL, --REmoteConsultInstitutionID
[RemoteConsultSta3n] VARCHAR (50) NULL, --RemoteConsultStationID
[RemoteConsultSID] BIGINT NULL, --RemoteConsultID
[TIUDocumentSID] BIGINT NULL, --TIUDocumentID
[EarliestDate] DATE NULL, --The Clinically Indicated Date (CID) is entered by a provider ordering a consult and should be the date by which
it is clinically appropriate to complete the consult. This date is used by the Consults PerformanceMonitor
Report to help determine the wait times for specialty care.
This field was formerly named EARLIEST DATE, and was commonly referred toas "Earliest Appropriate Date".
[EarliestVistaErrorDate] VARCHAR (50) NULL, --EPRS EarliestVistaErrorDate
[EarliestDateTransformSID] BIGINT NULL, --IGNORE
[ClinicalProcedureIEN] VARCHAR (50) NULL, --EPRS ClinicalProcedureIEN
[ConsultPlaceProtocolIEN] VARCHAR (50) NULL, --EPRS ConsultPlaceProtocolIEN
[CPRSOrderIEN] VARCHAR (50) NULL, --EPRS CPRSOrderIEN
[FromLocationIEN] VARCHAR (50) NULL, --EPRS FromLocationIEN
[GMRCProcedureIEN] VARCHAR (50) NULL, --EPRS GMRCProcedureIEN
[OrderingInstitutionIEN] VARCHAR (50) NULL, --EPRS OrderingInstitutionIEN
[OrderStatusIEN] VARCHAR (50) NULL, --EPRS OrderStatusIEN
[PatientIEN] VARCHAR (50) NULL, --EPRS PatientIEN
[PatientLocationIEN] VARCHAR (50) NULL, --EPRS PatientLocationIEN
[ProtocolIEN] VARCHAR (50) NULL, --EPRS ProtocolIEN
[RecentActivityTypeIEN] VARCHAR (50) NULL, --IGNORED
[RemoteConsultIEN] VARCHAR (50) NULL, --EPRS RemoteConsultIEN
[RemoteConsultInstitutionIEN] VARCHAR (50) NULL, --EPRS RemoteConsultInstitutionIEN
[SendingStaffIEN] VARCHAR (50) NULL, --EPRS SendingStaffIEN
[TIUDocumentIEN] VARCHAR (50) NULL, --EPRS TIUDocumentIEN
[ToRequestServiceIEN] VARCHAR (50) NULL, --EPRS ToREquestServiceIEN
[ToStaffIEN] VARCHAR (50) NULL, --EPRS ToStaffIEN
[UrgencyProtocolIEN] VARCHAR (50) NULL, --EPRS UrgencyProtocolIEN
[ResultIEN] VARCHAR (50) NULL, --IGNORE at this time no CDW Documentation to support definition found
[ResultSID] BIGINT NULL, --IGNORE at this time no CDW Documentation to support definition found
[ResultPointedToFileNumber] VARCHAR (50) NULL, --IGNORE
[ExtractBatchID] INT NULL, --CDWExtractBatchNumber
[OpCode] CHAR (1) NOT NULL, --RecordStatusesID
[VistaCreateDate] DATETIME NULL,
[VistaEditDate] DATETIME NULL,
[BatchLogID] BIGINT NULL --EPRS BatchLogID
**/
--foreign keys
ALTER TABLE dbo.Consults
ADD CONSTRAINT FK_Consults_SendingStaffUserID
FOREIGN KEY (SendingStaffUserID)
REFERENCES dbo.StaffUsers (StaffUserID)
GO
ALTER TABLE dbo.Consults
ADD CONSTRAINT FK_Consults_ToStaffUserID
FOREIGN KEY (ToStaffUserID)
REFERENCES dbo.StaffUsers (StaffUserID)
GO
ALTER TABLE dbo.Consults
ADD CONSTRAINT FK_Consults_PatientID
FOREIGN KEY (PatientID)
REFERENCES dbo.Patients (PatientID)
GO
ALTER TABLE dbo.Consults
ADD CONSTRAINT FK_Consults_StationID
FOREIGN KEY (StationID)
REFERENCES dbo.Stations (StationID)
GO
ALTER TABLE dbo.Consults
ADD CONSTRAINT FK_Consults_OrderingStationID
FOREIGN KEY (OrderingStationID)
REFERENCES dbo.Stations (StationID)
GO
ALTER TABLE dbo.Consults
ADD CONSTRAINT FK_Consults_RemoteConsultStationID
FOREIGN KEY (RemoteConsultStationID)
REFERENCES dbo.Stations (StationID)
GO
ALTER TABLE dbo.Consults
ADD CONSTRAINT FK_Consults_InstitutionID
FOREIGN KEY (InstitutionID)
REFERENCES dbo.Institutions (InstitutionID)
GO
ALTER TABLE dbo.Consults
ADD CONSTRAINT FK_Consults_OrderingInstitutionID
FOREIGN KEY (OrderingInstitutionID)
REFERENCES dbo.Institutions (InstitutionID)
GO
ALTER TABLE dbo.Consults
ADD CONSTRAINT FK_Consults_RemoteConsultInstitutionID
FOREIGN KEY (RemoteConsultInstitutionID)
REFERENCES dbo.Institutions (InstitutionID)
GO
ALTER TABLE dbo.Consults
ADD CONSTRAINT FK_Consults_PatientLocationID
FOREIGN KEY (PatientLocationID)
REFERENCES dbo.Locations (LocationID)
GO
ALTER TABLE dbo.Consults
ADD CONSTRAINT FK_Consults_FromLocationID
FOREIGN KEY (FromLocationID)
REFERENCES dbo.Locations (LocationID)
GO
ALTER TABLE dbo.Consults
ADD CONSTRAINT FK_Consults_UrgencyProtocolID
FOREIGN KEY (UrgencyProtocolID)
REFERENCES dbo.Protocols (ProtocolID)
GO
ALTER TABLE dbo.Consults
ADD CONSTRAINT FK_Consults_ConsultPlaceProtocolID
FOREIGN KEY (ConsultPlaceProtocolID)
REFERENCES dbo.Protocols (ProtocolID)
GO
ALTER TABLE dbo.Consults
ADD CONSTRAINT FK_Consults_ToRequestServiceSectionID
FOREIGN KEY (ToRequestServiceID)
REFERENCES dbo.RequestServices (RequestServiceID)
GO
ALTER TABLE dbo.Consults
ADD CONSTRAINT FK_Consults_GMRCProcedureSubspecialtyTypeID
FOREIGN KEY (GMRCProcedureSubspecialtyTypeID)
REFERENCES dbo.ProcedureSubspecialtyTypes (ProcedureSubspecialtyTypeID)
GO
ALTER TABLE dbo.Consults
ADD CONSTRAINT FK_Consults_ClinicalProcedureSubspecialtyTypeID
FOREIGN KEY (ClinicalProcedureSubspecialtyTypeID)
REFERENCES dbo.ProcedureSubspecialtyTypes (ProcedureSubspecialtyTypeID)
GO
ALTER TABLE dbo.Consults
ADD CONSTRAINT FK_Consults_OrderStatusID
FOREIGN KEY (CPRSStatusTypeID)
REFERENCES dbo.StatusTypes (StatusTypeID)
GO
ALTER TABLE dbo.Consults
ADD CONSTRAINT FK_Consults_CPRSStatusID
FOREIGN KEY (OrderStatusID)
REFERENCES dbo.OrderStatuses (OrderStatusID)
GO
ALTER TABLE dbo.Consults
ADD CONSTRAINT FK_Consults_ActivityTypeID
FOREIGN KEY (ActivityTypeID)
REFERENCES dbo.ActivityTypes (ActivityTypeID)
GO
ALTER TABLE dbo.Consults
ADD CONSTRAINT FK_Consults_RecentActivityTypeID
FOREIGN KEY (RecentActivityTypeID)
REFERENCES dbo.ActivityTypes (ActivityTypeID)
GO
ALTER TABLE dbo.Consults
ADD CONSTRAINT FK_Consults_RecordStatusID
FOREIGN KEY (RecordStatusID)
REFERENCES dbo.RecordStatuses (RecordStatusID)
GO
ALTER TABLE dbo.Consults
ADD CONSTRAINT FK_Consults_TIUDocumentID
FOREIGN KEY (TIUDocumentID)
REFERENCES dbo.TIUDocuments (TIUDocumentID)
GO
ALTER TABLE dbo.Consults
ADD CONSTRAINT FK_Consults_BatchLogID
FOREIGN KEY (BatchLogID)
REFERENCES dbo.BatchLogs (BatchLogID)
GO
--indexes
--CONSULTS in testing was a limited dataset to 473k....Columnstore index not necessary until full dataset testing
--Create clustered columnstore index that doesn't exist yet
--CREATE CLUSTERED COLUMNSTORE INDEX CCIX_Consults ON dbo.Consults
--WITH
--(
-- /*DROP_EXISTING = ON --if the index doesn't exist and this is active,
-- -- the code will go boom
-- ,*/ MAXDOP = 1 --while 0 uses max degrees of parallelism, 1 in
-- -- this case helps tighten the ordering when
-- -- initially using a traditional clustered index
-- , COMPRESSION_DELAY = 10 --in minutes; increase to 60 if doing OLTP to
-- --maintain data in deltarowgroup for 60 minutes
-- , DATA_COMPRESSION = COLUMNSTORE --or COLUMNSTORE_ARCHIVE
--)
--ON CoreData --keep the clustered columnstore with the data filegroup rather than index filegroup
--GO
----TODO: Are the traditional non-clustered indexes still needed?
--constraints
--Metadata descriptions for each field
EXECUTE sp_addextendedproperty
N'MS_Description', N'Primary Key for the table, unique to EPRS; note the authoritative source table is SPV.Con.Consult',
N'SCHEMA', N'dbo',
N'TABLE', N'Consults',
N'COLUMN', N'ConsultID'
GO
EXECUTE sp_addextendedproperty
N'MS_Description', N'Foreign key, relates to StaffUsers table, unique to EPRS',
N'SCHEMA', N'dbo',
N'TABLE', N'Consults',
N'COLUMN', N'SendingStaffUserID'
GO
EXECUTE sp_addextendedproperty
N'MS_Description', N'Foreign key, relates to StaffUsers table, unique to EPRS',
N'SCHEMA', N'dbo',
N'TABLE', N'Consults',
N'COLUMN', N'ToStaffUserID'
GO
EXECUTE sp_addextendedproperty
N'MS_Description', N'Foreign key, relates to Patients table, unique to EPRS',
N'SCHEMA', N'dbo',
N'TABLE', N'Consults',
N'COLUMN', N'PatientID'
GO
EXECUTE sp_addextendedproperty
N'MS_Description', N'Foreign key, relates to Stations table, unique to EPRS',
N'SCHEMA', N'dbo',
N'TABLE', N'Consults',
N'COLUMN', N'StationID'
GO
EXECUTE sp_addextendedproperty
N'MS_Description', N'Foreign key, relates to Stations table, unique to EPRS',
N'SCHEMA', N'dbo',
N'TABLE', N'Consults',
N'COLUMN', N'OrderingStationID'
GO
EXECUTE sp_addextendedproperty
N'MS_Description', N'Foreign key, relates to Stations table, unique to EPRS',
N'SCHEMA', N'dbo',
N'TABLE', N'Consults',
N'COLUMN', N'RemoteConsultStationID'
GO
EXECUTE sp_addextendedproperty
N'MS_Description', N'Foreign key, relates to Institutions table, EPRS value',
N'SCHEMA', N'dbo',
N'TABLE', N'Consults',
N'COLUMN', N'InstitutionID'
GO
EXECUTE sp_addextendedproperty
N'MS_Description', N'Foreign key, relates to Institutions table, unique to EPRS',
N'SCHEMA', N'dbo',
N'TABLE', N'Consults',
N'COLUMN', N'OrderingInstitutionID'
GO
EXECUTE sp_addextendedproperty
N'MS_Description', N'Foreign key, relates to Institutions table, unique to EPRS',
N'SCHEMA', N'dbo',
N'TABLE', N'Consults',
N'COLUMN', N'RemoteConsultInstitutionID'
GO
EXECUTE sp_addextendedproperty
N'MS_Description', N'Foreign key, relates to Locations table, unique to EPRS',
N'SCHEMA', N'dbo',
N'TABLE', N'Consults',
N'COLUMN', N'PatientLocationID'
GO
EXECUTE sp_addextendedproperty
N'MS_Description', N'Foreign key, relates to Locations table, unique to EPRS',
N'SCHEMA', N'dbo',
N'TABLE', N'Consults',
N'COLUMN', N'FromLocationID'
GO
EXECUTE sp_addextendedproperty
N'MS_Description', N'Foreign key, relates to Protocals table, unique to EPRS',
N'SCHEMA', N'dbo',
N'TABLE', N'Consults',
N'COLUMN', N'UrgencyProtocolID'
GO
EXECUTE sp_addextendedproperty
N'MS_Description', N'Foreign key, relates to Protocals table, unique to EPRS',
N'SCHEMA', N'dbo',
N'TABLE', N'Consults',
N'COLUMN', N'ConsultPlaceProtocolID'
GO
EXECUTE sp_addextendedproperty
N'MS_Description', N'Foreign key, relates to ServiceSections Statuses table, unique to EPRS',
N'SCHEMA', N'dbo',
N'TABLE', N'Consults',
N'COLUMN', N'ToRequestServiceID'
GO
EXECUTE sp_addextendedproperty
N'MS_Description', N'Service that will perform inter-facility consult @ the remote facility',
N'SCHEMA', N'dbo',
N'TABLE', N'Consults',
N'COLUMN', N'RemoteService'
GO
EXECUTE sp_addextendedproperty
N'MS_Description', N'Foreign key, relates to ProcedureSubspecialtyTypes table, unique to EPRS',
N'SCHEMA', N'dbo',
N'TABLE', N'Consults',
N'COLUMN', N'GMRCProcedureSubspecialtyTypeID'
GO
EXECUTE sp_addextendedproperty
N'MS_Description', N'Foreign key, relates to ProcedureSubspecialtyTypes table, unique to EPRS',
N'SCHEMA', N'dbo',
N'TABLE', N'Consults',
N'COLUMN', N'ClinicalProcedureSubspecialtyTypeID'
GO
EXECUTE sp_addextendedproperty
N'MS_Description', N'Foreign key, relates to CPRSStatues table, unique to EPRS',
N'SCHEMA', N'dbo',
N'TABLE', N'Consults',
N'COLUMN', N'CPRSStatusTypeID'
GO
EXECUTE sp_addextendedproperty
N'MS_Description', N'Foreign key, relates to ActivityTypes table, unique to EPRS',
N'SCHEMA', N'dbo',
N'TABLE', N'Consults',
N'COLUMN', N'ActivityTypeID'
GO
EXECUTE sp_addextendedproperty
N'MS_Description', N'Foreign key, relates to ActivityTypes table, unique to EPRS',
N'SCHEMA', N'dbo',
N'TABLE', N'Consults',
N'COLUMN', N'RecentActivityTypeID'
GO
EXECUTE sp_addextendedproperty
N'MS_Description', N'Foreign key, relates to RecordStatuses table holds opcode definitions, unique to EPRS',
N'SCHEMA', N'dbo',
N'TABLE', N'Consults',
N'COLUMN', N'RecordStatusID'
GO
EXECUTE sp_addextendedproperty
N'MS_Description', N'Foreign key, relates to TIUDocuments table, unique to EPRS',
N'SCHEMA', N'dbo',
N'TABLE', N'Consults',
N'COLUMN', N'TIUDocumentID'
GO
EXECUTE sp_addextendedproperty
N'MS_Description', N'Foreign key, relates to Batch Logs table, unique to EPRS',
N'SCHEMA', N'dbo',
N'TABLE', N'Consults',
N'COLUMN', N'BatchLogID'
GO
EXECUTE sp_addextendedproperty
N'MS_Description', N'CDW National unique identifier; source table: con.consult.consultsid',
N'SCHEMA', N'dbo',
N'TABLE', N'Consults',
N'COLUMN', N'CDWConsultSysNumber'
GO
EXECUTE sp_addextendedproperty
N'MS_Description', N'CDW National unique identifier; source table: con.consult.remoteconsultsid',
N'SCHEMA', N'dbo',
N'TABLE', N'Consults',
N'COLUMN', N'CDWRemoteConsultSysNumber'
GO
EXECUTE sp_addextendedproperty
N'MS_Description', N'CDW unique identifier; source table: con.consult.consultIEN',
N'SCHEMA', N'dbo',
N'TABLE', N'Consults',
N'COLUMN', N'ConsultIEN'
GO
EXECUTE sp_addextendedproperty
N'MS_Description', N'Date of the request',
N'SCHEMA', N'dbo',
N'TABLE', N'Consults',
N'COLUMN', N'RequestDateTime'
GO
EXECUTE sp_addextendedproperty
N'MS_Description', N'Date of actual entry of consultation request into the file.Transparent to user',
N'SCHEMA', N'dbo',
N'TABLE', N'Consults',
N'COLUMN', N'FileEntryDateTime'
GO
EXECUTE sp_addextendedproperty
N'MS_Description', N'The Clinically Indicated Date (CID) is entered by a provider ordering a consult and should be the date by which it is clinically appropriate to complete the consult. This date is used by the Consults PerformanceMonitor
Report to help determine the wait times for specialty care. This field was formerly named EARLIEST DATE, and was commonly referred toas "Earliest Appropriate Date".',
N'SCHEMA', N'dbo',
N'TABLE', N'Consults',
N'COLUMN', N'EarliestDate'
GO
EXECUTE sp_addextendedproperty
N'MS_Description', N'This field will indicate whether the order is a consult or procedurerequest order. C = Consult P= Procedure Request, source field: RequestType',
N'SCHEMA', N'dbo',
N'TABLE', N'Consults',
N'COLUMN', N'RequestType'
GO
EXECUTE sp_addextendedproperty
N'MS_Description', N'indicates the DX text entered upon entry of the consult, source field: ProvisionalDiagnosisCode',
N'SCHEMA', N'dbo',
N'TABLE', N'Consults',
N'COLUMN', N'ProvisionalDiagnosisCode'
GO
EXECUTE sp_addextendedproperty
N'MS_Description', N'DX code entered upon entry of the consult, source field: ProvisionalDiagnosis',
N'SCHEMA', N'dbo',
N'TABLE', N'Consults',
N'COLUMN', N'ProvisionalDiagnosis'
GO
EXECUTE sp_addextendedproperty
N'MS_Description', N'where the provider wrote up the consult ie, Bed side, ER, on call., source field: PlaceOfConsultation',
N'SCHEMA', N'dbo',
N'TABLE', N'Consults',
N'COLUMN', N'PlaceOfConsultation'
GO
EXECUTE sp_addextendedproperty
N'MS_Description', N'Y = Yes with appropriate comments in the "Comment" Field, source field: SignificantFindings',
N'SCHEMA', N'dbo',
N'TABLE', N'Consults',
N'COLUMN', N'SignificantFindings'
GO