Sahl AI Integration Guide for EHR Developers
If you're developing an Electronic Health Record (EHR) system and looking to integrate with Sahl AI, you can choose from two primary integration methods:
- Frontend Integration
- Backend Integration
Each method offers distinct advantages and is suitable for different use cases. Below, we detail each approach to help you choose the best fit for your EHR system.
1. Frontend Integration
Suitable for:
- Web-based EHRs
- Proof-of-concept implementations
- Simple integrations with minimal setup
Key benefits:
- Quick and straightforward implementation
- No need to set up the Sahl AI API
- Ability to leverage existing Sahl AI UI components
Integration methods:
a) Browser Extension:
- Install the Sahl AI Chrome extension
- The extension adds AI capabilities directly to your EHR interface
b) Iframe Embedding:
- Embed
integration.sahl.ai
as an iframe within your EHR - Customize the UI to match your EHR's look and feel
Data Export:
- Sahl AI Iframe will export generated summary and structured information via JavaScript
- Your EHR should listen for window events to receive and process the exported data
Example code for handling exported data:
window.addEventListener("message", function (event) {
if (event.origin !== "https://integration.sahl.ai") return
const data = event.data
if (data.type === "sahl-ai-export") {
// Process the exported data
document.getElementById("note-field").value = data.summary.note
document.getElementById("diagnosis-field").value = data.summary.diagnosis
// Add more fields as needed
}
})
Sample Data
The data is structured as an array of objects. Each object contains a title and a body, where the body is an array of strings that detail the summarized information:
{
"summary": [
{
"title": "Chief Complaint",
"body": ["54-year-old patient experiencing difficulty walking."]
},
{
"title": "History of Presentation",
"body": [
"- Patient reports trouble with walking.",
"- No additional details on duration, timing, location, quality, severity, context, or factors affecting symptoms provided."
]
}
]
}
2. Backend Integration
Suitable for:
- All types of EHRs, including mobile applications
- Deep UI integration requirements
- Highly customized implementations
Key benefits:
- Full control over the user interface
- Seamless integration with existing workflows
- Enhanced data security and privacy controls
Integration method:
- Server-side integration using Sahl AI APIs
Implementation steps:
- Obtain user credentials from Sahl AI
- Set up secure server-to-server communication
- Implement API calls to Sahl AI services
- Process and display results within your EHR interface
Next Steps
- Evaluate both integration strategies based on your EHR's architecture and requirements
- Access our comprehensive integration guides and code samples
- Join our developer community for support and best practices
For any questions or assistance with your integration, please contact our developer support team Here.