Skip to main content

Chat


Use the Chat module to send secure, real-time messages between doctors and Air Doctor support.
Each thread is linked to a specific appointment and retains the full message history for compliance and auditing.


This screen includes:

  • Chat threads grouped by appointment in chronological order.
  • Sender identity and timestamps for each message.
  • Support for text messages and one file attachment per message.
  • Unread indicators for inactive threads with new messages.
  • Message access restrictions based on appointment status.
  • Infinite scroll to load older messages.
  • Visual styling that distinguishes incoming and outgoing messages.
  • Persistent message history for transparency and audit purposes.

Workflow

  1. From the navigation menu or an appointment screen, select Chat with support.
  2. Type a message in the input field.
    The Send icon is disabled until the message is valid.
  3. (Optional) Select Add File to upload a file attachment.
    Uploading a new file replaces any existing attachment.
  4. Select the Send icon ([ > ]) to submit the message.
  5. Confirm that the message appears in the thread.
  6. A red badge on the chat icon indicates unread messages.

Validations

  • Message Field: Rejects empty input.
  • Attachment Upload: Accepts one file. Validates file type and size.
  • Chat Availability: Restricts chat access to active appointments only.
  • Load More: Appears only when older messages exist.
  • Unread Indicator: Displays for inactive threads with unread messages.

Actions

  • Open Chat: Launches the chat panel for the selected appointment.
  • Scroll to Load More: Loads older messages dynamically.
  • Type Message: Enables the send icon when the input or attachment is valid.
  • Attach File: Displays the uploaded filename. Replaces any existing attachment.
  • Send Message: Posts the message and clears the input field.
  • Unread Divider: Displays a divider when new messages arrive during inactivity.
  • Close Chat: Dismisses the chat window and marks the conversation as read.

SDK and API References

GET 

/messages/user-chat

Returns the secure chat interface for a specific appointment or general support. Mobile opens as full screen; desktop displays as an embedded panel or floating window

VariantBehaviorExample
MobileOpens as a full-screen interface. User can type and send messages from a dedicated page.
DesktopAppears embedded in the appointment list or as a floating window near the bottom-right side.

UI Element Types

LevelReferenceTypeValuePlacement
D-1spacerSpacer(for CS Chat on desktop, which is a popup)
D-1closeLink[x] (for CS Chat on desktop, which is a popup)~
M-1tagRegularAppointment #appointment id
M-1scrollScroller
1spacerSpacer
2load-moreLinkLoad more messages...^
2incoming-{messageId}Group90%
3attachmentViewerAttachment, if present
2new-message-lineLine
2new-messageCaptionNew messages~
2new-message-lineLine~
2spacerSpacer10%
2outgoing-{messageId}Group~90%
3attachmentViewerAttachment, if present
2newer-messages-markerSpacer(invisible; newer messages marker)
1lineLine
1contentEditStart typing
1uploadUpload(maximum one file)
1sendLink[>]

PATCH 

/messages/load-more

Retrieves older messages in the chat thread after the user selects Show previous messages. The update preserves the current scroll position.

PATCH 

/messages/open-uploader

Opens the file uploader inline in the chat interface when the user selects Attach or Upload.

PATCH 

/messages/update

Displays new messages in the active chat thread immediately after they are sent or received. The update preserves conversation state and scroll position.