Jan 232007

Drafting from Tom’s explaination on Cross Referencing, I wanted to step you through how I was able to use the functionality that is built into BizTalk and save myself a lot of coding.

Scenario: Take original filename of an 837 transaction, look up the actual pickup date based on the filename from a table and place it in the encounter staging table for every row that represented a claim.

Issues: HIPAA accelerator does not retain file name

There is no place in the data that I can use to pull the recieved date from within the data content. Only context data, and even at that I have to refer to issue point 1.

Oh, ya, these 837s were all custom 837 messages coming in.

I created a process that picks up the EDI file and starts an orchestration where it extracts the ISA05, ISA06, ISA13, and GS02 using a flat file pipeline (I will explain how I do that sometime) so I can retrieve the filename from the context of the message. Having that, I call a seperate orchestration that takes the enveloping information and filename and looks up the file recieved date. Once I had that file received date, I really did not need to know the filename anymore, I had the enveloping information in the file, I had the received date, now all I needed to do was store it and retrieve it.

The first thing I did was set up the necessary XML documents to setup the XRef tabes in the BizTalkMgmtDb. They are as follows:





Since I am not going to ‘preload’ the data into the database, it is going to be built on the fly, I did not create the ListOfIDXRefData.xml.

Now to the exciting part. In order to insert this information into the tables, we need somehow to actually load it. Oddly enough there is a executable in the BizTalk folder that will do just that: BTSXRefImport.exe

Tom has this really nifty (is that a kosher word?) batch file that will load the data, but I need to learn to crawl before I start running with this.

So how does the BTSXRefImport.exe import the data and set up the relationships between these three (four in Toms case) xml files? There needs to be a setup file that is called as an argument. Here is the setup xml file I used and in the comments, you can see how it is supposed to be invoked c:\>btsxrefimport -file=setupfile.xml

Now I need to write the data to the XRef table in an orchestration, right after I get the response from the stored procedure. The first thing I need to do is in this orchestration, I need to add a reference to the Microsoft.BizTalk.CrossReferencing.dll (located in the BizTalk install folder). I need to create my unique key, I do that by concatonating the ISA05,06,13, and GS02 together and then putting the string version of the date as the second argument. My logic is as follows:

So now I have the data in the XRef table, now all I need to do is extract it in the map.

And the arguments to the Get Common ID functoid are as follows:

So to resolve the issues, when the file is originally picked up, I go and extract the envloping information, look up the recieved date and store those two bits (enveloping information and file pickup date) of information and then send it to the HIPAA accelerator.

Once the HIPAA accelerator deserilizes it to its custom 837 schema, I have seperate maps for each provider that maps it into the standard schema, and then there is the final 837 to encounter map that I then use the Get Common ID value and by concatonating the envelope fields together, I can get the recieved date and put it in the staging table directly.