
Security News
Feross on TBPN: How North Korea Hijacked Axios
Socket CEO Feross Aboukhadijeh breaks down how North Korea hijacked Axios and what it means for the future of software supply chain security.
@syncorix/clinical-plugin
Advanced tools
Headless SDK for integrating AI-powered clinical consultations into pharmacy and healthcare applications.
npm install @syncorix/clinical-plugin
import { ClinicalConsultationPlugin } from '@syncorix/clinical-plugin';
const plugin = new ClinicalConsultationPlugin({
bffUrl: 'https://your-bff-url.railway.app',
apiKey: 'your-api-key',
accessTokenKey: 'access_token', // localStorage/sessionStorage key for auth token
pharmacyCookieKey: 'pharmacy_id' // localStorage/sessionStorage key for pharmacy ID
});
// Initialize consultation
const sessionId = 'unique-session-id';
const response = await plugin.sync(sessionId, {
patientContext: { age: 30, gender: 'male' },
vitals: { heartRateBpm: 75, temperatureC: 37.2 },
consultationId: 'consultation-id'
});
// Send messages (regular JSON response)
const chatResponse = await plugin.sendMessage(sessionId, 'I have a headache');
console.log(chatResponse.nextQuestion);
console.log(chatResponse.differential);
// Send messages with streaming (specialist phase only)
await plugin.sendMessage(sessionId, 'It started 3 days ago', {
stream: true,
onStream: (event) => {
console.log('Streaming event:', event);
// Update UI progressively as pharmacy AI "thinks"
}
});
// Finalize consultation
await plugin.finalize(sessionId);
new ClinicalConsultationPlugin(config: {
bffUrl: string;
apiKey: string;
accessTokenKey?: string;
pharmacyCookieKey?: string;
})
sync(sessionId: string, context: ConsultationContext)Initialize or hydrate a consultation session.
Returns: Initial response with first question
sendMessage(sessionId: string, message: string, options?)Send a user message and get AI response.
Options:
stream?: boolean - Enable SSE streaming (specialist phase only)onStream?: (event: any) => void - Callback for streaming eventsReturns:
stream: true)finalize(sessionId: string)Complete and persist the consultation to the pharmacy system.
const response = await plugin.sendMessage(sessionId, message);
// Wait for complete response, then update UI
Use when: You want simple request/response pattern
await plugin.sendMessage(sessionId, message, {
stream: true,
onStream: (event) => {
// Receive progressive updates
if (event.type === 'token') {
// Intake phase: progressive token-by-token streaming
console.log('Token:', event.content);
console.log('Accumulated:', event.accumulated);
// Show question appearing word-by-word (ChatGPT style)
}
if (event.type === 'complete') {
// Intake phase: final structured data
console.log('Question:', event.question);
console.log('Checklist:', event.checklist);
// Update UI with complete question and checklist status
}
if (event.question) {
// Specialist phase: pharmacy AI question
console.log('Pharmacy question:', event.question);
console.log('Differential:', event.differential);
// Update UI with diagnostic information
}
}
});
Use when:
Streaming Event Types:
Intake Phase (OpenAI):
// Progressive tokens
{ type: 'token', content: 'How', accumulated: 'How' }
{ type: 'token', content: ' can', accumulated: 'How can' }
{ type: 'token', content: ' I', accumulated: 'How can I' }
// ... more tokens ...
// Final complete response
{
type: 'complete',
question: 'How can I help you today?',
checklist: { chief_complaint: '', onset: '', ... }
}
Specialist Phase (Pharmacy API):
// Pharmacy API events (format depends on pharmacy API)
{
question: 'Where is your headache located?',
differential: [
{ label: 'Migraine', probability: 0.45 },
{ label: 'Tension Headache', probability: 0.35 }
],
text: 'Location Assessment',
...
}
Both phases support streaming and JSON modes. The plugin automatically detects the phase and handles streaming appropriately.
MIT import reactDom from 'eslint-plugin-react-dom'
export default defineConfig([ globalIgnores(['dist']), { files: ['**/*.{ts,tsx}'], extends: [ // Other configs... // Enable lint rules for React reactX.configs['recommended-typescript'], // Enable lint rules for React DOM reactDom.configs.recommended, ], languageOptions: { parserOptions: { project: ['./tsconfig.node.json', './tsconfig.app.json'], tsconfigRootDir: import.meta.dirname, }, // other options... }, }, ])
FAQs
Headless Clinical AI SDK
We found that @syncorix/clinical-plugin demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Security News
Socket CEO Feross Aboukhadijeh breaks down how North Korea hijacked Axios and what it means for the future of software supply chain security.

Security News
OpenSSF has issued a high-severity advisory warning open source developers of an active Slack-based campaign using impersonation to deliver malware.

Research
/Security News
Malicious packages published to npm, PyPI, Go Modules, crates.io, and Packagist impersonate developer tooling to fetch staged malware, steal credentials and wallets, and enable remote access.