STEWARDSHIPPLANTEMPLATESTEP

Contains stewardship plan template steps.

Primary Key

Primary Key Field Type
ID uniqueidentifier

Fields

Field Field Type Null Notes Description
OBJECTIVE nvarchar(100) Default = ''
DATEOPTIONCODE tinyint Default = 0 0=Days from start, 1=Specific date
DATEOPTION nvarchar(15) (Computed) yes CASE [DATEOPTIONCODE] WHEN 0 THEN N'Days from start' WHEN 1 THEN N'Specific date' END Provides a translation for the 'DATEOPTIONCODE' field.
DAYSFROMSTART int Default = 0
TARGETDATE datetime yes
DATELOCKED bit Default = 0 Indicates whether or not the Date Option Code, Days from Start, and the Target Date are locked.
RECURSCODE tinyint Default = 0 0=, 1=Annually, 2=Semi-Annually, 3=Quarterly, 4=Bi-Monthly, 5=Monthly, 6=Semi-Monthly, 7=Bi-Weekly, 8=Weekly
RECURS nvarchar(13) (Computed) yes CASE [RECURSCODE] WHEN 0 THEN N'' WHEN 1 THEN N'Annually' WHEN 2 THEN N'Semi-Annually' WHEN 3 THEN N'Quarterly' WHEN 4 THEN N'Bi-Monthly' WHEN 5 THEN N'Monthly' WHEN 6 THEN N'Semi-Monthly' WHEN 7 THEN N'Bi-Weekly' WHEN 8 THEN N'Weekly' END Provides a translation for the 'RECURSCODE' field.
DATEADDED datetime Default = getdate() Indicates the date this record was added.
DATECHANGED datetime Default = getdate() Indicates the date this record was last changed.
TS timestamp Timestamp.
TSLONG bigint (Computed) yes CONVERT(bigint, TS) Numeric representation of the timestamp.

Foreign Keys

Foreign Key Field Type Null Notes Description
TEMPLATEID uniqueidentifier STEWARDSHIPPLANTEMPLATE.ID FK to STEWARDSHIPPLANTEMPLATE
CATEGORYCODEID uniqueidentifier yes STEWARDSHIPSTEPCATEGORYCODE.ID FK to STEWARDSHIPSTEPCATEGORYCODE
CONTACTMETHODCODEID uniqueidentifier yes INTERACTIONTYPECODE.ID FK to INTERACTIONTYPECODE
ADDEDBYID uniqueidentifier CHANGEAGENT.ID FK to CHANGEAGENT.
CHANGEDBYID uniqueidentifier CHANGEAGENT.ID FK to CHANGEAGENT.

Indexes

Index Name Fields Unique Primary Clustered
IX_STEWARDSHIPPLANTEMPLATESTEP_DATEADDED DATEADDED yes
IX_STEWARDSHIPPLANTEMPLATESTEP_DATECHANGED DATECHANGED
PK_STEWARDSHIPPLANTEMPLATESTEP ID yes yes

Triggers

Trigger Name Description
TR_STEWARDSHIPPLANTEMPLATESTEP_AUDIT_UPDATE
TR_STEWARDSHIPPLANTEMPLATESTEP_AUDIT_DELETE