Jun 032010

I wanted to enhance my previous blog entry about how to successfully split the EDI transactions into individual claims.

The one liner does not adequately do justice as to what is really going on, so I thought I would embellish on how to get it properly configured,  and how to make changes (if you really want to).

The first thing is to explain the fundamental difference between the the single and multiple schema:

The BizTalk EDI Pipeline implements splitting at two levels:

1.  An interchange with multiple transaction sets (ST) will be split at the transaction level

2.  Additional splitting is controlled by annotations in the schema

        subdocument_break=”yes” in an annotation at top of schema switches the additional splitting functionality ON.

        At the segment level where additional breaks should occur attribute, subdocument_creation_break=”yes” is used

With the introduction of BizTalk 2006 R2, the EDI pipeline applied a different splitting behavior to “Multiple” schemas than had been applied from previous versions of BizTalk Accelerator for HIPAA.  BizTalk 2006 R2 would split subdocuments as per the “subdocument_creation_break” attribute but it would also include extra/non-essential sibling subdocument data which caused the output XML to be bloated and the splitting of large EDI files extremely slow.

A design change (KB 967945) was created to address the errant BizTalk 2006 R2 splitting behavior.  This hot fix restored the original and expected splitting behavior enjoyed in previous versions of BizTalk Accelerator for HIPAA.  With the hot fix applied, one would have to edit the “Multiple” schema to add an additional splitting attribute at the top of the document.  The new attribute should appear just after the subdocument_break=”yes” attribute and read as:  Split_Without_Sibling_Data=”Yes”.  Split_Without_Sibling_Data=”Yes” enables the new and efficient splitting behavior for “Multiple” schemas.

This design change was also forwarded into BizTalk Server 2009, but was not present in the released product.  Rather it appeared as a hot fix rollup, KB973415.  The KB973415 BizTalk Server 2009 rollup fix contains the new HIPAA 005010 schemas and the fix for new splitting behavior.  Again after applying this rollup fix, one must still edit all desired “Multiple” schemas to add the attribute,  Split_Without_Sibling_Data=”Yes”.

The schemas are mostly the same, except for the subdocument_creation_break attribute in the annotation:

<!-- Multiple -->
<xs:element name="TS837Q3_2300_Loop">
   <b:recordInfo structure="delimited" delimiter_type="inherit_record" field_order="infix" count_ignore="yes" child_delimiter="default" subdocument_creation_break="yes" notes="Claim information" />

<!-- Single -->
<xs:element name="TS837Q3_2300_Loop">
   <b:recordInfo structure="delimited" delimiter_type="inherit_record" field_order="infix" count_ignore="yes" child_delimiter="default" notes="Claim information" />

One thing that is not documented (at least I could not find it), is that after you downloaded and applied the 5010 hot fix, you need to add the following attribute Split_Without_Sibling_Data to the root <xs:appinfo> element

<!-- Out of the box -->
 <schemaEditorExtension:schemaInfo namespaceAlias="btsedi" extensionClass="Microsoft.BizTalk.Edi.SchemaEditorExtension.EdiSchemaExtension" standardName="EDI" xmlns:schemaEditorExtension="http://schemas.microsoft.com/BizTalk/2003/SchemaEditorExtensions" />
 <b:schemaInfo subdocument_break="yes" BiztalkServerEditorTool_Version="1.5" root_reference="X12_00401_837_I" displayroot_reference="X12_00401_837_I" version="3.0" standard="EDI" standards_version="00401" xmlns:b="http://schemas.microsoft.com/BizTalk/2003" X12ConditionDesignator_Check="Yes" />

<!-- After modification -->
 <schemaEditorExtension:schemaInfo namespaceAlias="btsedi" extensionClass="Microsoft.BizTalk.Edi.SchemaEditorExtension.EdiSchemaExtension" standardName="EDI" xmlns:schemaEditorExtension="http://schemas.microsoft.com/BizTalk/2003/SchemaEditorExtensions" />
 <b:schemaInfo subdocument_break="yes" Split_Without_Sibling_Data="yes" BiztalkServerEditorTool_Version="1.5" root_reference="X12_00401_837_I" displayroot_reference="X12_00401_837_I" version="3.0" standard="EDI" standards_version="00401" xmlns:b="http://schemas.microsoft.com/BizTalk/2003" X12ConditionDesignator_Check="Yes" />

If you don’t manually modify the schema, you will end up with all of the members in the transaction with one claim in each message that is submitted to the message box. ‘Bloated XML’ as a friend of mine calls it.

This means that you are now empowered on how to make changes to the splitting behavior, you can take the subdocument_creation_break attribute and move it from the claim level (2300) and move it to the member level (2000) and BizTalk will split the claims by members with all of that members claims grouped together.

Jan 302010

The HIPAA 5010 Support KB Article 973415 explains the new ability within BizTalk to support the next version of HIPAA standards for EDI data interchange.

Note: as noted in the Applies To section at the bottom of the article, viagra buy this only works with BizTalk 2009, discount sorry BizTalk 2006 R2 users, looks like you will be migrating to 2009 sooner than you thought.

This also fixes an issue where the claim separation mechanism (multiple schema) was not working.

Dec 152009

I have been thinking of BizTalk healthcare classes or writing a book for BizTalk in relation to healthcare, viagra adiposity and I thought that I would put the things that I would look for if I was going to pay for a class or heaven forbid; buy a morbid book.

1. The teacher/writer has to have healthcare experience.

2. I want to have a brief understanding of the ‘flow’ of document in a healthcare situation:

     837 (Claims) are submitted to a health plan for payment
     997 (Acknowledgments) are returned to know if they pass Type 1 and Type 2 validation
     824 (Application Notification) can be returned for Type 3 through Type 7 validation, illness depending on the capability of the backend system
     835 (Claim Status) are sent back to notify of Claim status
     270 (Eligibility Request) are sent to health plan to ask for status of patient eligibility for service
     271 (Eligibility Response) are sent from health plan in response to patient eligibility request
     276 (Claim Status Request) are sent to health plan to as for status of claim
     277 (Claim Status Response) are sent from health plan to in response of claim request
     820 (Payment Notification) are sent from the health plan to notify of payment of the claims
     834 (Eligibility) are sent for notification of eligibility

3. I want to map a 837, as that will be the transaction I will most deal with, spend a majority of the the time mapping the 837 transaction if I have to, because that is my biggest pain point.

4. Explain HL7, where it is used

    Provider transactions, largely used in intra department messaging

5. Create a sample ORU^R01 message from a flat file and create a flat file from a ORU^R01 message so I can learn the following HL7 nuances:

    Schema Generation (partner specific schema creation)
    Multipart Messages 
    MSH Segment 
    How to map the flat XML message that the BTAHL7 pipeline (DASM) creates / (ASM) expects 
    Explain MLLP, integrate it into one of the ORU labs

Things I want to briefly want to learn:

    (I need to know what they are, but it should not be the focus of a the class/book)

Things I don’t want to learn:

BAM: BizTalk in a Healthcare Scenario should never be the system of record, the Claim Payment application should be, the out-of-the-box EDI reporting functionality that comes with BizTalk accounts for 99% of what I need
BRE: BizTalk would not be used for message modification/routing/anything else the BRE can be used for, as there are entire workflows designed in every claim payment processing system that deals with changing business rules
AS2: It is too big of a beast to teach along with all of the things that I listed above, and second: NO HEALTHCARE COMPANY TRANSMITS DATA USING AS2
Purchase Orders, Invoices, Advanced Shipment Notifications: I can look at a whole plethora of examples that Microsoft publish. Maybe a MCO deals with ordering supplies for an office, but by in large, I want to know about HIPAA transactions; not transactions I would never see at work.

Anything that I missed? I am thinking of putting together an online class (or via CD) or a book, what would you like to see? Is there any interest in a BizTalk/Healthcare book?

Tell me your experiences!

Jan 302009

I had a requirement to extract several thousand rows of X12 data from a back end database and package them up once a month into X12 EDI with a max of 5000 rows per Transaction Set and maximum 4 Transaction Sets per file.  I found that there was no out of the box way to loop around each of the 5000 rows and have them batched.  Additionally, if I had 3 of the 4 final transaction sets in the last batch, it wouldn’t release.  Since the process only runs 1 time per month, I needed the batch to package up the final 3 transactions sets and drop them off as soon as the orchestration finishes.

Here’s what I did:

ST01 and ST02 needed to be populated, in my case I set ST01 to 837 and ST02 to 0001.


You’ll  notice that the Microsoft.BizTalk.Edi.BatchingOrchestration.BatchingService subscribes to the following promoted properties.


Since my send shape was within a loop, I couldn’t simple create a correlation set and promote the properties that way.  Instead I created a separate orchestration whose only function was to promote the EDI properties the Microsoft.BizTalk.Edi.BatchingOrchestration.BatchingService orchestration was looking for.  The orchestration contained an input message parameter of the X12 EDI document I was sending out, with a correlation set initialized on the send shape.  Here is the orchestration I named orch_PromoteEDIBatchingProperties.odx


My ct_EDIPropertiesToBePromoted properties:


My main orchestration simply called this orchestration and the messages were successfully being picked up by the Microsoft.BizTalk.Edi.BatchingOrchestration.BatchingService orchestration.  Now I needed some way to release the final batch upon orchestration completion.

If you look at the properties of the BatchControlMessageRecvLoc Receive Location, you’ll notice that it executes a simple stored procedure that returns a message to release the batch.  It executes the Stored Procedure edi_GetControlMessage that looks at the PAM_Control Table found in the BizTalkMgmtDb.


All I needed to do was to populate the PAM_Control table with a row that the stored procedure would pick up saying it needed to terminate the batch.  I simply inserted the DestinationPartyID, EdiMessageType, ActionType, ActionDateTime, and UsedOnce values needed into the table and it releases the batch as soon as the sproc is executed, in this case every 30 seconds.  I created a schema for a table insert and in my case inserted 15, 0, EdiBatchOverride, System.DateTime.Now, and 0 for the PAM_Control Table values.  As soon as the Stored Procedure ran it flags the row as having been UsedOnce.


The important parts of my orchestration are shown below


The MessageAssignment shape has the following code.

//Instantiate your XmlDocument
xml_Temp = new System.Xml.XmlDocument();
//Load the XmlDocument with the information needed for the PAM_Control Table
xml_Temp.LoadXml(“<ns0:Request xmlns:ns0=\”PAM_Control\”><ns0:sync><ns0:after><ns0:PAM_Control DestinationParty=\”15\” EdiMessageType=\”0\” ActionType=\”EdiBatchOverride\” ActionDateTime=\””+System.DateTime.Now.ToString()+”\” UsedOnce=\”0\” /></ns0:after></ns0:sync></ns0:Request>”);
//Assign your XmlDocument to your msg_BatchControlRequest
msg_BatchControlRequest = xml_Temp;

I am planning on creating two parameterized orchestrations that will be able to be used as called orchestrations for my other projects instead of this approach that is coded within my main orchestration.

Sep 212007

Have you ever received the error “(80) The document is a duplicate. Contact the sender.” in the Biztalk HIPAA Adapter?.

I’ve only seen it 1.35 million times.  Help is on it’s way.

After many years of manually changing ISA/IEA control numbers for the BizTalk HIPAA adapter, I decided I would get some help via VB.NET code.  Here is a little application that will generate new HIPAA EDI files from an entire folder with the File Mask you specify with all new ISA/IEA control numbers.




If you’d like it contact me:  http://blog.biztalk-info.com/contact.aspx

Jul 182007

In following up to this entry: restarting the Host Instance does not automatically restart the HIPAA EDI service, stomach you have to manually have to go into the services and restart this service to clear up.

I was under the impression that the Host Instance, upon restarting, will automatically restart the child services, but it does not.

Apr 162007

Failed to trigger compile-thread on the server.
(-1040) <Description for error (-1040) cannot be found. Please refer to the Trouble Shooting Guide for this description>



Restart the HIPAA service to clear this issue when using the xsd2edi.exe or compeif.exe


Don’t ask me why…

Apr 032007

A recent request I got was for information regarding retrieving error informaiton in a more readable format:

We have several clients submitting valid X12 documents but recently we started receiving X12 from a client which is not conforming to the standard. For these messages BizTalk is throwing an error into eventlog and does nothing. Unless some one monitors the eventlog there is no way we could identify that a message failed. At the same time we want to report to client in a nice way that the message they sent us is invalid. Something similar to EDIFECS or FREDI. We cannot find a simpler way to do that. Do you have any information about how we can validate X12 and reject in BizTalk in a better way?

I actually have, what I have is an orchestration that picks up the file, interrogates the sender/reciever id and then drops the file off for the HIPAA accelerator to validate. It then queries the HIPAA database and extracts the information and sends out an email. It has a delay before it runs the stored procedure that is determined by the Xref table (around 10 minutes) and then if it does not receive the XML version in the correlation set, it runs the following logic.

Here is the stored procedure that is on the HIPAA_EDIDb

CREATE PROCEDURE dbo.captureDetails @senderQual varchar(2), @senderId varchar(15), @controlNumber varchar(9) AS SELECT errtxt.descrp AS description, errors.descrp1+errors.descrp2 AS details FROM audin INNER JOIN errors ON audin.icin = errors.msgnr INNER JOIN errtxt ON errors.etc = errtxt.etc WHERE (audin.sid = @senderId) AND (audin.icr = @controlNumber) AND (audin.sidcdq =@senderQual) AND (errors.inout = '2') for xml raw--, xmldata GO

Here is the schema that is created by this stored procedure:


<?xml version="1.0"?> <xs:schema attributeFormDefault="unqualified" elementFormDefault="qualified" targetNamespace="http://captureErrors" version="1.0" xmlns:xs="http://www.w3.org/2001/XMLSchema"> <xs:annotation> <xs:appinfo> <msbtssql:sqlScript value="exec [captureDetails] @controlNumber=&quot; &quot;, @senderId=&quot; &quot;, @senderQual=&quot; &quot;" xmlns:msbtssql="http://schemas.microsoft.com/BizTalk/2003" /> </xs:appinfo> </xs:annotation> <xs:element name="Request"> <xs:complexType> <xs:sequence> <xs:element name="captureDetails"> <xs:complexType> <xs:attribute name="controlNumber" type="xs:string" /> <xs:attribute name="senderId" type="xs:string" /> <xs:attribute name="senderQual" type="xs:string" /> </xs:complexType> </xs:element> </xs:sequence> </xs:complexType> </xs:element> <xs:element name="Response"> <xs:complexType> <xs:sequence> <xs:element minOccurs="0" maxOccurs="unbounded" name="row" xmlns:q1="http://captureErrors" type="q1:rowType" /> </xs:sequence> </xs:complexType> </xs:element> <xs:complexType name="rowType"> <xs:attribute name="description" type="xs:string" /> <xs:attribute name="details" type="xs:string" /> </xs:complexType> </xs:schema>


I have a flat file schema


<?xml version="1.0" encoding="utf-16"?> <xs:schema xmlns:ns0="http://captureErrors" xmlns="http://notificationEmail.email" xmlns:b="http://schemas.microsoft.com/BizTalk/2003" targetNamespace="http://notificationEmail.email" xmlns:xs="http://www.w3.org/2001/XMLSchema"> <xs:import schemaLocation=".\errorinfo.xsd" namespace="http://captureErrors" /> <xs:annotation> <xs:appinfo> <b:schemaInfo count_positions_by_byte="false" parser_optimization="speed" lookahead_depth="3" suppress_empty_nodes="false" generate_empty_nodes="true" allow_early_termination="false" standard="Flat File" root_reference="email" /> <schemaEditorExtension:schemaInfo namespaceAlias="b" extensionClass="Microsoft.BizTalk.FlatFileExtension.FlatFileExtension" standardName="Flat File" xmlns:schemaEditorExtension="http://schemas.microsoft.com/BizTalk/2003/SchemaEditorExtensions" /> <b:references> <b:reference targetNamespace="http://captureErrors" /> </b:references> </xs:appinfo> </xs:annotation> <xs:element name="email"> <xs:annotation> <xs:appinfo> <b:recordInfo structure="delimited" preserve_delimiter_for_empty_data="true" suppress_trailing_delimiters="false" sequence_number="1" child_order="postfix" child_delimiter_type="hex" child_delimiter="0x0D 0x0A" /> <b:properties> <b:property distinguished="true" xpath="/*[local-name()='email' and namespace-uri()='http://notificationEmail.email']/*[local-name()='FileName' and namespace-uri()='']/@*[local-name()='name' and namespace-uri()='']" /> <b:property distinguished="true" xpath="/*[local-name()='email' and namespace-uri()='http://notificationEmail.email']/*[local-name()='Count' and namespace-uri()='']/@*[local-name()='number' and namespace-uri()='']" /> </b:properties> </xs:appinfo> </xs:annotation> <xs:complexType> <xs:sequence> <xs:annotation> <xs:appinfo> <b:groupInfo sequence_number="0" /> </xs:appinfo> </xs:annotation> <xs:element name="Envelope"> <xs:annotation> <xs:appinfo> <b:recordInfo structure="delimited" preserve_delimiter_for_empty_data="true" suppress_trailing_delimiters="false" tag_name="Sender (ISA06:ISA05:GS02): " sequence_number="1" /> </xs:appinfo> </xs:annotation> <xs:complexType> <xs:attribute name="id" type="xs:string"> <xs:annotation> <xs:appinfo> <b:fieldInfo sequence_number="1" justification="left" /> </xs:appinfo> </xs:annotation> </xs:attribute> </xs:complexType> </xs:element> <xs:element name="ControlNumber"> <xs:annotation> <xs:appinfo> <b:recordInfo structure="delimited" preserve_delimiter_for_empty_data="true" suppress_trailing_delimiters="false" sequence_number="2" child_order="infix" child_delimiter_type="char" child_delimiter="," tag_name="Control Number: " /> </xs:appinfo> </xs:annotation> <xs:complexType> <xs:attribute name="ControlNo" type="xs:string"> <xs:annotation> <xs:appinfo> <b:fieldInfo sequence_number="1" justification="left" /> </xs:appinfo> </xs:annotation> </xs:attribute> </xs:complexType> </xs:element> <xs:element name="Count"> <xs:annotation> <xs:appinfo> <b:recordInfo sequence_number="3" structure="delimited" preserve_delimiter_for_empty_data="true" suppress_trailing_delimiters="false" tag_name="Count: " /> </xs:appinfo> </xs:annotation> <xs:complexType> <xs:attribute name="number" type="xs:int"> <xs:annotation> <xs:appinfo> <b:fieldInfo sequence_number="1" justification="left" /> </xs:appinfo> </xs:annotation> </xs:attribute> </xs:complexType> </xs:element> <xs:element name="FileName"> <xs:annotation> <xs:appinfo> <b:recordInfo sequence_number="4" structure="delimited" preserve_delimiter_for_empty_data="true" suppress_trailing_delimiters="false" tag_name="Filename: " /> </xs:appinfo> </xs:annotation> <xs:complexType> <xs:attribute name="name" type="xs:string"> <xs:annotation> <xs:appinfo> <b:fieldInfo sequence_number="1" justification="left" /> </xs:appinfo> </xs:annotation> </xs:attribute> </xs:complexType> </xs:element> <xs:element maxOccurs="1" name="Data"> <xs:annotation> <xs:appinfo> <b:recordInfo sequence_number="5" structure="delimited" preserve_delimiter_for_empty_data="true" suppress_trailing_delimiters="false" child_order="prefix" child_delimiter_type="hex" child_delimiter="0x0D 0x0A 0x0D 0x0A" /> </xs:appinfo> </xs:annotation> <xs:complexType> <xs:sequence> <xs:annotation> <xs:appinfo> <b:groupInfo sequence_number="0" /> </xs:appinfo> </xs:annotation> <xs:element maxOccurs="unbounded" name="Details"> <xs:annotation> <xs:appinfo> <b:recordInfo structure="delimited" preserve_delimiter_for_empty_data="true" suppress_trailing_delimiters="false" tag_name="Error #" child_order="infix" child_delimiter_type="char" child_delimiter="= " sequence_number="1" /> </xs:appinfo> </xs:annotation> <xs:complexType> <xs:sequence> <xs:annotation> <xs:appinfo> <b:groupInfo sequence_number="0" /> </xs:appinfo> </xs:annotation> <xs:element maxOccurs="1" name="Number" type="xs:string"> <xs:annotation> <xs:appinfo> <b:fieldInfo sequence_number="1" justification="left" /> </xs:appinfo> </xs:annotation> </xs:element> <xs:element maxOccurs="1" name="Information"> <xs:annotation> <xs:appinfo> <b:recordInfo sequence_number="2" structure="delimited" preserve_delimiter_for_empty_data="true" suppress_trailing_delimiters="false" child_order="infix" child_delimiter_type="char" child_delimiter=" " /> </xs:appinfo> </xs:annotation> <xs:complexType> <xs:sequence> <xs:annotation> <xs:appinfo> <b:groupInfo sequence_number="0" /> </xs:appinfo> </xs:annotation> <xs:element maxOccurs="1" name="Info" type="xs:string"> <xs:annotation> <xs:appinfo> <b:fieldInfo sequence_number="1" justification="left" /> </xs:appinfo> </xs:annotation> </xs:element> <xs:element maxOccurs="1" name="Detail" type="xs:string"> <xs:annotation> <xs:appinfo> <b:fieldInfo sequence_number="2" justification="left" /> </xs:appinfo> </xs:annotation> </xs:element> </xs:sequence> </xs:complexType> </xs:element> </xs:sequence> </xs:complexType> </xs:element> </xs:sequence> </xs:complexType> </xs:element> </xs:sequence> </xs:complexType> </xs:element> </xs:schema>


The orchestration runs and calls the stored procedure, maps the data, determines who gets it (based on a role link) and send out the email.

The email’s contents look like this:

Sender (ISA06:ISA05:GS02): 1234:ZZ:1234

Control Number: 166

Count: 0

Filename: c:\import\8371234564789.txt Error #1= The check condition has not been met. Contact the sender.; source format: [5 00401 ,X12-4010]

source document: [837 004010DEFAULT X X098A1,Health Care Claim: Professional]

source segment: [data#9945,def#22,tag=NM1 ,name=TS837Q1_2010BA_NM1_SubscriberName_A1>DEFAULT]

source element: [def#9,elm#9,comp#0,name=TS837Q1_2010BA_NM109__SubscriberPrimaryIdentifier_A1>DEFAULT],

value: []


(((TS837Q1_2010BA_NM108__IdentificationCodeQualifier_A1>DEFAULT == [] AND TS837Q1_2010BA_NM109__SubscriberPrimaryIdentifier_A1>DEFAULT == [] ) OR

You have to be using the HIPAA receive location, and not the pipeline component, for reason I have blogged about earlier.

Mar 302007

After we upgraded to BizTalk 2006 (along with the HIPAA accelerator 3.3) our DBAs complained that they could not include the BizTalkHIPAA_EDIDb into the backup plan because the compatibility mode is set to SQL Server 7 mode. By looking at it further, all of the Covast databases are set to that compatibility mode. After opening up a ticket with support about this, here is the response I got back:

SQL Compatibility can be changed to “” without any adverse affects. Please do this to include the HIPAA database in you SQL 2005 backup plan.
+ Open “SQL Server Management Studio”, right-click BizTalkHIPAA_EDIDb database and choose ‘properties’
+ In left pane, click “Options” page
+ Note Compatibility level drop down control (3rd control from top)
+ Change from “SQL Server 7.0 (70)” to “SQL Server 2005 (90)”
+ Restart HIPAA service

Changed to

This can also be done with the BizTalkEDIDb database (the BaseEDI adapter’s database).