Healthcare AI agent sidecar for OpenEMR — clinical decision support with drug interaction checking, patient data retrieval, and safety verification
Project description
openemr-agent
Healthcare AI agent sidecar for OpenEMR -- clinical decision support with drug interaction checking, patient data retrieval, and safety verification.
Features
- 8 clinical tools: patient lookup, medications, allergies, problems, vitals, appointments, drug interaction checking (NLM RxNorm), allergy-drug cross-check
- 3 verification checks: interaction severity flagging, allergy conflict detection, prescriptive language guard
- LangGraph state machine: 5-node agent with conditional tool routing
- Built-in observability: request/LLM/tool latency tracking, token usage, error categorization, eval regression detection
- FastAPI server:
/chat,/metrics,/health,/feedbackendpoints - OAuth2 integration: SMART on FHIR scopes for secure OpenEMR API access
Quick Start
pip install openemr-agent
Create a .env file:
XAI_API_KEY=your-xai-key
OPENEMR_BASE_URL=http://localhost:8300
OPENEMR_CLIENT_ID=your-oauth-client-id
OPENEMR_CLIENT_SECRET=your-oauth-client-secret
LANGCHAIN_API_KEY=your-langsmith-key # optional
Run the agent:
uvicorn app.main:app --host 0.0.0.0 --port 8080
Architecture
See docs/architecture.md for the full architecture document including the agent state machine, verification strategy, and observability setup.
Cost
See docs/cost-analysis.md for production cost projections. TL;DR: ~$0.002 per clinical query using Grok 3 Mini Fast.
License
GNU General Public License v3 -- same as OpenEMR.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file openemr_agent-0.1.0.tar.gz.
File metadata
- Download URL: openemr_agent-0.1.0.tar.gz
- Upload date:
- Size: 7.3 MB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.14.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
2109b60c38ecbfd6a0391e071cfca949d21244db7d1714d28f7c92c6db6d2f28
|
|
| MD5 |
050c71dd0f86f99c5007d10a18dc8f35
|
|
| BLAKE2b-256 |
ccbf10729b6810be0f135c2b9a9e5ea020d0ab296774200a61e66b905cb6b6ae
|
File details
Details for the file openemr_agent-0.1.0-py3-none-any.whl.
File metadata
- Download URL: openemr_agent-0.1.0-py3-none-any.whl
- Upload date:
- Size: 30.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.14.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
5956c84fec35cd42d199a39cc47a956c5a6af967d1d342a97a3b48f1da3b3ce4
|
|
| MD5 |
b87e063e9367d9bcbad5167851e9a1a4
|
|
| BLAKE2b-256 |
e4c59836c06426dbccd93fd23569a1833392ff8ead10e058e6b17901dceb4e0e
|