dbo.CV3OrderSet 
Default Table Name  CV3OrderSet 
Definition  Information which is applicable at the order set level. This table allows the order set to link back to its catalog order set and multi order form version used to enter the order set. This will facilitate the reorder from order set and display order set details functions. Rows are put into this table with the order set is entered.

The table is also used to track which sub-sets are in the set. For example, if an order set contains two sub-sets, then three rows are put into this table when the set is ordered. Information in this table will control how orders within the set are grouped together for the purposes of maintenance. For example, it can control if an order must be released with other orders in the parent set or with other orders in the sub-set.

Finally, CDS can now perform duplicate checking at the set level, which requires that we know when a set was started / stopped. 

dbo.CV3OrderSet Columns 
ColumnName  Domain  Datatype  NULL  Definition 
SiteID    smallint  YES  Identifies the unique distributed database ID where the row was inserted. Distributed databases are no longer supported so this column is deprecated. 
RepFlags    tinyint  YES  Indicates the action in a distributed database environment. Distributed databases are no longer supported so this column is deprecated. 
Build    int  NO  Identifies the build number and patch level of the software that inserted/updated this row. The format is the Build number followed by 3 digits for the patch level which is typically 000. The build number is tied to specific versions of the software, e.g. Sunrise 15.3 is Build 5021, Sunrise 16.3 is Build 5503. 
TouchedBy    varchar(50)  YES  Information about the user that last updated the row. This will typically be the UserID (IDCode from CV3User table) and may be prefixed with an environment identifier followed by an underscore, e.g. b96d2bf5_jongmore. 
TouchedWhen    datetime  YES  The date and time that the row was last updated and will be based on the Enterprise time zone. 
CreatedBy    varchar(50)  YES  Information about the user that created the row. This will typically be the UserID (IDCode from CV3User table) and may be prefixed with an environment identifier followed by an underscore, e.g. b96d2bf5_jongmore. 
CreatedWhen    datetime  YES  The date and time that the row was created and will be based on the Enterprise time zone. 
Active    bit  NO  Denotes whether the row is active or not, 0 means the row has been soft deleted or deactivated. 
GUID(PK)    HVCIDdt  NO  Unique primary key value. 
ClientGUID    HVCIDdt  NO  Link to CV3Client 
ChartGUID    HVCIDdt  NO  Link to CV3Chart 
ClientVisitGUID    HVCIDdt  NO  Link to CV3ClientVisit 
OrderSetName    varchar(125)  NO  Order set name 
OrderSetStatusCode    varchar(30)  YES  Order set status code 
OrderSetStatusLevelNum    int  YES  Order set Status level num 
OrderCatalogSetGUID    HVCIDdt  NO  Link to CV3OrderCatalogSet. This references the set found in the order catalog. 
MultiOrderFormGUID    HVCIDdt  YES  The version of the multi order entry form used to create the order set. 
ParentOrderSetGUID    HVCIDdt  YES  Link to the parent order set. Only applicable if this is a sub-set 
StartDtm    datetime  YES  Order set start date 
StopDtm    datetime  YES  Order set stop date 
OrderSetType    int  NO  Indentifies the type of set 
DiscCancelGroupByGUID    HVCIDdt  YES  This identfies the order set in which Disc/Cancel behavior is grouped. If the parent set is controlling this behavior then this links to the parent row. Otherwise, it is a link to the sub-set. This is a foreign key into CV3OrderSet 
SuspendGroupByGUID    HVCIDdt  YES  Like "DiscCancelGroupByGUID", except it applies to Suspend/Unsuspended 
VerifyGroupByGUID    HVCIDdt  YES  Like "DiscCancelGroupByGUID", except it applies to Verification 
ReleaseGroupByGUID    HVCIDdt  YES  Like "DiscCancelGroupByGUID", except it applies to order release. 
ActivateGroupByGUID    HVCIDdt  YES  Like "DiscCancelGroupByGUID", except it applies to order activation. 
TaskGroupByGUID    HVCIDdt  YES  Like "DiscCancelGroupByGUID", except it applies to grouping tasks on the worklist. 
TaskRescheduleGroupByGUID    HVCIDdt  YES  Like "DiscCancelGroupByGUID", except it applies to rescheduling tasks 
VerificationPolicyCode    varchar(30)  YES  The verification policy of this set 
AllowReinstateHoursNum    int  YES  The number of hours in which orders within the set can be reinstated 
MSrepl_tran_version    uniqueidentifier  YES  Optimistic lock identifier. 
VerifyingUserGUID    HVCIDdt  YES  User GUID of login user who is verifying the linked orderset.
 
VerifyingDtm    datetime  YES  The starting datetime of login user who is verifying the linked orderset. 
MSReplrowguid    uniqueidentifier  NO  Unique GUID used to support merge replication. 

dbo.CV3OrderSet Primary and Unique Keys 
Key Name  Key Type  Keys 
CV3OrderSetPK  PrimaryKey  GUID