Home Applications iris-clinical-assistant

iris-clinical-assistant

InterSystems does not provide technical support for this project. Please contact its developer for the technical assistance.
0
0 reviews
0
Awards
32
Views
0
IPM installs
0
0
Details
Releases (1)
Reviews
Issues
Contest
Natural language querying of patient clinical data.

What's new in this version

Initial Release

IRIS Clinical Assistant

A generative AI application built on InterSystems IRIS for Health that enables natural language querying of patient clinical data.

Project Overview

The IRIS Clinical Assistant leverages vector embeddings and large language models to provide an intuitive way to query patient data stored in FHIR format. Using a Retrieval Augmented Generation (RAG) approach, the system enables natural language queries about patient conditions, medications, and procedures.

Technical Architecture

The solution follows a Retrieval Augmented Generation (RAG) architecture:

  1. Data Pipeline:
    • Fetches FHIR resources (Conditions, Medications, Procedures)
    • Generates patient summaries
    • Creates vector embeddings using sentence-transformers
  2. Storage Layer:
    • Stores embeddings in IRIS database
    • Maintains connections between summaries and patient IDs
  3. Query Processing:
    • Converts natural language queries to embeddings
    • Performs hybrid search for relevant context
    • Generates responses using LLMs

Prerequisites

  • InterSystems IRIS for Health (Community Edition) - can be installed from docker directly with this application
  • Python 3.10 or higher
  • Hugging Face API token (for LLM access)
  • Note: The InterSystems IRIS DB-API package is required for Python applications to connect to IRIS databases. This package is not available on PyPI and must be downloaded from the InterSystems distribution repository. For convenience, the package was already downloaded and placed in the wheels folder for this application.

Installation

  1. Clone repository
git clone https://github.com/dianamindroc/iris-clinical-assistant.git
cd iris-clinical-assistant
  1. Create environment and install requirements
conda create --name intersystemscontest python=3.10
conda activate intersystemscontest
pip install -r requirements.txt 
  1. Start InterSystems IRIS for Health (you can use the provided docker-compose.yml)
docker-compose up -d
  1. The FHIR server needs to be installed inside the container:
docker exec -it  iris session iris
zn ""
zpm "install fhir-server"

Now you can exit the container by entering HALT.

  1. Additionally, we need to make sure that Admin has SQL privileges. For this, go to dashboard, go to System Administration -> Security -> Users -> Go, click on Admin and Roles, Assign %All.

  2. Install IRIS driver wheel (can be downloaded from IRIS website, it was already downloaded and placed in the wheels folder)

cd wheels
pip install intersystems_irispython-3.2.0-py3-none-any.whl
  1. In .env, make sure to update IRIS username, password, namespace and add a HuggingFace token for LLM inference.
  2. Run app
cd ..
python -m app.app
  1. Access localhost:5000 and interact with the app
Made with
Version
1.0.030 Mar, 2025
Category
Integration
Works with
InterSystems IRIS for Health
First published
30 Mar, 2025
Last edited
30 Mar, 2025