JSPM

  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 207
  • Score
    100M100P100Q100442F
  • License AGPL-3.0 OR LicenseRef-Commercial

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

Package Exports

  • @omniloy/sofia-sdk
  • @omniloy/sofia-sdk/webcomponents

Readme

Sofia SDK

npm version License: AGPL v3 TypeScript

AI-powered medical assistant web component for healthcare applications.

Documentation & Support:

Installation

npm install @omniloy/sofia-sdk

Quick Start

import '@omniloy/sofia-sdk';

<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"]
  }'>
</sofia-sdk>

Option 2: Script Tag

<script src="https://unpkg.com/@omniloy/sofia-sdk@latest/dist/webcomponents.umd.js"></script>

<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": {"diagnosis": {"type": "string"}}, "required": ["diagnosis"]}'
  templateid='1234'
  >
</sofia-sdk>

Handling Generated Reports

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"

Getting Credentials

Contact support@omniloy.com to obtain:

  • API Key: Authentication credentials
  • Base URL: Your API endpoint
  • WebSocket URL: Real-time connection endpoint

Features

  • 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

Technical Requirements

  • HTTPS connection: TLS required for audio functionalities
  • Modern browser: Chrome 88+, Firefox 78+, Safari 14+, Edge 88+
  • WebSocket support: For real-time features

License

Dual-licensed: AGPL-3.0 for open source, Commercial License for proprietary use.

For commercial licensing: omniloy.com