Skip to content

WebSphere Transformation Extender (WTX) – Simple HIPAA 835 X12 5010 to XML Mapping Example

by on October 15, 2013


This blog post will guide you through the steps to build a simple map in Webshpere Transformation Extender (WTX).  We will be using a HIPAA 835 X12 5010 test message and mapping it to a simple XML document.   This simple example will just do a simple file to file based transformation within WTX Design Studio.   Future blog posts or videos will extend this to leverage WTX for Integration Servers 8.4.1 to deploy a map to one of the supported run-time environments (i.e. WebSphere Message Broker)


Following is an overview of our environment used for implementing this example:


WTX Design Studio 8.4.1

WTX HIPAA Pack 4.1.1


Input Test Data:  835_5010a1_Test_File.txt

XSD for creating output Type Tree:  TT_WTX_EXAMPLE_835_XML_OUT.xsd

Input Type Tree:  hipaa_x12.mtt


1. Create a WebSphere Transformation Extender Project

Click File –> New  –> Extender Project  –> Type in(TT_WTX_EXAMPLE_HIPAAX125010A1_TO_XML)


2.  Create Type Trees for input and output


  • Right click on Type Trees –> Import –> File System
  • Import the hipaa_x12.mtt in your workspace by selecting File System.
  • Navigate to the hipaa files directory: <install_dir>\packs\healthcare_v4.4.1
  • Select the hipaa_x12.mtt file and click Finish.


  • Double click on your file (hipaa_x12.mtt) and analyze it by going to Tree > Analyze > Structure and Logic



  • Again, right click on Type Trees > Import > XML Schema
  • Import (TT_WTX_EXAMPLE_835_XML_OUT.xsd) Schema file in your workspace by selecting XML Schema
  • Navigate to your schema file directory
  • Select your schema file (TT_WTX_EXAMPLE_835_XML_OUT.xsd) and click Finish.
  • Double click on your file (TT_WTX_EXAMPLE_835_XML_OUT.mtt) and analyze it by going to Tree > Analyze > Structure and Logic

3.  Create a Map

  • Right click on Map Files -> New -> Map Source
  • Name your map file: (TT_WTX_SAMPLE_Hipaa8355010_To_XML_Mapping.mms) and click Finish.


  • A dialog box will appear telling us the next step. Click OK


  • Then click the New Map icon as shown below


  • A dialog box will appear asking for a name for your map. Type in: HIPAA8355010_TO_XML_MAP


  • Select OK.


4.  Configure Input Card:

  • Select Input Cards, then right click it and click on “New”  (*see above image)
  • A new Input Card Dialog box will pop up
  • Type in “input1” in the CardName field
  • Browse to your “hipaa_x12.mtt” file in the Type Tree field
  • Select “Inbound x12” as a root tag in the Type field
  • Browse and select your input test file (835_5010a1_Test_File.txt) in the FilePath field.
  • Click OK


Following is a screen shot of the input data we are using:


5.  Configure Output Card:

  • Select Output Cards from the context menu of the map source node, then right click it and click on “New”
  • A new Output Card Dialog box will pop up
  • Type in “output1” in the CardName field
  • Browse to your “TT_WTX_EXAMPLE_835_XML_OUT.xsd” file in the Type Tree field
  • Select “X12EDI835” as a root tag in the Type field
  • Browse and select your output file name (TT_WTX_EXAMPLE_XML_OUT.xml) and location in the FilePath field.
  • Click OK


6.  Create Mapping Rules

In order to map the input X12 data to the output XML we will need to create mapping rules. To do this we can drag and drop from the input card to the output card.  In this example, we are going to map the repeating X12 Transaction Set (ST-SE segments) to a repeating XML element.   This requires us to build a functional map.

To do this, Expand the input file element until you see the “Transaction #835 Inbound Partner Set V5010X221A1” as shown below:

We want to map the “Transaction #835 Inbound Partner Set V5010X221A1” Group to the “EOB_TRANSACTION” so we’ll drag and drop the input object to the output:

Your map should appear as follows:


7.  Create Functional Map

The final step is to create the functional map by first using this rule below: =Transaction_ST_Loop_FunctMap(Transaction #835 Inbound Partner Set V5010X221A1:#835<>F5010X221A1<>Inbound Partner Funct’lGroup ANSI:Partner<>input1)

Next we will use the Functional Map Wizard to create the functional map. Click on the icon below to create this:


The window below appears:


We have three green “smiley faces” which means WTX recognizes these objects and we can proceed to create the functional map. NOTE: A yellow icon signifies unknown object and a red icon signifies an invalid object was used.

Click create and then Close to complete the functional map wizard. We are taken to the newly created functional map as shown below:


8.  Mapping

Expand ST Segment on the input side and TRANS_SET_HDR on the output side. We can now drag and drop input elements to output elements (i.e. TSIDCd Element” to “ST01” and “TSCtrl# Element” to “ST02” as shown below):


We notice that our functional map “Transaction_ST_Loop_FuncMap” has some empty Rule Cells. WTX needs to have a rule in every output cell in order to build. If you build a map and see several errors it may be due to several empty rule cells. To fix this we need to use the “rule =NONE”.

To auto populate several empty rule cells we can use Rules –> Insert NONE if Empty:


In our example, we have a mapping rule for all of our output fields.

9.  Build Map

We are now ready to build the map to check for errors.  To do this, select the “build
map” icon:


Our map built successfully so no future information is displayed.  If you would like to see the build results you can look in the Organizer located in the Outline View under the Executable Map.

Once your map is built successfully, Click on the run map icon as shown below:


If there are no errors in running the map, you should see the following dialog box:


You can now verify that the TT_WTX_EXAMPLE_XML_OUT.xml file was created.

We look forward to your feedback or comments on this posting.   You can also email us at or go to for more information.
Thanks you,



From → Integration

  1. EchoJayy permalink

    I am new to WTX, I would like to know where to get the artifacts like:
    > hipaa_x12.mtt
    > 835_5010a1_Test_File.txt
    > TT_WTX_EXAMPLE_835_XML_OUT.xsd

    Am I to create and code these on my own, or is there a way i can get these online?
    Any help or information will be highly appreaciated!

    • The 835 test input message is an IBM supplied test message and can be found in C:\IBM\WebSphere Transformation Extender 8.4.1\packs\healthcare_v4.4.1\hipaa\data (your exact path may be different depending on your installation)

      hippa_x12.mtt is also supplied by IBM if you have the HIPAA pack and can be found at: C:\IBM\WebSphere Transformation Extender 8.4.1\packs\healthcare_v4.4.1\hipaa\trees

      For our example, we just created a simple XML output and then generated an XSD using exclipse. You can use any XML/XSD that you want to use and map the fields accordingly. If you need help with this or want ours as a starting point, please let me know.

  2. AADP permalink

    Thanks this helped a lot…

  3. Madhuri permalink

    hi.. could you please send me the sample XML/XSD you used in the above example

    • I do not have access to the actual XSD/XML right now, but since it is an example, you can use any valid XSD/XML to replace what we used and then map the 835 fields to your specific fields

Trackbacks & Pingbacks

  1. Using WTX Map Node in WebSphere Message Broker | TransformaTech

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: