onsite_messages


If there is patient data for this table the file for this export will be found in the extracted zip folder location under the filename of onsite_messages.csv

If there are non-patient data column elements that are not part of the designated record set they will be marked in the Comment's column for that data element

Description

Patient secure chat messages to and from clinical staff for real time communication

Columns

Column Type Size Nulls Auto Default Children Parents Comments
id INT 10 null

Surrogate ID of the message record

username VARCHAR 64 null

Username associated with the message sender This will be the patient’s portal username if a patient sent the message. Otherwise it is the user’s username if a user sent the message.

message LONGTEXT 2147483647 NULL

The content of the chat message

ip VARCHAR 15 null

IP address of the sender. Empty on export

date DATETIME 19 null

Timestamp of when the message was sent

sender_id VARCHAR 64 NULL

ID of the message sender. This will be the patient_data.pid if a patient sent the message. Otherwise it is the users.id if a user sent the message.

recip_id VARCHAR 255 null

JSON array of message recipients. If the message is being sent to one or more clinical staff it will be a JSON array of the usernames from the users table. If a user sends the message it will be a JSON array of one or more patient_data.pid ids. On EHI export this array is filtered to only include patient_data.pids that are in the the specific export task. These messages will be duplicated if patients are in different export tasks but received the same message.

Indexes

Constraint Name Type Sort Column(s)
PRIMARY Primary key Asc id

Relationships