Active Properties
Interface Control
Callbacks
Callback Signatures
handleReportreport object matches the structure defined in your template JSON Schema. Example payload:
templateExtras schema — the SDK does not rename or transform fields. The shape of each item is defined by your schema. Pairs with the templateExtras prop. See Clinical Actions (Extras).
onEvent
eventSubscriptions (e.g. ['recording.*', 'activity.*', 'report.*']). Without a subscription nothing is delivered. Payloads only contain enums, booleans and numbers — never clinical text or identifiers. Meant for idle detection and for keeping your system’s session alive while the clinician records (recording.heartbeat). See Activity events.
Contextual Data
Report curation and EMR pre-fill
These props power two report features. See their dedicated guides for the full flow.Activity events
See the full guide, with the event catalogue and the inactivity recipes, in Activity events.
Consent Indicator
The consent status indicator in the header is not a component property. It is enabled through your Omniloy account/profile settings (contact support@omniloy.com to turn it on). When enabled, the indicator reflects thesignedConsent field you provide inside patientdata (see Patient Data) and shows three states: consent signed, not signed, and AI use refused.
Turning this option on does more than show the indicator. If the patient’s signedConsent.aiUse reads "refused", recording and report generation are unavailable in that consultation (recording, dictation, report and clinical actions); the chat stays available, with the reason shown to the doctor. If your HIS does not report aiUse, nothing changes from today’s behaviour.
Localization
The default language is
"es" (Spanish). If your application targets English-speaking users, set language="en" explicitly.Analytics context
Debugging
CSS Customization
SofIA SDK renders as a Web Component with Shadow DOM. This prevents style conflicts with the host application, but it also means the application’s global CSS does not directly affect internal SDK elements. If you need to adjust specific internal styles, inject a<style> tag into the component shadowRoot after the Web Component has been defined and mounted:
#sofia or #sofia-component. In Angular, run this logic in ngAfterViewInit. In AngularJS, call it after configuring the component attributes and callbacks. If the component is mounted conditionally, run the function again after mounting it.
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
Data properties go on the element as attributes; callbacks are assigned as JS properties:Chat-only mode (no report generation)
To use SofIA in chat-only mode, simply omit thetemplate and templateid properties. The generate button will not appear.
Advanced configuration with callbacks
Deprecated Properties
Important Notes
- patientdata: Should only contain information necessary for the clinical context, following data minimization principles.
- 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: Assign callbacks programmatically as JS properties on the element (e.g.,
element.handleReport = fn). They cannot be wired through HTML attributes or global function names.