Getting Started Using Healthcare Standards FHIR Integration QuickStart

FHIR Integration QuickStart

15 minutes

InterSystems IRIS for Health™ helps you build your FHIR applications quickly and seamlessly. With FHIR® and InterSystems IRIS for Health, you can easily:

  1. Expose discrete resources, improving performance.
  2. Convert data between FHIR and many other healthcare data formats such as HL7® v2 or CDA.
  3. Route, transform, and orchestrate data between disparate applications.
  4. Store FHIR resources in a FHIR resource repository using InterSystems IRIS for Health as your FHIR application development environment.

Watch the video above or try the exercise below.

In this exercise, you will load a sample integration solution that consumes healthcare data — both FHIR resources and HL7 v2 messages — and stores it to a FHIR repository within InterSystems IRIS for Health. You will then retrieve small, discrete FHIR resources such as a patient or a medication, allowing you to optimize your application to work with just the data you need.

tip
Need InterSystems IRIS?
Get a free, online development sandbox here. Log in with your InterSystems login account, or register for one below.

Load sample patient data into preconfigured container

  1. Click the above link to launch the development sandbox, which includes a temporary instance and built-in IDE. No knowledge of coding is necessary to complete this tutorial, as the Learning Labs contain all of the code you will need.
  2. From the IDE, select InterSystems IRIS > Management Portal. On the Management Portal homepage, switch to the FHIRSERVER namespace and navigate to Health > FHIR Configuration > Server Configuration to create a FHIR R4 server endpoint that stores FHIR data as JSON in a FHIR resource repository. Click the plus sign (+) and enter the following settings:
    • Core FHIR package: hl7.fhir.r4.core@4.0.1
    • Additional Packages (optional): hl7.fhir.us.core@3.1.0

    Click Add.

  3. Click the /csp/healthshare/fhirserver/fhir/r4 endpoint you just created and set the Service Config Name to HS.FHIRServer.Interop.Service. Select Allow Unauthenticated Access and click Update.
  4. Again in the Management Portal, switch to the FHIRServer namespace and view the preloaded production by going to Interoperability > Configure > Production. Click Start to run the production.
  5. Now you will load sample data from patient Kris Herman into the FHIR server. Go to the InterSystems IRIS Terminal by selecting InterSystems IRIS > Web Terminal. Then type:
    set $namespace = "FHIRSERVER"
    set sc = ##class(HS.FHIRServer.Tools.DataLoader).SubmitResourceFiles("/home/project/shared/samples-integration-FHIR/R4/data/fhir_json_data","FHIRServer", "/csp/healthshare/fhirserver/fhir/r4")
    

Send discrete FHIR resources to make them easy to retrieve, optimizing speed and performance

FHIR resources are especially useful for low-bandwidth situations, such as on mobile devices. Other healthcare standards often send more data than is needed. However, using FHIR with InterSystems IRIS for Health you can send a single resource, such as a patient, medication, or observation. InterSystems IRIS for Health includes a flexible base implementation of a FHIR server that conforms to the official FHIR specification. See an example in the next several steps.

  1. Go to the Advanced REST Client (or a similar REST client) and get patient Kris Herman using the following values:
    HTTP Request: GET http://YourIP:YourPort/csp/healthshare/fhirserver/fhir/r4/Patient?family=Herman&given=Kris
    note
    Note:
    Remember to replace YourIP and YourPort with the IP and web server port of your InterSystems IRIS instance. Need help finding these?

    Headers:

    • Accept: application/fhir+json
    • Content type: application/fhir+json
  2. You can also get all information about Kris Herman, including related resources such as AllergyIntolerance and Encounter, using $everything. Add this to the end of your URL:
    GET http://YourIP:YourPort/csp/healthshare/fhirserver/fhir/r4/Patient/1/$everything

Easily store FHIR resources centrally, using InterSystems IRIS for Health as your FHIR application development environment

In the previous section, you queried data that was already stored to the InterSystems IRIS for Health FHIR repository. Let’s see how easy it is to consume FHIR data, store it to the FHIR repository, and retrieve it again.

  1. Using your REST client, use the following HTTP request to store a new AllergyIntolerance resource:
    HTTP Request: POST http://YourIP:YourPort/csp/healthshare/fhirserver/fhir/r4/AllergyIntolerance
    Headers:

    • Accept: application/fhir+json
    • Content type: application/fhir+json

    Body: Copy the example from the FHIR website.
    If successful, you should get a 201 Created message.

  2. Retrieve the resource with high criticality you just stored to the FHIR repository:
    HTTP Request: GET http://YourIP:YourPort/csp/healthshare/fhirserver/fhir/r4/AllergyIntolerance?criticality=high

Use integration tools to easily convert between FHIR and legacy HL7 v2 applications

Need to expose your data as FHIR? Using InterSystems IRIS for Health, HL7 v2 data can be consumed, converted to FHIR, and stored in a FHIR repository or sent to other FHIR applications. In this step, you will consume an ADT_A01 HL7 v2 message, store it to the FHIR repository, and then use REST to query for the FHIR resource.

Diagram showing data moving back and forth from FHIR app to IRIS for Health using FHIR, then back and forth from IRIS for Health to two legacy apps using HL7v2 and CDA.

  1. In the IDE, copy the ADT_A01.txt file, located in shared/samples-integration-FHIR/R4/SampleFiles to the shared/samples-integration-FHIR/R4/In folder. InterSystems IRIS for Health will consume this file, convert the contents to FHIR resources, and store the data to the FHIR repository.
  2. If you open the HL7 v2 message from the SampleFiles folder, you will notice the message contains information about the patient Jane Carter. Using the REST client again, you can search for the resource for Jane:
    GET http://YourIP:YourPort/csp/healthshare/fhirserver/fhir/r4/Patient?family=Carter
  3. All messages that are sent through InterSystems IRIS for Health are stored to an internal database, making it easy for you to track, follow, and troubleshoot messages.
    1. Open the Management Portal and go to Interoperability > View > Messages. Choose the message with the source EnsLib.HL7.Service.FileService.
    2. Click Trace on the right, then click View Full Trace. This view shows how messages traverse the integration solution at every step. Notice that the EnsLib.HL7.Service.FileService service consumed the file and is the starting point for this trace. It then sends the HL7 input message to the Demo.FHIRHL7ToFHIRRequestBPL process, which uses a BPL to extract Patient MRN from the incoming message and to subsequently transform the HL7 message into a bundle of FHIR resources (via HS.FHIR.DTL.Util.HC.SDA3.FHIR.Process), using the Patient MRN as the patient resource ID. Then, the transformed output is sent to HS.FHIR.Interop.Operations, which internally stores the FHIR resources in the FHIR repository.
    3. Select the first Request message between HS.FHIRServer.Interop.Operation and HS.Util.Trace.Operations. The HS.Util.Trace.Operations component allows you to display the actual contents of the FHIR message in the Contents pane on the right. Can you find the given name of the patient?
    4. Going back to message list, you can see there is a message with Source equal to HS.FHIRServer.Interop.Service. This is because during initial setup, the FHIR server endpoint’s Service Config Name setting was set to HS.FHIRServer.Interop.Service, and this optional setting allows all FHIR REST messages — such as FHIR search requests — to flow through an interoperability production before reaching the internal FHIR server core.

Watch it happen

Watch a demonstration of the exercise above.