feat(cortex): implement activePatient fallback in various components

- Updated DagnotatieBlock to use activePatient for prefill if no patientId is provided.
- Enhanced PatientDashboardBlock to fallback to activePatient for patientId and name.
- Adjusted usePatientSelection to handle pending actions and re-route after patient selection.
- Refined chat components to manage nudge messages and integrate them into the chat flow.
- Improved UI elements for better patient selection experience.

This update enhances user experience by ensuring that the active patient context is utilized across multiple components, streamlining workflows and reducing manual input.
This commit is contained in:
colinislit
2026-01-03 22:18:30 +01:00
parent 7040241f7d
commit 05836c5c6a
18 changed files with 472 additions and 93 deletions

View File

@@ -47,6 +47,12 @@ interface ChatMessageProps {
}
export function ChatMessage({ message, showTimestamp = false }: ChatMessageProps) {
// Nudge messages are handled by NudgeChatMessage component
// This shouldn't be called for nudge type, but guard just in case
if (message.type === 'nudge') {
return null;
}
const styles = MESSAGE_STYLES[message.type];
// Don't show border for system messages