FHIR - AI and OpenAPI Chain
π» Contributors - Ikram Shah and Sowmiya Nagarajan.
πͺ Built with OpenAI, LangChain & Streamlit
Demo
apichain.demo.mp4
Overview
π€ Ask question to any of your chosen FHIR API in natural language π€
Try online on Streamlit
- Get OpenAI Key from OpenAI Platform
- Get FHIR Server API endpoint
- You may either enter your own sample FHIR server (unauthenticated access needed)
- You may create a temporary sample server in Intersystems IRIS FHIR platform
Try locally using local FHIR server
OpenAI API Key
Get OpenAI Key from OpenAI Platform
Setup Local FHIR Server
- Prerequisites: Git & Docker desktop
- Installation:
$ git clone https://github.com/ikram-shah/fhir-ai-and-openapi-chain.git$ docker-compose up -d - Generate sample patient data ref
./synthea-loader.sh 10docker-compose exec iris iris session iris -U FHIRServerFHIRSERVER>d ##class(fhirtemplate.Setup).LoadPatientData("/irisdev/app/output/fhir","FHIRSERVER","/fhir/r4") - Test FHIR R4 API by visitng http://localhost:32783/fhir/r4/metadata
Streamlit
pip install -r requirements.txt
streamlit run src/streamlit/src/main.py
Folder Structure
fhir-ai-and-openapi-chain/
βββsrc
β βββ streamlit/ //streamlit code
β β βββ src/
β β β βββ main.py
β β β βββ ...
β βββ fhirtemplate/
β βββ setup.cls
β βββ ...
.
.
.
βββ requirements.txt //requirements for streamlit to run
βββ docker-compose.yml
βββ Dockerfile
βββ README.md
βββ LICENSE
Known Limitations
Due to the limitations imposed by OpenAI's token usage, if the reference data + prompt being sent to the OpenAI API exceeds the specified limit, an error may be encountered.
Useful Resouces
FHIR Postman collection by apievangelist
InterSystems IRIS FHIR Documentation
License
This project is licensed under the MIT License.
You can find the full text of the license in the LICENSE file.