Article
· Jul 6, 2023 2m read

ChatGPT with INTERSYSTEMS FHIR SQL BUILDER database


 

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#

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 

Now let us use irisChatGPT application, Connect to the terminal by using the below command

docker-compose exec iris iris session iris

Create 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")



Thanks

Discussion (5)1
Log in or sign up to continue

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...