
For the hands-on lessons, I highly recommend two monitors.
One monitor with Mirth Connect opened.
Second monitor with Udemy course opened.
This will be a huge help, so that you may quickly switch between Mirth and Udemy lessons.
Before Mirth can be installed, you will need to determine which version of Java you need. This section will help you with Java/Mirth compatibility.
For this course, install one of the following versions:
Mirth 3.3.1 (can find in archives download)
Mirth 3.4.2 (can find in archives download)
Mirth 3.6.0 (latest version - can find on nextgen.com site)
Either one of these versions will work for hands-on lessons.
For this course, install one of the following versions:
Mirth 3.3.1 (can find in archives download)
Mirth 3.4.2 (can find in archives download)
Mirth 3.6.0 (latest version - can find on nextgen.com site)
Either one of these versions will work for hands-on lessons.
For this course, install one of the following versions:
Mirth 3.3.1 (can find in archives download)
Mirth 3.4.2 (can find in archives download)
Mirth 3.6.0 (latest version - can find on nextgen.com site)
Either one of these versions will work for hands-on lessons.
In this section, you will find a zip file name "xml to hl7.zip". To follow along, please download it and unzip the file. You will then import the Mirth Connect interface channel to use for this section and continue following along.
If you don't already have Mirth Connect installed on your machine, see below for the link to version 3.4.2. Mirth can be installed on both Windows and Mac computers. Feel free to download Mirth version 3.4.2 or the latest version (whatever it may be right now).
Let's get started...
Unzip the xml to hl7.zip file you just downloaded.
The zip file contains 3 files:
1) XmlSample.txt - a sample FHIR Patient Resource used to test the Mirth interface.
2) XML to HL7v2 Mirth Channel v3.4.2.xml - The Mirth Channel (or interface) that contains all the FHIR to HL7 transformations.
3) ReadMe.txt - Also, there is a README.txt file in the zip file for more information.
How to Import an interface channel into Mirth Connect:
1) Open Mirth Connect (version v3.3.1, v3.4.2 or v3.6.0). If you don't yet have it, the link is below.
http://downloads.mirthcorp.com/archive/connect/
2) On the left-hand side, under "Mirth Connect" section, click "Channels".
3) Import the channel file XML to HL7v2 Mirth Channel v3.4.2.xml (see lesson resources). See video below.
During import channel process, if Mirth asks you if you want to upgrade/convert the channel (similar to image below), please select YES. Newer Mirth versions are backwards compatible.
Watch video in this lecture for help on how to import the XML to HL7v2 Mirth Channel v3.4.2.xml channel. The same process applies to all versions of Mirth: 3.3.1, v3.4.2 and v3.6.0.
Next we want to take a look at the interface's inbound and outbound templates.
1) Open the XML to HL7v2 channel you imported in the last section.
2) Go to SOURCE > EDIT TRANSFORMER > MESSAGE TEMPLATES (see video below)
3) Notice the Inbound Message Template Data Type is XML. (see video above)
Notice the Outbound Message Template Data Type is HL7 v2.x. (see video above)
These are the inbound and outbound message formats the interface will use to transform FHIR XML to HL7 v2. These are the only 2 message formats that Mirth will accept in this channel. If you send in or send out any other format, Mirth will throw an error similar to the one in the video. Continue to video...
In this lesson, we will be working in Mirth's Source Transformer to map and transform FHIR to HL7 v2.
There are 5 transformation steps in the SOURCE TRANSFORMER.
In the Javascript code, the MSG object represents the XML inbound template.
In the Javascript code, the TMP object represents the HL7 outbound template.
======================================================================
You will see 3 segment steps and 2 translation steps (see image below).
1) MSH Segment - there are no transformations in this section, so the MSH segment in the Outbound template will be used.
MSH|^~\&|AccMgr|1|||20050110045504||ADT^A08|599102|P|2.3|||
2) EVN Segment - there are no transformations in this section, so the EVN segment in the Outbound template will be used.
EVN|A01|20050110045502|||||
3) PID Segment - Here you will find Javascript code for transformation and mapping from FHIR XML to HL7 v2. To save time, you can drag and drop from the template window to the scripting window.
4) Gender Translation - This translation step maps PID-8 to the XML gender object, then translates the value.
5) Address Type Translation - This translation step maps PID-11 to the FHIR address.use object, then translates the values indicated.
See video in next section for demonstration...
If you have made any changes you would like to keep...
1) Save your channel (see video).
2) Deploy your channel (see video).
To Test This Channel/Interface:
1) Open up the xmlsample.txt file you downloaded from zip file, and copy ALL the contents of the file.
2) Go to the Mirth Dashboard, highlight your XML to HL7v2 channel, then click Send Message.
3) Paste the text from xmlsample.txt into the text box (right click), then click Process Message.
4) Under Dashboard Tasks, click View Messages to see if xml to hl7 transformation occurred.
Click on SOURCE > RAW (radio button) to see the incoming XML you sent in.
Click DESTINATION 1 > SENT (radio button) to see the PID segment populated with your transformations.
Notice, "H" for HOME and "M" for Male in the HL7.
See video for above steps and outcome of testing.
Nice Work!
If you completed the course successfully and understood what we did in Mirth - then you are on your way to becoming an HL7/FHIR Engineer. Just keep practicing with this channel.
BONUS - If you want to try one more exercise, then proceed to the next lecture.
PROBLEM:
The downstream system that you send this A08 to has asked that you make 2 changes:
MSH - change MSH-3.1 (sending application) from "AccMgr" to "Mirth Connect".
EVN - change EVN.1.1 (event type code id) from "A01" to "A08".
STOP here and give the above problem a try :-)
The solution is in the next section.
SOLUTION:
Modify MSH-3.1 (sending application). You can type the javascript code or drag and drop from Outbound Template window to Transformer Step window.
Modify EVN-1.1 (event type id). You can type the javascript code or drag and drop from Outbound Template window to Transformer Step window.
Save changes to the channel.
Deploy channel.
Test changes.
There are a few ways to accomplish this, but I used the Javascript code.
Your final A08 message should look like the image below. Solution highlighted in red:
TIP: If you drag and drop, make sure to grab the green circle. It can be tricky. You can see in the video, I wasn't dragging from circle but grabbing the text - which didn't always work.
See video in this lesson for solution.
If you enjoyed this mini FHIR course, then come check out our full FHIR course at the link below.
The full course includes:
Connecting Mirth Connect to a live FHIR server via a real EHR FHIR test system.
FREE Lifetime Support. An invitation to join our HL7/FHIR community on Slack. I will answer any of your questions!
Certificate you can print to prove you have taken this course.
http://www.HL7StarterKit.com/udemyfreefhir
This course will help you understand the basics of FHIR.
It is a FREE sample of a comprehensive hands-on introductory course (details inside). The full course includes direct access to the course creator via a private members-only Slack room.
The goal in making this course was to make it as simple as possible, so that you can get your feet wet with hands-on exercises.
This hands-on lesson uses free Mirth Connect and will walk you through the following:
Installing Mirth Connect.
An example of transforming FHIR in XML format (Patient Resource) to HL7 v2 (ADT A08).