Document

Data to represent different documents such as Charts, Clinical Summaries, Educational Documents, Message Attachments etc.
Document 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 document 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.

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.
  • formatTypeId value "4" (ArticleID) - fileContent and mimeType parameters are not required. documentId represents previously saved document.
  • formatTypeId value "5" (AAO ArticleID) - fileContent and mimeType parameters are ignored. documentId represents AAO ArticleId. See list of available AAO articles

Document Formats:

  • 1 - Binary File (pdf, jpg etc.)
  • 2 - Text File (any text-based files, include CCD and CCDA documents, plain text, XML, HTML etc.)
  • 3 - Url/hyperlink (specifies that document body is a hyperlink to any http accessible resourse)
  • 4 - Article ID (for educational documents only).
  • 5 - AAO Article ID. (for educational documents only). See list of available AAO articles

See also:

API Data