Initial Release
Revolutionize patient care with our groundbreaking app, AIQuery, which turns complex data queries into simple, natural language requests, leveraging the power of AI. In the fast-paced world of healthcare, identifying patients with gaps in care is crucial for enhancing care quality, patient satisfaction, and achieving superior outcomes. Yet, many organizations struggle with outdated systems, relying on inefficient manual processes that are costly and error-prone.
Clinovera addresses these challenges head-on by enabling healthcare professionals to effortlessly identify patients in need of attention and suitable candidates for clinical trials.
Our AI-based eligibility query tool dramatically simplifies finding patients with gaps in care and identifying cohorts of patients for clinical trials and studies. We loaded FHIR resources for test patients into IRIS and exposed them to the AI query tool using IRIS FHIR SQL builder. The AI tool recognizes requests against heterogeneous data sources, asks clarifying questions and executes asynchronous tasks.
Utilizing AIQuery is straightforward and designed with the user in mind. Begin by simply typing or speaking your query into the app, using natural language as if you were asking a colleague.
Here’s how our solution stands out:
Functionality: This container runs an InterSystems FHIR database. The database schema is meticulously crafted using the FHIR SQL Builder, ensuring an optimized structure for storing and retrieving patient information efficiently and securely.
Front-End Interface: The .NET application features a user-friendly front-end interface. Users can input their data queries into a text box, making the process of data retrieval straightforward and accessible.
Integration with OpenAI: Utilizing the OpenAI API, the application translates natural language queries into precise SQL commands. This innovative approach allows users without SQL knowledge to interact with the database effortlessly.
Data Retrieval: The generated SQL queries interact with the InterSystems FHIR database to fetch requested patient data, demonstrating a seamless integration between the front-end interface and the database.
Make sure you have git and Docker desktop installed.
Clone/git pull the repo into any local directory
$ git clone https://github.com/flnaves-firstline/ai-query.git
The application requires an OpenAI API key to work. Insert the key to the src/app/PatientQuery.Back/appsettings.json config file in the OpenAi.ApiKey
field
...
"OpenAi": {
"Url": "https://api.openai.com",
"ApiKey": "your-openai-api-key-here",
...
Open the terminal in this directory and run:
$ docker-compose up -d
After successful launch, you can open the application in the browser http://localhost:5000
NOTE: It may take a couple of minutes before opening the application until the databases in the containers are initialized
The template goes with 19 preloaded patents in /data/fhir folder which are being loaded during docker build
You can generate more patients doing the following. Open shel terminal in repository folder and call:
docker run --rm -v $PWD/output:/output --name synthea-docker intersystemsdc/irisdemo-base-synthea:version-1.3.4 -p 10
this will create 10 more patients in data/fhir folder.
Then open IRIS terminal in FHIRSERVER namespace with the following command:
docker-compose exec iris iris session iris -U FHIRServer
and call the loader method:
do ##class(HS.FHIRServer.Tools.DataLoader).SubmitResourceFiles("/home/irisowner/irisdev/app/output/fhir/", "FHIRSERVER", "/fhir/r4")
with using the following project
Open URL http://localhost:52773/fhir/r4/metadata
you should see the output of fhir resources on this server
Open Postman and make a GET call for all preloaded Patient:
http://localhost:52773/fhir/r4/Patient
Access the FHIR SQL Builder view at http://localhost:52773/csp/fhirsql/index.html#/ to verify if all settings have been uploaded:
Open Intersystems SQL Editor http://localhost:52773/csp/sys/exp/%25CSP.UI.Portal.SQL.Home.zen?$NAMESPACE=FHIRSERVER and perform the following query:
SELECT
ID, BirthDate, DeceasedDateTime, Gender, IdentifierValue, Key, UsCoreEthnicityOmbCategoryValueCodingDisplay, UsCoreEthnicityTextValueString, UsCoreEthnicityUrl, UsCoreRaceOmbCategoryValueCodingDisplay, UsCoreRaceTextValueString, UsCoreRaceUrl
FROM TransformationSparta.Patient
ERROR #5001: Error -28 Creating Directory /usr/irissys/mgr/FHIRSERVER/
If you see this error it probably means that you ran out of space in docker.
you can clean up it with the following command:
docker system prune -f
And then start rebuilding image without using cache:
docker-compose build --no-cache
and start the container with:
docker-compose up -d
This and other helpful commands you can find in dev.md
Experience AIQuery in action through these simple steps:
AIQuery isn’t just an app; it’s a revolution in healthcare data management. By translating free-form human requests into precise SQL queries against the FHIR database, it opens up a world of possibilities without the need for technical expertise or understanding complex data models.
Transform the way you manage healthcare data with AIQuery. Dive into a seamless, efficient, and user-friendly experience that puts powerful data queries at your fingertips, all through the simplicity of natural language. Try AIQuery today and step into the future of healthcare analytics.
Team