Log out?

Exercise 6.3 – Mapping Between HL7 Versions

Purpose:

To practice mapping between HL7 versions using an Identity Template.



Steps

  1. Create a Route
    1. From the eiConsole File Management screen, select the “Add Route” button.
    2. In the dialog that appears, enter the name “HL7 to HL7” and select “OK”.
    3. The Route should now appear in the table on the screen. Double click it to open it.


  2. Document Source System
    1. Select the “Source System” stage in the “Route Editing Grid”. The configuration panel will appear at the bottom.
    2. Change the “System Name” to “HL7 File”
    3. Select the “Choose Source Icon” button, and scroll down to select one of the HL7 icons


  3. Configure the Listener
    1. Select the “Listener” stage in the “Route Editing Grid”. The configuration panel will appear at the bottom.
    2. Select “Directory / File” from the “Listener Type” selection box. Optionally, click the “…” button to open the Module Search Dialog, which provides a faster way to find the module you’re looking for.
    3. Assign a polling directory, using the “…” button to open the file chooser. The polling directory should NOT be the directory with all the sample files, since files will be moved/deleted by the listening process.


  4. Add Source Format for HL7 Transformation
    1. Select the “Source Transform” stage in the “Route Editing Grid”. The configuration panel will appear at the bottom.
    2. Click the “Add Format” button. In the dialog that appears, name the format “HL7 to HL7 XML”, and click “OK”. The transformation configuration panel will appear below.
    3. On the left hand side, in the “Transformation Module Configuration” panel, select the “HL7 v2.X” transformer. Its configuration panel will appear below.
    4. Under “HL7 Version to expect”, select “2.3” from the drop-down menu.
    5. On the right hand side, in the XSLT “To XML” configuration panel, uncheck the “Use Direct Relay” button. The options in that panel will now be enabled.
    6. Click the “New” button beneath the checkbox to open the “Data Mapper”.


  5. Load Source and Target Formats
    1. Use the “Open Target Format” button above the “Target Format” panel to open the “Select Format” dialog. Choose “HL7 v2.x” from the “Format Reader” selection box.
    2. Under “HL7 Version”, select version “2.3”.
    3. Check the box towards the bottom that says “Use Sample File”, then click the “Browse” button that is now enabled. In the File Chooser, navigate to where the sample files are located. Choose the file called “ADT_A05.hl7”. Click “OK”, and then click “Read Format”
    4. Repeat the exact same steps to load the exact sample HL7 format & sample file for the source format.
    5. The source and target format panels should now be populated.


  6. Add Identity Template
    1. In the “Filter by Pattern” section in the top extensions panel, type “Identity” into the “Pattern” text box. The “Identity Template” Node should be one of the options that appears.
    2. Drag the “Identity Template” node from the top panel onto the center mapping panel, and drop it on the “Stylesheet” node that already exists there.


  7. Change the Date/Time of Message
    1. In the “Filter by Pattern” section in the top extensions panel, type “Template” into the “Pattern” text box. The “Template” node should be one of the options that appears.
    2. Drag the “Template” node from the top panel onto the center mapping panel, and drop it on the “Stylesheet” node that already exists there.
    3. Double click on the “template[@match:?]” node that is now on the center panel to open its text field. Type “MSH.7” into it and press enter to save the changes. The Node’s name should now change to “MSH.7”.
    4. Expand the target format tree on the right hand side to open up the “MSH” node. Find its child called “MSH.7”, and drag it onto the template node in the center mapping panel.
    5. In the “Filter by Pattern” section in the top extensions panel, type “Date” into the “Pattern” text box. The “Current DateTime” node should appear. Drag it down onto the center mapping panel, and drop it onto the “MSH.7” target node.


  8. Save the Mapping
    1. Now that the mapping is complete, select the button with a floppy disk icon from the top toolbar to save changes. When prompted for a name, use the default, “transform”.
    2. Click the “X” button in the top right corner to close the “Data Mapper” and return to the “Route Editing Grid”.


  9. Add Target Format for HL7 Transformation
    1. Select the “Target Transform” stage in the “Route Editing Grid”. The configuration panel will appear at the bottom.
    2. Click the “Add Format” button. In the dialog that appears, name the format “HL7 XML to HL7”, and click “OK”. The transformation configuration panel will appear below.
    3. On the right hand side, in the “Transformation Module Configuration” panel, select the “HL7 v2.X” transformer. Its configuration panel will appear below.
    4. Under “HL7 Version to expect”, select “2.3” from the drop-down menu.


  10. Configure the Transport
    1. Select the “Transport” stage in the “Route Editing Grid”. The configuration panel will appear at the bottom.
    2. Select “Directory / File” from the “Transport Type” selection box. Optionally, click the “…” button to open the Module Search Dialog, which provides a faster way to find the module you’re looking for.
    3. Select the “Target Directory”, using the “…” button to open the file chooser.
    4. Set “new-output” as the “Target File Name”.
    5. Set “hl7” as the “Target File Extension”.


  11. Document the Target System
    1. Select the “Target System” stage in the “Route Editing Grid”. The configuration panel will appear at the bottom.
    2. Change the “System Name” to “HL7 File”
    3. Select the “Choose Target Icon” button, and scroll down to select one of the HL7 icons


  12. Prepare to Test
    1. In the menu bar at the top, select “Route” -> “Testing Mode”. Make sure the changes to the Route are saved.
    2. Copy the file called “ADT_A05.hl7” from the “Samples” directory provided into the directory chosen as the polling directory.


  13. Perform the Test
    1. At the top of the “Testing Mode” screen, select the “Execute Test” button.
    2. If the “Route” was configured successfully, all the Stages should light up with green checkmarks.
    3. In the OS File Explorer, open the directory selected as the “Target Directory”. The file “new-output.hl7” should be there, with the transformed contents produced by the XSLT.


  14. Output Files
    1. Compare the results from the exercise with the following example output files to see if they are correct.
      1. new-output.hl7


This is a unique website which will require a more modern browser to work! Please upgrade today!

Thanks!

Our editors are notified.

Close