Interface Control
| Property | Type | Description |
|---|---|---|
| isopen | boolean | Component visibility state, allows bidirectional control of the open/closed state |
Callbacks
| Property | Type | Description |
|---|---|---|
| handle-report | function | Callback function that receives the structured clinical report generated by SofIA. Can be referenced as a global function or use events |
| set-is-open | function | Callback function to handle visibility changes requested by the component |
Contextual Data
| Property | Type | Default Value | Description |
|---|---|---|---|
| patientdata | string (JSON) | object | undefined | Contextual patient information (background, previous notes, referrals) to enrich clinical processing |
| transcriptorselectvalues | string (JSON) | undefined | Configuration for the audio transcriber’s selector values |
Feature Control
| Property | Type | Default Value | Description |
|---|---|---|---|
| isonlychat | boolean | false | Hides the audio transcription module, keeping only the chat functionality |
| disableactions | boolean | false | Disables all action buttons (Generate, Fill) |
| disablegenerate | boolean | false | Disables only the Generate button, keeping Fill active |
UI Customization
| Property | Type | Default Value | Description |
|---|---|---|---|
| sofiatitle | string | "Sofia Assistant" | Text displayed in the component’s header |
Debugging
| Property | Type | Default Value | Description |
|---|---|---|---|
| debug | boolean | false | Enables detailed logging for debugging purposes |
Localization
| Property | Type | Default Value | Description |
|---|---|---|---|
| language | string | "es" | Interface language. Supported values: "es" (Spanish), "en" (English) |
UI States
| Property | Type | Default Value | Description |
|---|---|---|---|
| isscreenloading | boolean | false | Forces the global loading indicator to be displayed in the component |
Advanced Callbacks
| Property | Type | Default Value | Description |
|---|---|---|---|
| render-report-content | function | undefined | A function to customize the rendering of the report’s content |
| set-get-last-report | function | undefined | A callback that receives a function to retrieve the last generated report |
| toast | string (JSON) | undefined | Configuration for toast notifications to display messages to the user |
Manual Report Retrieval
In addition to receiving the report automatically, you can request it on-demand from your application. Theset-get-last-report property executes a callback that provides you with an asynchronous function. You should store this reference to use it whenever you need to retrieve the last generated report.
Usage Examples
Basic setup with patient data
Chat-only mode for quick consultations
Configuration with limited actions and data sources
Advanced configuration with callbacks
Important Notes
- patientdata: Should only contain information necessary for the clinical context, following data minimization principles.
- Dimensions: Units can be px, %, em, rem, or any other valid CSS unit.
- States: Changes in boolean properties are immediately reflected in the interface.
- Localization: Changing the language affects the entire component interface, including error messages and labels.
- Callbacks: Functions can be referenced by their global name or handled via DOM events.