Recently I had a requirement to generate an HL7 ORM to send to Oracle.
To fulfill the requirements, an HL7 message must be generated inline inside an orchestration.
The ExecuteReceivePipeline method must be used in orchestration, to execute the BTAHL72XSendPipeline pipeline with the HL7 multipart message to finally generate the message in HL7 format.

All HL7 must be multipart messages consisting of three segments:

  • Body segment – The HL7 message (marked as message body part)
  • MSH segment – The HL7 header
  • Z Segment – HL7 custom segment

To generate the ORM HL7 message, the BTAHL72XSendPipeline requires that the “message type” property be promoted, otherwise the error “Body schema is missing” will be thrown.
This property cannot be directly set, because is a reserved property used by BizTalk, the only way is to copy from other message.
If your orchestration receives the same HL7 message type, it’s easy to fix this issue, just set the multipart properties from the inbound message using the “(*)” syntax. In this way, the “message type” property will be copied.
HL7MultipartMessage(*)=InputMsgForHl7BodyPart(*);

There are several posts with this fix like https://blogs.msdn.microsoft.com/biztalknotes/2013/03/06/biztalk-hl7-error-failure-executing-btahl72xsendpipeline-error-details-body-schema-is-missing/ and https://social.technet.microsoft.com/wiki/contents/articles/16181.how-to-execute-btahl72xsendpipeline-in-an-orchestration.aspx

If you do not have an incoming  HL7  message, the solution is a little bit tricky.

  1. Create an BizTalk ORM message (you can use other HL7 message type or versions depending of the business requirements);
  2. Force the “message type” promotion executing the XmlReceive pipeline (inline in orchestration);
  3. Set the message created in1) to the multipart BodySegments segment;
  4. Copy the ORM properties to the multipart message ( HL7MultipartMessage(*)=ORMMessage(*) )

Hope this helps!

 

 

 

1 COMMENT

LEAVE A REPLY

Please enter your comment!
Please enter your name here