Use clinician messaging to coordinate patient care, handovers, referrals, transfers, laboratory work, and tasks. Record decisions, diagnoses, orders, administrations, and other clinical facts through an approved form or by completing the formal-documentation promotion process.
Context-aware coordination
Link a conversation to patient, EHR, encounter, handover, task, referral, transfer, laboratory result or composition context without copying the complete clinical record into the message.
Scoped participation
Direct and group conversations require active membership. Team, ward, role and clinical-service channels also resolve against the authenticated workforce scope.
Traceable delivery
Unread state, delivery, read and acknowledgement receipts, urgent acknowledgement requirements, escalation and promotion events are retained with actor and time evidence.
Replicated realtime runtime
Authenticated WebSockets provide conversation and user updates. Valkey/Redis pub-sub bridges events across backend replicas in Kubernetes or replicated Docker deployments.
Where Clinicians Use Messaging
Open Collaboration from the primary navigation. The top navigation counter reports conversations with unread messages. When the workspace is launched from a patient, encounter or handover context, the creation flow can preselect that context while still requiring the sender to select the intended recipients or operational scope.
| Conversation | Intended use | Required scope |
|---|---|---|
| Direct | One-to-one clinical coordination. | At least one receiver other than the sender. Direct membership is explicit. |
| Team | Shared multidisciplinary or clinical-service discussion. | Team, service or explicitly selected members. |
| Ward | Location-based operational and handover communication. | Ward/location scope or explicit membership. |
| Patient | Discussion tied to a known patient and, where available, their EHR or encounter. | Patient context plus authorized conversation membership. Patient-record access remains independently enforced. |
| Encounter | Coordination within a specific episode of care. | Encounter context and permitted participants. |
| Handover | Shift, ward or service handover discussion. | Handover identifier or appropriate ward/team scope. |
| Referral / transfer | Coordination around outgoing, incoming or networked referral and transfer workflows. | Referral/transfer context and authorized receiving/sending participants. |
Clinical Operating Flow
- Search the governed directory for a clinician, team, ward or service.
- Select the conversation type and verify every recipient before creation.
- Link only the patient or workflow context required for the coordination purpose.
- Send the message with routine or urgent priority. Urgent, STAT, critical and emergency messages require acknowledgement.
- Review delivery/read/acknowledgement state. Escalate or create a workflow task when action is not completed.
- When the content forms part of the clinical record, use Promote to Note and complete the approved documentation workflow.
The workspace supports reply, forward, typing indication, conversation rename, adding participants, pin, mute, read/unread state, archive, leave and removal from the user's visible list. Adding a third participant to a direct conversation converts it to a group conversation. Newly added participants see messages from the time they were added; earlier history is not automatically exposed.
Access-Control Model
| Control | Enforcement |
|---|---|
| Authentication | REST and WebSocket access requires a valid AMCDR token or configured OIDC/Keycloak identity mapped to an active local user. |
| Tenant boundary | Conversation, member, message, receipt, notification and audit entities carry governance scope and remain subject to the deployment's tenant isolation and RLS controls. |
| Direct/group conversations | Only active explicit members can list or open the conversation. |
| Team/ward/service conversations | Access is allowed through active membership or matching authenticated team, role, ward or service scope. |
| Removed/left member | Access is denied after membership becomes left, removed or hidden. Hiding or archiving a conversation does not destroy retained evidence. |
| Patient context | Membership in a patient-linked conversation does not independently grant permission to retrieve the patient record. Patient consent, protected-record, clinical-service and care-team policy continue to govern clinical APIs and workspace navigation. |
| Notification privacy | Queued in-application notification payloads contain routing identifiers, priority and acknowledgement state; they explicitly exclude clinical message content. |
Message Lifecycle and Audit
- Message creation records the sender identity, role snapshot, priority, retention class and governed scope.
- Delivery, read and acknowledgement receipts are recorded per user.
- The sender may edit or logically delete an unpromoted message within 12 hours. Edits retain previous content in audit history; deletion retains lifecycle evidence.
- Messages marked as promoted to the formal record cannot be edited or deleted through the messaging workflow.
- Conversation rename, participant addition, user-state changes, escalation and promotion produce dedicated audit events.
- Archive, leave and remove-from-view actions change user visibility; they are not hard-delete operations.
Formal Clinical Record Promotion
Promotion marks a message for formal documentation and can link the resulting composition UID. A production workflow should require an approved openEHR template, author verification, patient/EHR context, contribution/audit details and successful composition commit before treating the promotion as complete. The message remains provenance for the communication; the committed openEHR composition is the canonical clinical record.
Do not use chat history as the only record of a medication order, diagnosis, result acknowledgement, consent decision, discharge instruction or other material clinical fact. Create a task for follow-up and capture the fact through the governed clinical form/template.
Attachments and Linked Context
Conversations can link to patient, encounter, and handover records. Binary file upload is not active in the clinician composer. Enabling it requires document storage, malware scanning, file type and size limits, encryption, download permissions, retention, legal hold, and audit controls.
Realtime Delivery and Replication
Conversation WebSockets carry message, receipt, typing, escalation and promotion events. A separate user WebSocket updates unread counters and conversation notifications. In a multi-replica deployment, the backend bridge publishes only event envelopes through tenant-scoped Valkey/Redis infrastructure so a connection on one replica receives changes created on another. REST remains authoritative for message persistence and recovery after a disconnected WebSocket.
Load balancers must support WebSocket upgrade, connection timeouts and authenticated routing. Monitor bridge availability, connection failures, queue age and unread notification processing without placing message bodies, patient identifiers or clinical values in metric labels or logs.
Encryption, Retention and Production Activation
Message and conversation records carry a retention class, but each deployment must map that class to an approved retention schedule, legal-hold process and disposition authority. Database, backup, replica and recovery environments must use approved encryption at rest with controlled key custody.
Application-level message-body encryption still requires a production key provider and a configured rotation and recovery process. Until then, use approved database and storage encryption. Require TLS for REST and WebSocket traffic.
- Confirm Keycloak/OIDC roles, workforce memberships, team/ward/service claims and tenant context.
- Configure the approved retention classes, legal hold and audit export process.
- Validate TLS, database/storage encryption, backups, restoration and key recovery.
- Validate Valkey/Redis bridge operation across at least two backend replicas.
- Test unauthorized direct, team, ward, patient and cross-tenant access denials.
- Test urgent acknowledgement, escalation, task creation, promotion, edit-window and logical-deletion evidence.
REST and WebSocket Interfaces
The authenticated API prefix exposes the following clinician-messaging operations. Request and response schemas, authorization controls and interactive examples are available in Swagger under AMCDR Clinical Services.
| Method | Path | Purpose |
|---|---|---|
| GET | /clinical-messaging/directory | Search active clinician and governed team/service directory entries. |
| GET / POST | /clinical-messaging/conversations | List permitted conversations or create a scoped conversation. |
| POST | /clinical-messaging/conversations/{conversation_id}/members | Add governed participants. |
| PATCH | /clinical-messaging/conversations/{conversation_id}/user-state | Pin, mute, mark read/unread, archive, leave or hide. |
| GET / POST | /clinical-messaging/conversations/{conversation_id}/messages | Read permitted history or send a message. |
| PATCH / DELETE | /clinical-messaging/conversations/{conversation_id}/messages/{message_id} | Edit or logically delete within the governed author window. |
| POST | .../{message_id}/receipt | Record read or acknowledgement evidence. |
| POST | .../{message_id}/escalation | Update escalation status and evidence. |
| POST | .../{message_id}/promote | Mark for formal clinical documentation and optionally link a composition UID. |
| WebSocket | /clinical-messaging/ws/{conversation_id} | Authorized realtime conversation events and typing state. |
| WebSocket | /clinical-messaging/user-ws | User-scoped unread and notification events. |
Related Guidance
Use Authentication and Access-Control Matrix for deny precedence and patient access levels, Patient Consent and Care-Team Access for patient-controlled access, Workflow Orchestration and Enforcement for message-to-task follow-up, Templates and Form Designer for formal documentation, and Audits and Security for retained evidence.