Attachment
Data to represent Message Attachments.
Attachment data has following elements:
| documentId | (string) | Unique document id. This value will be used in a response if ArticleID is available |
| documentName | (string) | User-friendly attachment description to show on the screen. |
| formatTypeId | (int) | See Document Formats below. |
| originalFileName | (string) | Original file name with extension, if applicable. Will be used to select correct handler when showing to a patient. |
| mimeType | (string) | Defines mime type associated with document. Helpful when extension of original file name is not available. |
| fileContent | (string) | Body of document. If document is binary, use Base64 representation. |
| createdTs | (datetime) | Original file/document creation timestamp. This field is nullable. |
| attachmentId | (string) | Unique attachment id. (not used in current version). |
Notes:
- If document is a text-based HTML document, use "text/html" as mimeType value.
- For any other types of documents set mimeType as defined in this document.
- fileContent string can be encoded as Base64 even for text files such as Chart or Clinical Summaries. SageBridgeAPI will automatically detect it and convert it back to a string. It can be useful when content has some XML or JSON tags what can break serialization.
- attachmentId is reserved for a future. Keep it as NULL or empty.
- 1 - Binary File (pdf, jpg etc.)
- 2 - Text File (any text-based files, include CCD and CCDA documents, plain text, XML, HTML etc.)
Attachment examples:
XML - PDF document:
JSON - Plain text attachment:
{
"attachmentId": "e3038cc8-1758-471a-a93d-b598f1373732:379",
"documentId": "6dd6fc38-694f-4fa7-af55-6bf43f743163",
"documentName": "Sophrona info",
"originalFileName": "ReadMe.txt",
"mimeType": "text/plain",
"formatTypeId": 2,
"fileContent": "Online Patient Communication Uniquely Designed for Ophthalmology\r\nTen years and growing strong, Sophrona sets the standard in online patient-physician communication services and technology for ophthalmology.\r\nSophrona is the power behind the #1 choice of nearly 2,000 eye doctors and clinical staff nationwide.\r\nPartnering with leading practice management and electronic medical records providers, Sophrona delivers innovative solutions purpose built to increase profits and patient engagement.",
"createdTs": "\/Date(1457992710379)\/"
}
See also:
API Data,
GetMessagesFromPatient function ,
PostMessagesToPatient function ,
SecureMessage data