ChatGPT with INTERSYSTEMS FHIR SQL BUILDER database
.png)
The FHIR® SQL Builder, or Builder, is a component of InterSystems IRIS for Health. It is a sophisticated projection tool used to create custom SQL schemas using data in an InterSystems IRIS for Health FHIR repository without moving the data to a separate SQL repository. The Builder is designed specifically to work with FHIR repositories and multi-model databases in InterSystems IRIS for Health.
The objective of the Builder is to enable data analysts and business intelligence developers to work with FHIR using familiar analytic tools, without having to learn a new query syntax. FHIR data is encoded in a complex directed graph and cannot be queried using standard SQL syntax. A graph-based query language, FHIRPath, is designed to query FHIR data, but it is non-relational. Enabling a data steward to create a customized SQL projection of their FHIR repository, using tables, columns, and indexes, the Builder makes it possible for data analysts to query FHIR data without the complexity of learning FHIRPath or the FHIR search syntax.
The repository will load FHIR Resources, All you need is to configure FHIR SQL BUILDER.
For configuration, Navigate to http://localhost:55037/csp/fhirsql/index.html#/ .png)
For more details about how to do configuration, please watch this Tutorial Video
To view the configurations, Navigate to http://localhost:55037/csp/fhirsql/index.html#/spec/1
.png)
Now let us use irisChatGPT application, Connect to the terminal by using the below command
docker-compose exec iris iris session irisCreate a new instance of dc.irisChatGPT class and use SetApiKey method to set OpenAI API Key
set chat = ##class(dc.irisChatGPT).%New()
do chat.SetAPIKey("Enter your Open API Key here").png)
.png)
.png)
.png)
.png)
.png)
.png)
Thanks
Comments
Hi Muhammad,
Thank you for putting this demo together.
When I go to http://localhost:55037/csp/fhirsql/index.csp# to configure FHIR SQL BUILDER, I get the following:.png)
The IRIS instance is running and is healthy as seen:
.png)
Please advice what the issue might be.
Thank you.
Hi @Piyush Adhikari
Thanks for highlighting the issue.
Please modify index.csp to index.html as mentioned below:
http://localhost:55037/csp/fhirsql/index.html#/
Regards
Muhammad Waseem
I bet that the issue is related to the fact that recently IRIS 2023.2 was released. This version removed this method InstallFoundation from this class HS.HC.Util.Installer. This was a private method and it was not documented. But it was widely used by the community to install FHIR server.
TL;DR :
Change :
do ##class(HS.HC.Util.Installer).InstallFoundation()
to
Do ##class(HS.Util.Installer.Foundation).Install(namespace)
cf : https://community.intersystems.com/post/installfoundation-method-missing-iris-20232
Thanks, @Guillaume Rongier for the suggested solution.
Thank you @Muhammad Waseem
Just leaving the link to the documentation that mentions that link to access FHIR SQL Builder here.
