I have an HL7 scenario where an ADT-system stub is transmitting a non-valid HL7 message into BizTalk. In BizTalk this message is transformed to a valid HL7 message. The MessageHeader is created as message part in an Orchestration. This MSH looks like:
In the first place this looks fine, but my flatfile (created by the pipeline component BTAHL7 2.X Assembler) doesn’t look very well:
A new row is created with four spaces. When validating the MSH (Xml variant) against the schema MSH_25_GLO_DEF.xsd I received the message:
error BEC2004: The ‘MSH.13_SequenceNumber’ element is invalid – The value ‘
‘ is invalid according to its datatype ‘http://microsoft.com/HealthCare/HL7/2X:NM’ – The Pattern constraint failed.
That makes sense (except for the four spaces
). I didn’t receive any warning or error message in the EventLog, so the header is not validated against the schema in the pipeline component. To fix this, I had to enter a valid number for the sequence number and the output looks like:
That’s better.




