BLUE INTEGRATOR

MANAGE CHANGES BETTER

BLUE INTEGRATOR – HL7

There are many different variants of database management solutions with BlueIntegrator. Below we show a possible alternative.

Before entering BlueIntegrator, a database must be created. This database will act as a destination for our data. In this example, we will create a separate database that can keep the information with the following three tables: InsuranceIN2, IO_Message and Patient.

hl7_database_insurance

hl7_database_io_message

hl7_database_patient

Create a Receive Scheme

The first thing that has to be done in the process of managing a database with BlueIntegrator is to create a Receive scheme. You can easily do this by clicking on “Import HL7 Schema”. You now get a box where you can choose between different versions and types of messages (see image below). In this example, version 2.5 and ADT_A01 message are used. Click OK to proceed.

import_schema_adt_a01_600x280

The Receive schedule is now imported. This is shown under Schemes → Selected Version.

hl7_schema_adt_a01_600x280

Create a Send Schedule

For Send Schedule, you can either import the same HL7 schedules as when creating the Receive Schedule or choose another type of schema by right-clicking Schedule in the Explorer and selecting New Schedule. Here you can also import a separate schema. Under the Tools option, you can choose to import an already existing schedule that meets the needs of an outgoing file.

hl7_schema_xml_600x280

hl7_schema_special_schema_600x280
hl7_schema_special_schema_val_600x280

(In our example, we will only need one schedule when we choose to use the same as for Recieve)

Create and configure the Receive port

The next step in the process is to create a Receive port that connects to the Receive schema. The first step in this step is to right-click Recieve Port in the explorer and select New Receive Port.

hl7_rec_port_600x280

Name the gate, in this case we have chosen to rename it to rec_ADT_A01. In the next mode, select your new schedule and then choose how to receive the data. In this example, we use “File Receive”.
hl7_rec_port_filerec_600x280

Now, choose which folder rec_ADT_A01 should listen to. In this example we have chosen to look only for .xml files. Remember to select server under the Server tab.
hl7_rec_port_folder_600x280

Even in the Routing menu, a destination port must be added, but this is not possible before a Send port is available

hl7_rec_port_routing_600x280

Create and configure Send Port

Now it’s time to create a Send port so that the information can be submitted to the previously created database. Start by right-clicking Send Port and select New Send Port.

hl7_snd_port_600x280

Rename the port to something fitting, in this example it’s called snd_ADT_A01. In the next step, choose a scheme, in this example we will select the same as in rec_ADT_A01. Now select Hierarchical Database.

hl7_send_port_hdb_600x280

Begin by connecting to your database under Database Connection.

hl7_snd_port_serverconn_600x280

Now it’s time to create insert querys. First, you create one that can connect PID to your table: Patient. Click PID in the list on the left and type your query: insert into Patient (fk, PatientId, familyname, givenname) values (@fk, @patientid, @familyname, @givenname).

hl7_snd_port_query_pid_600x280

Parameters will be created automatically. For each parameter you enter into your query, start with a “@”. Now it’s time to connect a value to the parameters, by choosing which Value Type to use. XPath means that you can select parameters directly via <Browser> on each value if you have a schedule linked to your port.

hl7_snd_port_query_pid_xpath_600x280

hl7_snd_port_query_pid_browes_600x280

In this step it’s time to handle IN2 in the same way as PID and link it to the table: InsuranceIN2: Insert into InsuranceIN2 (fk, InsuredEmployeeID, InsuredEmployerID, EmployerInformationData) values (@fk, @InsuranceEmployeeID, @InsuredEmployerID, @EmployerInformationData. Do not forget to choose server under Server tab Even on Send Port. Click OK. Now it’s time to make the final step on the Receive port, the routing where you add Send Port.

Mapping

In this example, no mapping is required because we use the same schedule in and out, but below is an example of how easy mapping is.

Right-click Maps in the Explorer and select New Map. Now select an in-schedule and an outline that will be done at the top of each page.

hl7_maping_600x280

Now, just match the respective elements with each other. In this example they are identical, but in the case when they are not, it may look very different.

hl7_maping__lines_600x280

As mentioned earlier, we do not need mapping in this example, but if needed later, mapping is added under the mapping tab to either receive or send port.

Test how BlueIntegrator converts and transforms HL7_msg → Database.

The first thing you need to do is open the patient table. In this example there is a row there because the patient table is already driven once for the test.

hl7_test_patient_600x280

Here’s what the InsuranceIN2 table looks like (just like the patient table, this table is empty for the first time)

hl7_test_insurance_600x280

Now it’s time to enter ADT_A01.xml containing the information you need for the test in the folder that rec_ADT_A01 is listening to.

hl7_test_xml

Look in the database again, if a row has been added, the test is successful!

hl7_test_patient_2_600x280
hl7_test_insurance_2_600x280

It is easy to convert and transform information using BlueIntegrator. All you have to do is select file type, look and configure ports.