dbo.SXAMMMessage 
Default Table Name  SXAMMMessage 
Definition  This entity contains all of the messages associated with an Order Message. 

dbo.SXAMMMessage Columns 
ColumnName  Domain  Datatype  NULL  Definition 
SiteID    smallint  NO  Identifies the unique distributed database ID where the row was inserted. 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)  NO  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  NO  The date and time that the row was last updated and will be based on the Enterprise time zone. 
CreatedBy    varchar(50)  NO  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  NO  The date and time that the row was created and will be based on the Enterprise time zone. 
MessageID(PK)    bigint  NO  Auto generated unique primary key value. 
MessageOrderID(FK)    bigint  NO  A foreign key to the MessageOrderID column in the SXAMMMessageOrder table. 
MessageText    varchar(4000)  NO  Identifies the text of the Message. 
MessagePriorityID(FK)    int  NO  A foreign key to the MessagePriorityID column in the SXAMMMessagePriority table. 
MessageCategoryID(FK)    int  NO  A foreign key to the MessageCategoryID column in the SXAMMMessageCategory table. 
MessageStatusID(FK)    int  NO  A foreign key to the MessageStatusID column in the SXAMMMessageStatus table. 
StatusByDepartmentType    int  NO  An enumerated type with the following list of possible values: 0 = [All],1 = [Nursing],2 = [Pharmacy], 
StatusChangeByGUID    HVCIDdt  NO  The user guid of the person changing the status 
StatusChangeDtm    datetime  NO  Visit TimeZone - The datetime when the status change was made 
SenderDepartmentType    int  NO  An enumerated type with the following list of possible values: 0 = [All],1 = [Nursing],2 = [Pharmacy], 
RecipientDepartmentType    int  NO  An enumerated type with the following list of possible values: 0 = [All],1 = [Nursing],2 = [Pharmacy], 
ReplyMessageID(FK)    bigint  YES  A foreign key to the MessageID column in the SXAMMMessage table. 
ReplacedMessageID(FK)    bigint  YES  A foreign key to the MessageID column in the SXAMMMessage table. 
Reason    varchar(255)  YES  Reason the status was changed. The value here could either be from Cv3CodedReason.CodedReasonCode or typed in by the user. 
MSrepl_tran_version    uniqueidentifier  NO  Optimistic lock identifier. 
RequestForDateTime1    datetime  YES  Visit TimeZone - Date and time of Current Dose Request1
 
RequestForDateTime2    datetime  YES  Visit TimeZone - Date and time of Current Dose Request2
 
RequestForDateTime3    datetime  YES  Visit TimeZone - Date and time of Current Dose Request3
 
Quantity    numeric(14, 4)  YES  The value for Refill Dose
 
RequestForDateTime4    datetime  YES  Visit TimeZone - Date and time of Current Dose Request4 
RequestForDateTime5    datetime  YES  Visit TimeZone - Date and time of Current Dose Request5 
PrinterGUID    HVCIDdt  YES  PrinterGUID for the label to be sent to. 
PrintAdminTime    bit  YES  Flag to indicate the Admin Times should be included on the label. 
MSReplrowguid    uniqueidentifier  NO  Unique GUID used to support merge replication. 

dbo.SXAMMMessage Primary and Unique Keys 
Key Name  Key Type  Keys 
SXAMMMessagePK  PrimaryKey  MessageID