Integration Engine Solutions to Connect Anything to Anything

Log out?

Purpose:

To practice transforming HL7 files into an XML format.



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 People XML and select OK.
    3. The Route should now appear in the table on the screen. Double-click it to open it.

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.

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 selector. The polling directory should NOT be the directory with all the sample files, since files will be moved/deleted by the listening process.

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 People, 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.Add Format
    4. Under the HL7 Version to expect, select 2.3 from the drop-down menu.
    5. Also, Click on Use Friendly Names for Known Elements.
    6. Configure FormatOn 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.
    7. Click the New button beneath the checkbox to open the Data Mapper.

Load Source and Target Formats

    1. Use the Open Source Format button above the Source 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. Click Use Friendly Element Names Where Possible.
    4. Check the box towards the bottom that says Use Sample File, then click the Browse button that is now enabled. In the File selector, navigate to where the sample files are located. Choose the file called ADT_A05.hl7. Click OK and then click Read Format.HL7 Format Builder
    5. Use the Open Target Format button above the Target Format panel to re-open the dialog. Select the XML format reader and click the Add button to re-open the File selector and select the file called people.xml. Click OK, and then click Read Format.
    6. The Source and Target Format panels should now be populated.HL7 Format

Map the Root Nodes and Add Iteration

    1. Select the XCSData Node that is the root of the tree in the Source panel to the left. Drag it onto the center panel, and drop it on the stylesheet node that’s already there.
    2. Select the People node that is the root of the tree in the Target panel to the right. Drag it onto the center panel, and drop it on the XCSData node that was just dropped there.
    3. Above the center mapping panel is the extensions panel. The currently displayed tab, Filter by Pattern, has a text field called Pattern. Type for-each into that field.
    4. A single item should be present in the panel. This item should also be called for-each. Select it and drag it onto the People node in the center mapping panel.
    5. In the Source tree, expand the node called ADT_A01 to see its children. Find the child called ADT_A05_ADT_message/PID_Patient_identification_segment, and drag it onto the @select node beneath the for-each node in the center mapping panel.
    6. In the Target tree, select the Person node that is a child of the People node and drag it onto the for-each node in the center mapping panel.Map Root Nodes

Finish the Mapping

    1. Select all of the Nodes that are children of the Person node in the Target format panel, and drag them onto the center panel and drop them onto the Person node.
    2. Click the + button next to the Name and Address Nodes in the Target format panel to expand them to show their child nodes, and drag them onto the center mapping panel as well.
    3. Now that the whole Target format has been configured in the center panel, it’s time to map the Source format to it. Map the nodes in the following way (all Source nodes are children of the PID Source node):
      1. Source: PID.5_Patient_Name/XPN.2_given_name -> Target: Name/First
      2. Source: PID.5_Patient_Name/XPN.3_middle_initial_or_name -> Target: Name/Middle
      3. Source: PID.5_Patient_Name/XPN.1_family_name -> Target: Name/Last
      4. Source: PID.8_Sex -> Target: Gender
      5. Source: PID.19_SSN_Number_-_Patient -> Target: SSN
      6. Source: PID.7_Date_Time_of_Birth -> Target: BirthDate
      7. Source: PID.11_Patient_Address/XAD.1_street_address -> Target: Address/Line1
      8. Source: PID.11_Patient_Address/XAD.2_other_designation -> Target: Address/Line2
      9. Source: PID.11_Patient_Address/XAD.3_city -> Target: Address/City
      10. Source: PID.11_Patient_Address/XAD.4_state_or_province -> Target: Address/State
      11. Source: PID.11_Patient_Address/XAD.5_zip_or_postal_code -> Target: Address/Zip
    4. Now that the mapping is complete, click the Save icon in the toolbar above the tree. When prompted for a name, use the default, transform.
    5. Click the X button in the top right corner to close the Data Mapper and return to the Route Editing Grid.

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 selector.
    4. Set hl7-people-output as the Target File Name.
    5. Set xml as the Target File Extension.

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 People XML File.
    3. Select the Choose Target Icon button, and scroll down to select one of the XML icons.

Prepare to Test

    1. In the menu bar at the top, select Mode -> 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.

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 hl7-people-output.xml should be there with the transformed contents produced by the XSLT.

Output Files

    1. Compare the results from the exercise with the following example output files to see if they are correct.
      1. hl7-people-output.xml

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