Sofia SDK - AI-powered medical assistant web component for healthcare applications



AI-powered medical assistant web component for healthcare applications.
Documentation & Support:
- Official Documentation
- Examples Repository
- Report Issues
``bash`
npm install @omniloy/sofia-sdk
javascript
import '@omniloy/sofia-sdk'; baseurl="your-base-url"
wssurl="your-wss-url"
apikey="your-api-key"
userid="dr-garcia-123"
patientid="patient-456"
toolsargs='{
"$schema": "http://json-schema.org/draft-07/schema#",
"title": "Medical Consultation",
"type": "object",
"properties": {
"chief_complaint": {"type": "string", "description": "Primary reason for visit"},
"diagnosis": {"type": "string", "description": "Medical diagnosis"},
"treatment_plan": {"type": "string", "description": "Recommended treatment"}
},
"required": ["chief_complaint", "diagnosis"]
}'>
`$3
`html
baseurl="your-base-url"
wssurl="your-wss-url"
apikey="your-api-key"
userid="dr-garcia-123"
patientid="patient-456"
toolsargs='{"$schema": "http://json-schema.org/draft-07/schema#", "title": "Medical Consultation", "type": "object", "properties": {"diagnosis": {"type": "string"}}, "required": ["diagnosis"]}'
templateid='1234'
>
`$3
`javascript
const sofiaComponent = document.querySelector('sofia-sdk');// Handle medical reports
sofiaComponent.handleReport = (report) => {
console.log('Medical report generated:', report);
// Integrate with your medical records system
saveToEHR(report);
};
// Control component visibility
sofiaComponent.setIsOpen = (isOpen) => {
console.log('Component status:', isOpen ? 'Open' : 'Closed');
};
`Required Configuration
All properties below are mandatory for proper SDK functionality:
| Property | Type | Description |
|----------|------|-------------|
| baseurl |
string | SofIA REST API endpoint (HTTPS required) |
| wssurl | string | WebSocket URL for real-time streaming (WSS required) |
| apikey | string | Authentication key provided by Omniloy |
| userid | string | Unique identifier of the healthcare professional |
| patientid | string | Unique identifier of the patient for the session |
| toolsargs | string | JSON Schema Draft-07 defining clinical data structure - mandatory if isonlychat is not "true" |
| templateid | string` | The current template Id - mandatory if isonlychat is not "true" |Contact support@omniloy.com to obtain:
- API Key: Authentication credentials
- Base URL: Your API endpoint
- WebSocket URL: Real-time connection endpoint
- Real-time medical transcription: Voice-to-text conversion optimized for medical terminology
- Intelligent report generation: AI-powered clinical documentation
- HIPAA compliant: Enterprise-grade security and privacy
- Framework agnostic: Works with any web framework or vanilla JavaScript
- WebSocket streaming: Real-time bidirectional communication
- Customizable schemas: Define your own clinical data structures
- HTTPS connection: TLS required for audio functionalities
- Modern browser: Chrome 88+, Firefox 78+, Safari 14+, Edge 88+
- WebSocket support: For real-time features
Dual-licensed: AGPL-3.0 for open source, Commercial License for proprietary use.
For commercial licensing: omniloy.com