A question I’m often asked when giving presentations on using BizTalk for EDI is: “How hard is it to implement?” Implementing EDI processing with Microsoft BizTalk Server is easy, will save your company time and, most importantly, money. Hand rolling a custom application to parse and translate an EDI file can be a daunting task. The implementation guides to these documents can be hundreds of pages long, and all of the complex rules and enumerations can take weeks, if not months, to write code for. BizTalk provides schemas for thousands of EDI documents right out of the box for you to use, saving all of that development effort. This example will show how easy it is to extract data from an 837P Healthcare Claim and insert it into a Microsoft SQL database table.
The first step after creating a new BizTalk solution in Visual Studio is to add the schemas that will be used. All messages that are processed through BizTalk become xml documents, and a schema defines the field names, data types, and cardinality of the information in those xml docs. For our 837P, this schema is already available out-of-the-box, and we simply need to include it in our solution.
The schemas included with BizTalk are located in the BizTalk installation folder in a zipped file called MicrosoftEdiXSDTemplates.exe.
Once these are extracted, you can select from the thousands of provided xsd schema files. For our solution, we need the HIPAA 837P schema. Its location is based on where you extracted the xsd files.
Next, we need to define the message that will be sent to a SQL Server instance to insert data into our destination table. This will also be done by adding a few schemas to our project by adding generated items and using the consume adapter service option.
In the following window, connecting to your SQL instance is easily accomplished by selecting sqlBinding from the first dropdown and configuring the connection.
Selecting connect will populate the ‘Select a category’: section where you can select tables, views, or other database objects to generate schemas for. In our case, we select tables.
Completing the dialog will generate a few schemas and a bindings file, both necessary to perform select, insert, delete, or update operations on our desired database table. Next, a map will need to be created to choose what fields from the source 837P will be placed into fields in the destination Insert message. The complexity of the map will vary depending on your specific business needs. I also created a simple orchestration to receive the claim, call the map to transform the claim into an insert message, and send that insert message to the database.
Next, we deploy our application from the build menu and do a few simple configurations in the BizTalk Administration Console. A receive location needs to be configured to use the EdiReceive pipeline in order for BizTalk to recognize the 837P file, validate the format, and convert it into an xml message that will be consumed by our process.
A receive location can be configured to monitor a folder on the corporate network, connect to an FTP site, call a web service, or many many more. If needed, trading partner configuration is available to coordinate specific agreements between your company and other businesses. Here is where you can define header information, acknowledgements, and many other things releavant to your specific data interchange scenario:
And at last you're ready to deploy and test.
You’re probably not working with 837P yourself, but I hope this post gives you a sense of how easy BizTalk makes it to adapt various file types. And BizTalk comes with schemas for over 8,000 industry-standard forms, so whatever form you’re working with it’s a good bet you’ll find it. There are also tons of third-party providers of adapters and schemas out there to augment BizTalk with stuff that doesn’t come out-of-the-box”… or you can write your own.
As you can see in the images here, the controls are really intuitive, and it only gets easier the more time you spend working with it. Personally, having written code for all kinds of adaptations like this before seeing how much time you can save with BizTalk, I don’t know how I ever managed without it.
What do you think? If you have any questions about what BizTalk is or how it works, feel free to write them in the comments section below.