Integration Engine Solutions to Connect Anything to Anything

Log out?

Purpose:

To practice transforming an XML Format to HL7 files.



Create a Route

    1. From the eiConsole File Management screen, select the Add Route button.
    2. In the dialog that appears, enter the name People XML to HL7 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 XML File.
    3. Select the Choose Source Icon button, and scroll down to select one of the XML 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 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 to People 1, 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 the HL7 Version to expect, select 2.3 from the drop-down menu.
    5. On the left-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.Add Format

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 the HL7 Version, select version 2.3.
    3. Check 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.Load Target
    5. Use the Open Source Format button above the Source Format panel to re-open the dialog. Select the XML Format reader, click the Add button to re-open the File Selector and select the file called people.xml. Click OK and then click Read Format.Load Source

Map the Root Nodes and add Iteration

    1. Select the People 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 XCSData 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 People 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 XCSData node in the center mapping panel.
    5. Select the Person node that is a child of the People node from the Source tree to the left. Drag it onto the center panel, and drop it onto the @select node that is the child of the for-each node that was just dropped there.
    6. Select the ADT_A05_ADT_message node that is a child of the XCSData node from the Target tree to the right. Drag it onto the center panel, and drop it onto the for-each node.Map PID Info

Hardcode the MSH segment

    1. Expand the ADT_A01 node in the Target panel to the right. Select the node called MSH and drag it onto the center mapping panel, and drop it onto the ADT_A01 node.
    2. Expand the MSH_Message_header_segment node in the Target panel to the right. Select MSH.1 and drag it onto the center mapping panel, and drop it onto the MSH node.
    3. Right-click on the MSH.1_Field_Separator node in the center panel, and select Add Text Constant. In the dialog that pops up, type in the bar | character and press OK to add that value to MSH.1_Field_Separator.
    4. Populate the other MSH child elements in the center panel in the same way, dragging them from the Target format panel on the right into the center panel, then adding a text constant value to them:
      1. Target: MSH.2_Encoding_Characters, Text: ^~\&
      2. Target: MSH.3_Sending_Application, Text: AccMgr
      3. Target: MSH.4_Sending_Facility, Text: 1
      4. Target: MSH.9/ CM_MSG.1_message_type, Text: ADT
      5. Target: MSH.9/ CM_MSG.2_trigger_event 2, Text: A05
      6. Target: MSH.10_Message_Control_ID, Text: 599102
      7. Target: MSH.11_Processing_ID, Text: P
      8. Target: MSH.12_Version_ID, Text: 2.3Hardcode MSH.1
    5. After those are populated, drag MSH.7 from the Target format panel onto the center mapping and drop it on the MSH node.
    6. In the top extension panel, type date into the Filter by pattern Pattern text field. Of the options that appear, select Current DateTime and drag it onto the MSH.7 node in the center mapping panel to assign the current date/time to it.Add Date/Time

Map the PID Information

    1. Expand the PID node in the Target panel to the right. Select the PID node and drag it onto the center mapping panel and drop it onto the ADT_A01 node.
    2. Begin mapping the child Nodes of PID_Patient_identification_segment from the Target format tree onto the center mapping panel, dropping them all onto the PID_Patient_identification_segment node in that tree. Map child nodes of the Person node in the Source tree to the child Nodes of the PID_Patient_identification_segment Target node. Map them in the following way:
      1. Target: PID.5_Patient_Name/XPN.2_given_name -> Source: Name/First
      2. Target: PID.5_Patient_Name/XPN.3_middle_initial_or_name -> Source: Name/Middle
      3. Target: PID.5_Patient_Name/XPN.1_family_name -> Source: Name/Last
      4. Target: PID.8_Sex -> Source: Gender
      5. Target: PID.19_SSN_Number_-_Patient -> Source: SSN
      6. Target: PID.7_Date_Time_of_Birth -> Target: BirthDate
      7. Target: PID.11_Patient_Address/XAD.1_street_address -> Source: Address/Line1
      8. Target: PID.11_Patient_Address/XAD.2_other_designation -> Source: Address/Line2
      9. Target: PID.11_Patient_Address/XAD.3_city -> Source: Address/City
      10. Target: PID.11_Patient_Address/XAD.4_state_or_province -> Source: Address/State
      11. Target: PID.11_Patient_Address/XAD.5_zip_or_postal_code -> Source: Address/ZipMap PID Info

Save the Mapping

    1. 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.
    2. 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 people-output as the Target File Name.
    5. Set hl7 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 HL7 File.
    3. Select the Choose Target Icon button, and scroll down to select one of the HL7 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 people.xml 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 people-output.hl7 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. people-output.hl7

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