dbo.SXASHMessage 
Default Table Name  SXASHMessage 
Definition  This table contains the messages that are created by the SHM Application. All messages information and content will be stored here 

dbo.SXASHMessage 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. 
MsgTypeID(FK)    int  NO  A foreign key to the MsgTypeID column in the SXASHMsgType table. 
MsgDtm    datetime  NO  Enterprise TimeZone - Time of message 
ToDisplayName    varchar(500)  NO  PHI: Name of recipient for the message. 
FromName    varchar(500)  NO  PHI: name of sender for the message. 
FromUserID(FK)    bigint  YES  A foreign key to the UserID column in the SXASHUser table. 
OrigMsgID(FK)    bigint  YES  A foreign key to the MessageID column in the SXASHMessage table. 
ParentMsgID(FK)    bigint  YES  A foreign key to the MessageID column in the SXASHMessage table. 
IsPatient    bit  NO  indicated that message is patient related 
Subject    varchar(255)  YES  PHI: subject text of message 
Content    varchar(max)  YES  PHI: Contents of the message. Content contains well formed XML outlined by the message type parameters. 
MSrepl_tran_version    uniqueidentifier  NO  Optimistic lock identifier. 
MsgPriorityTypeID(FK)    int  YES  A foreign key to the MsgPriorityTypeID column in the SXASHMsgPriorityType table. 
ActivationDate    datetime  YES  Enterprise TimeZone - The priority assigned to the message 
ExpirationDate    datetime  YES  Enterprise TimeZone - A future date when the message should display in the recipient's inbox 
IsEConsultation    bit  YES  The date the message is automatically moved to the recipient's deleted folder. Its a way to give a message a shelf life. 
MsgActionType    int  YES  An enumerated type with the following list of possible values: 0 = [compose],1 = [display],2 = [reply],3 = [forward],4 = [delete], 
IsMsgFromRemoteClient    bit  YES  Whether message is from a remoting client object 
IsProcessPending    bit  YES  Determines if scheduler needs to process the associated future dated messages 
IsAnonymous    bit  YES  If the flag is true the recipient will not be able to reply or forward as well as not showing the senders information. 
IsCopiedToProxy    bit  NO  Identifier to send message to Proxy user or not. 
IsSentReadReceipt    bit  NO  Identifier to send read receipt to sender of a message or not. 
InboxSharingUserID    bigint  YES  Information of SHM UserID who sent messages using Inbox sharing Functionality on behalf of Sender present in "FromUserID" column 
MSReplrowguid    uniqueidentifier  NO  Unique GUID used to support merge replication. 
OnBehalfOfType    int  YES  An enumerated type with the following list of possible values: 0 = [InboxSharing],1 = [ProxyOnBehalfOfProvider],2 = [PatientsAuthorizedRepresentative], 
TaskTagGUID    HVCIDdt  YES  Store reference of unique coded reason Guid. 
TagLastTouchedByGUID    HVCIDdt  YES  Store unique tag last updated user Guid. 
TagLastTouchedWhenUTC    datetimeoffset(3)  YES  The date and time that the tag last updated and will be based on the Enterprise time zone. 

dbo.SXASHMessage Primary and Unique Keys 
Key Name  Key Type  Keys 
SXASHMessagePK  PrimaryKey  MessageID