Examples you can use to learn the main ideas involved in HealthCare Interoperability using InterSystems IRIS for Health.
You can find more in-depth information in https://learning.intersystems.com.
👉 Slides available here Healthcare-Interop-Workshop.pdf
- Git
- Docker (if you are using Windows, make sure you set your Docker installation to use "Linux containers").
- Docker Compose
- Visual Studio Code + InterSystems ObjectScript VSCode Extension
Build the image we will use during the workshop:
git clone https://github.com/intersystems-ib/workshop-healthcare-interop
cd workshop-healthcare-interop
docker compose build
- Run the containers we will use in the workshop:
docker compose up -d
Open workshop-healthcare-interop
folder in VS Code.
- Open the Management Portal.
- Login using the default
superuser
/SYS
account. - Interoperability > Namespace INTEROP > List > Productions > Demo.Loan.FindRateProduction > Open
- Start Production
- Have a look at the Business Services, Business Processes and Business Operations.
- Click on the connector (green ball) to see how the components are linked.
- See the Legend to understand the meaning of the different colors of the components.
- Click on
Demo.Loan.WebOperations
- Go to Actions tab > Test > Choose a
Demo.Loan.CreditRatingRequest
message. - Enter some input and see the output in the resulting Visual Trace.
- Have a look at the involved Business Operation and Messages in VS Code.
- Open http://localhost:52773/csp/healthshare/interop/DemoLoanForm.csp and enter some data (you can test with different values).
- Go back to your production and open the Message Viewer.
- Have a look at the messages, go through some of the traces.
- Pay attention to the elements involved, sync/async calls, message contents and possible errors or alerts thrown.
- Back in Demo.Loan.FindRateProduction Production, click on
Demo.Loan.FindRateDecisionProcessBPL
. - On the settings tab, click on the magnifyer icon on the Class name setting.
- Inspect the graphical BPL definition of the process.
- When you are done, stop the production.
- Interoperability > Namespace INTEROP > List > Productions > Demo.HL7.MsgRouter.Production > Open
- Start production.
- Have a look at the production, notice the prebuilt HL7 Business Services and Operations that are being used.
- Explore the settings on those services and operations (e.g. FilePath, etc.)
- In your VS Code with
workshop-healthcare-interop
opened, copytest/*.txt
files intotest/in
subdirectory. - Go back to the production and see Message Viewer.
- Explore some the new messages that have appeared. Notice the HL7 messages.
- Back in Demo.HL7.MsgRouter.Production Production configuration page, click on
XYZ_Router
. - Click on the magnifying glass on Business Rule Name in the Settings Tab.
- Notice the different routing rules based on the content of the HL7 messages.
- Find some of the rules that are using a Data Transform.
- Double-click on the Data Transform element and open the DTL Editor.
- Have a look at how can messages be transformed.
Let's say that now you need to grab incoming ORM^O01
messages from XYZ facility and create files with some patient data to send to other systems.
So, you will need to figure out how to:
- Process incoming XYZ_HL7FileService
ORM^O01
HL7 message - Extract patient data: medical record number, name, etc.
- Write that information into a file
You can follow these guidelines and try to implement it on your own:
-
Create a new message
interop.msg.PatientDataReq
that will contain your patient data. Check documentation about defining messages. -
Create a new Business Operation
interop.bo.PatientFileOperation
using EnsLib.File.OutboundAdapter. This operation will write your patient data to a file. Have a look at the documentation so you can see what's the structure that you need. -
Add your business operation to production and test it.
-
Create a data transformation
interop.dt.ormO01toPatientDataReq
to transform ORM^O01 HL7 messages intointerop.msg.PatientDataReq
so you can extract patient information. Test your data transformation. -
Modify XYZ_Router rules so you can grab ORM^O01 messages, transform them using
interop.dt.ormO01toPatientDataReq
and finally sending them to your business operation.
Create FHIR server in Health > FHIRREPO > FHIR Configuration > Server Configuration as:
- Endpoint:
/csp/healthshare/fhirrepo/fhir/r4
- Core FHIR package:
hl7.fhir.r4.core@4.0.1
Load some sample FHIR data into repo using WebTerminal.
zn "FHIRREPO"
set sc = ##class(HS.FHIRServer.Tools.DataLoader).SubmitResourceFiles("/app/install/simple-fhir-data/","FHIRServer","/csp/healthshare/fhirrepo/fhir/r4")
Open the Postman collection included in workshop-healthcare-interop.postman_collection.json and try some requests on FHIR Repo. Simple
and FHIR Repo. Queries
.
Build a fhir client to send some requests to a FHIR server.
Have a look at the interop.Production production:
interop.bs.FHIRFileService
- Business Service that reads a file and creates aHS.FHIRServer.Interop.Request
message.interop.bp.FileToFHIRService
- Business Process that prepareHS.FHIRServer.Interop.Request
from service before sending to external FHIR server.HS.FHIRServer.Interop.HTTPOperation
- built-in Business Operation that sends a FHIR request to an external FHIR server.
Run some tests:
- Start the production
- Copy
data/patient.json
intodata/fhir-input
to process a sample file in your production.
In this scenario you need to receive FHIR requests in an interoperability production, maybe manipulate them and finally send that requests to a FHIR server.
In case you need to forward a FHIR request to an external server you can use simple FHIR Interoperability Adapter in InterSystems IRIS or HealthShare Health Connect.
You can find more information in FHIR Interoperability Adapter.
You need to install the FHIR interoperability adapter before using it in a namespace. During the adapter installation it will create:
- A web application for your FHIR server endpoint.
- An
InteropService
andInteropOperation
in your production.
Install the adapter using WebTerminal:
zn "INTEROP"
set status = ##class(HS.FHIRServer.Installer).InteropAdapterConfig("/myendpoint/r4")
Test your service using the Postman collection in workshop-healthcare-interop.postman_collection.json and running some requests in Interop
directory.
Latest release of IRIS For Health introduces some interesting features such as FHIR Object Classes.
So keep in mind that you just can use objects to work with FHIR content as you need:
set file = ##class(%Stream.FileCharacter).%New()
set file.Filename = "/app/data/patient.json"
set json = {}.%FromJSON(file)
set patient = ##class(HS.FHIRModel.R4.Patient).fromDao(json)
zw patient.name.get(0).family
What about running analytics on top of a FHIR repository? Well, FHIR model is a directed graph, so it's not trivial.
However, you can have a look at a new experimental feature: InterSystems FHIR SQL Builder.
FHIR SQL Builder is a tool that allows you to create your SQL schemas using data from your FHIR repository without moving the data to a separate SQL repository.
You will need to go through three simple steps:
Access FHIR SQL Builder and create a New Analysis:
- New FHIR repository
- Name:
fhirrepo
- Host:
localhost
- Port:
52773
- Credentials: create new credentials using
superuser
/SYS
- FHIR repository endpoint:
/csp/healthshare/fhirrepo/fhir/r4
Create a New Transformation Specification.
Add some FHIR fields that will be projected as SQL, you can try the following:
Patient.gender
Observation.code.coding.code
Observation.valueQuantity.value
Simply create a New Projection specifying the package you want to use for your projection (e.g. demo
).
After that, you can access your data using SQL!
In your workshop you have included a JupyterLab Notebook to play with the data :)