none
Biztalk 2016 Message had parse errors, can not be serialized BTAHL72XPipelines.BTAHL72XSendPipeline RRS feed

  • Question

  • I get the following error when trying to output a constucted A19^QRY using the HL72XSendpipeline.


    There was a failure executing the send pipeline: "BTAHL72XPipelines.BTAHL72XSendPipeline, BTAHL72XPipelines, Version=1.3.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" Source: "BTAHL7 2.X Assembler" Send Port: "SendPort1" URI: "C:\HL7\logs\Out_%MessageID%.txt" Reason: Message had parse errors, cannot be serialized

    I have created a multipart message with the MSHSegement, BodySegments and ZSegments, within an orchestration. The following is the message logged in Biztalk.

     <MSH>

        <MSH.2_EncodingCharacters>^~\&amp;</MSH.2_EncodingCharacters>

        <MSH.3_SendingApplication>

          <HD.0_NamespaceId>Biztalk</HD.0_NamespaceId>

          <HD.1_UniversalId>SrcAppUid</HD.1_UniversalId>

        </MSH.3_SendingApplication>

        <MSH.4_SendingFacility>

          <HD.0_NamespaceId>Biztalk</HD.0_NamespaceId>

          <HD.1_UniversalId>srcFacUid</HD.1_UniversalId>

        </MSH.4_SendingFacility>

        <MSH.5_ReceivingApplication>

          <HD.0_NamespaceId>dstApp</HD.0_NamespaceId>

          <HD.1_UniversalId>dstAppUid</HD.1_UniversalId>

        </MSH.5_ReceivingApplication>

        <MSH.6_ReceivingFacility>

          <HD.0_NamespaceId>dstFac</HD.0_NamespaceId>

          <HD.1_UniversalId>dstFacUid</HD.1_UniversalId>

        </MSH.6_ReceivingFacility>

        <MSH.7_DateTimeOfMessage>

          <TS.1>200307092343</TS.1>

        </MSH.7_DateTimeOfMessage>

        <MSH.8_Security>sec</MSH.8_Security>

        <MSH.9_MessageType>

          <CM_MSG.0_MessageType>ADT</CM_MSG.0_MessageType>

          <CM_MSG.1_TriggerEvent>QRY</CM_MSG.1_TriggerEvent>

        </MSH.9_MessageType>

        <MSH.10_MessageControlId>msgid2134</MSH.10_MessageControlId>

        <MSH.11_ProcessingId>

          <PT.0_ProcessingId>P</PT.0_ProcessingId>

        </MSH.11_ProcessingId>

        <MSH.12_VersionId>

          <VID_0_VersionId>2.3</VID_0_VersionId>

        </MSH.12_VersionId>

      </MSH>

    </ns0:MSH_25_GLO_DEF>

    <ns1:QRY_A19_23_GLO_DEF xmlns:ns1="http://microsoft.com/HealthCare/HL7/2X" xmlns:ns3="http://microsoft.com/HealthCare/HL7/2X/2.3/DataTypes" xmlns:ns2="http://microsoft.com/HealthCare/HL7/2X/2.3/Tables" xmlns:ns0="http://microsoft.com/HealthCare/HL7/2X/2.3/Segments">

      <QRD_QueryDefinitionSegment>

        <QRD_1_QueryDateTime>

          <TS_0_TimeOfAnEvent>20180801045935</TS_0_TimeOfAnEvent>

        </QRD_1_QueryDateTime>

        <QRD_2_QueryFormatCode>R</QRD_2_QueryFormatCode>

        <QRD_3_QueryPriority>I</QRD_3_QueryPriority>

        <QRD_4_QueryId>20180801045935</QRD_4_QueryId>

        <QRD_7_QuantityLimitedRequest>

          <CQ_0_Quantity>10</CQ_0_Quantity>

          <CQ_1_Units>

            <CQ_1_0_Identifier>RD</CQ_1_0_Identifier>

          </CQ_1_Units>

        </QRD_7_QuantityLimitedRequest>

        <QRD_8_WhoSubjectFilter>

          <XCN_0_IdNumberSt>123456</XCN_0_IdNumberSt>

        </QRD_8_WhoSubjectFilter>

        <QRD_9_WhatSubjectFilter>

          <CE_0048_0_Identifier>MRI</CE_0048_0_Identifier>

        </QRD_9_WhatSubjectFilter>

      </QRD_QueryDefinitionSegment>

    </ns1:QRY_A19_23_GLO_DEF>

    The Orchestration creates the message using the following code. I have resorted to hard coding the values to try and identify the source of the issue.

    _A19Qry and _headerInfo is created using a Transform and assigned to the variables.

    A19SearchRequest.MSHSegment = _HeaderInfo;

    A19SearchRequest.BodySegments = _A19QRY;

    A19SearchRequest.ZSegments = "";

    A19SearchRequest(BTAHL7Schemas.MSH1) = 124;

    A19SearchRequest(BTAHL7Schemas.MessageEncoding) = 65001;

    A19SearchRequest(BTAHL7Schemas.MSH2) = "^~\\&";

    A19SearchRequest(BTAHL7Schemas.MSH3_1) = "Biztalk";

    A19SearchRequest(BTAHL7Schemas.ParseError) = true;

    A19SearchRequest(BTAHL7Schemas.ZPartPresent) = false;

    A19SearchRequest(BTAHL7Schemas.SegmentDelimiter2Char) = true;

    A19SearchRequest(BTAHL7Schemas.LastSegmentDelimiterMissing) = true;

    The request should look something like this, what i can see is how to identify the reason causing the Serialization issue.

    MSH|^~\&|Biztalk||7edit||20180718155606||QRY^A19|MSG-20180718-155606-0327|P|2.3

    QRD|20180619000713|R|I|1529330833473|Q27805||1^RD|1749426^^^^^^^^abcd^^^^abcd|MRI||T


    Wednesday, August 1, 2018 5:48 AM

All replies

  • Hi,

    Have you tried to Generate schema using the HL7SchemaTool utility of HL7 SDK and test it through BTAHL7 Configuration Explorer.

    Is your schema namespace is correct as described here https://blogs.msdn.microsoft.com/biztalknotes/2013/05/10/parsingserialization-error-while-sendingreceiving-messages-using-mllp-adapter/

    HTH


    Hope this Helps!!!! Regards, Note: Please Mark As Answered if you satisfy with Reply.

    Wednesday, August 1, 2018 3:20 PM