Shared Components
Reusable UI components that provide consistent functionality and styling across the application.Overview
The application uses a component-based architecture with shared components that encapsulate common UI patterns and functionality. These components promote consistency, reduce code duplication, and simplify maintenance.Component Catalog
Navigation & Layout
PatientNavComponent
Tabbed navigation for patient detail views. Inputs:activeTab: Current active tab IDpendingFormsCount: Badge count for forms tabpendingTasksCount: Badge count for tasks tabunreadMessagesCount: Badge count for messages tab
tabChange: Emits when tab is selected
Data Display
RiskBadgeComponent
Displays patient risk level with color-coded badge. Inputs:riskLevel: ‘low’ | ‘moderate’ | ‘high’ | ‘critical’score: Numeric risk score (0-100)showScore: Whether to display numeric scoresize: ‘sm’ | ‘md’ | ‘lg’
QuickStatsWidgetComponent
Dashboard widget displaying key statistics with icons. Inputs:stats: Array of stat objects with label, value, icon, trend
CarepathTimelineComponent
Visual timeline showing care pathway progress. Inputs:steps: Array of care pathway stepscurrentStep: ID of current active steporientation: ‘horizontal’ | ‘vertical’
stepClick: Emits when step is clicked
PatientHealthChartComponent
Interactive health metrics chart with multiple data series. Inputs:patientId: Patient identifiermetrics: Array of metric types to displaydateRange: Start and end dates
Forms & Input
FilterBarComponent
Reusable filter bar with search, dropdowns, and date pickers. Inputs:filters: Configuration array for filter controlsvalues: Current filter values
filterChange: Emits when any filter changesreset: Emits when filters are cleared
QuestionnaireFormComponent
Dynamic form renderer for questionnaires. Inputs:questionnaire: Questionnaire definitionresponses: Existing responses (for editing)readOnly: Disable editing
submit: Emits form responses on submissionsave: Emits for draft save
CarepathFormComponent
Form for creating/editing care pathways. Inputs:carepath: Existing carepath for editingmode: ‘create’ | ‘edit’
save: Emits carepath data on savecancel: Emits on cancel
PatientFormCompletionComponent
Patient-facing form completion interface. Inputs:formId: Form identifierpatientId: Patient identifier
complete: Emits on form completionback: Emits on back navigation
Communication
ChatTopicsComponent
List of chat topics/conversations. Inputs:topics: Array of chat topicsselectedTopicId: Currently selected topic
topicSelect: Emits when topic is selectednewTopic: Emits when new topic requested
ChatThreadComponent
Message thread display with composer. Inputs:messages: Array of messagescurrentUserId: Current user for message alignment
sendMessage: Emits new message contentattachFile: Emits file attachment
PatientMessagesComponent
Complete messaging interface for patient context. Inputs:patientId: Patient identifier
Modals & Overlays
ToastComponent
Toast notification display. Inputs:message: Notification messagetype: ‘success’ | ‘error’ | ‘warning’ | ‘info’duration: Auto-dismiss duration in ms
RiskConfigModalComponent
Modal for configuring risk scoring thresholds. Inputs:config: Current risk configurationisOpen: Modal visibility state
save: Emits updated configurationclose: Emits on modal close
ReportBugModalComponent
Bug reporting modal for user feedback. Inputs:isOpen: Modal visibility state
submit: Emits bug report dataclose: Emits on modal close
Patient Management
PatientFormsComponent
Patient forms list and management. Inputs:patientId: Patient identifier
formSelected: Emits when form is selected
PatientTasksComponent
Patient tasks list and completion tracking. Inputs:patientId: Patient identifier
taskSelected: Emits when task is selected
PatientAppointmentsComponent
Patient appointments list and scheduling. Inputs:patientId: Patient identifier
PatientMedicationsComponent
Patient medications list and management. Inputs:patientId: Patient identifier
Review & Display
QuestionnaireResponseDisplayComponent
Read-only display of questionnaire responses. Inputs:responses: Array of question responsesquestionnaire: Questionnaire definition
ResponseCardComponent
Card display for individual response item. Inputs:response: Response dataquestion: Question definition
FormReviewCardComponent
Card for form review with approval actions. Inputs:form: Form submission datashowActions: Whether to show approve/reject
approve: Emits on approvalreject: Emits on rejectionviewDetails: Emits on view details click
NurseQuestionnaireReviewComponent
Specialized review interface for clinical staff. Inputs:responseId: Questionnaire response IDpatientId: Patient identifier
approve: Emits on approvalrequestRevision: Emits revision request
Component Guidelines
Styling
- All components use CSS custom properties for theming
- Tailwind CSS utility classes for layout
- BEM-style class naming for custom styles
Accessibility
- ARIA labels on interactive elements
- Keyboard navigation support
- Focus management in modals
- Screen reader announcements
Performance
- OnPush change detection where applicable
- Lazy loading for heavy components
- Virtual scrolling for long lists
Testing
- Unit tests for component logic
- Integration tests for component interactions
- Accessibility audits