ainqa-clinical-copilot
v2.3.7
Published
Clinical AI assistant — chat, document intelligence, and doctor-patient conversation capture
Readme
ainqa-clinical-copilot
Clinical AI assistant for any web or Electron application. Provides chat, clinical document intelligence, and doctor-patient conversation capture. Powered by DeepInfra LLaMA.
Install
npm install ainqa-clinical-copilot ainqa-voice-assistantQuick Start
import {
CopilotProvider,
CopilotChat,
DocumentUploader,
ConversationRecorder,
} from 'ainqa-clinical-copilot';
<CopilotProvider config={{
deepInfraApiKey: 'YOUR_KEY',
clinicalContext: { patientAge: 68, condition: 'AF' },
onFieldsExtracted: (result) => console.log(result),
onDataExtracted: (fields) => console.log(fields),
}}>
<CopilotChat />
<DocumentUploader />
<ConversationRecorder />
</CopilotProvider>Features
| Feature | Component |
|---------|-----------|
| Chat (streamed) | CopilotChat |
| Document intelligence (PDF/image → structured JSON) | DocumentUploader |
| Doctor-patient conversation capture | ConversationRecorder |
Theming
The package ships with a built-in light theme — drop CopilotProvider
into any host application and the UI renders with a correct baseline
look. No CSS variable configuration is required from the host.
Under the hood, CopilotProvider renders a root container element
(.ainqa-copilot-root) with light-theme CSS custom properties applied
as inline style:
--color-surface-base, --color-surface-raised, --color-surface-overlay,
--color-navy-900, --color-navy-800,
--color-text-primary, --color-text-secondary, --color-text-muted,
--color-border, --color-accent, --color-teal-500,
--color-clinical-red, --color-clinical-green, --color-clinical-amberCustom theming
To override any variable, define it on a descendant element inside
CopilotProvider (a closer ancestor wins the cascade for CSS custom
properties). For example, to apply a dark theme:
<CopilotProvider config={{ ... }}>
<div
style={{
'--color-surface-raised': '#1e293b',
'--color-navy-900': '#0f172a',
'--color-border': '#334155',
'--color-text-primary': '#f1f5f9',
'--color-text-secondary': '#94a3b8',
'--color-text-muted': '#64748b',
} as React.CSSProperties}
>
<CopilotChat />
</div>
</CopilotProvider>Document Pipeline
- Format detection — native PDF / scanned PDF / image
- Text extraction — PDF.js text layer or Tesseract.js OCR
- Classification — LLaMA categorises into one of 8 clinical document types
- Type-specific extraction — fields tailored to each document type
- Structured output — typed JSON returned to host app
