質問

Adding a line break in HL7 is very important as w/o it, Mirth connect cannot parse the message.

I send a XML message to Mirth connect to convert into HL7. The message has one root node and multiple child nodes. Need to add a new line after every child node in the HL7.

Firstly I am unknown whether the setting to add a new line has to be done the XML being send or in the Mirth connect ?

I tried multiple XML codes to include a line break like :

  • &#10 and/or &#13
  • /r/n and/or /n
  • /br or br tag
  • CDATA tag
  • &#xD and/or &#xA

From the Mirth documentation : http://www.mirthcorp.com/community/wiki/display/resultsHL7mapping/Separators+and+Escape+Sequences

tried other options but could not get the line break.

Please suggest a solution to add a new line in the generated HL7 file.

The XML sent to Mirth Connect :

<?xml
version='1.0'
encoding='utf-8'
?>
    <HL7Message>
        <MSH>
            <MSH.1>|</MSH.1>
            <MSH.2>^~\&amp;</MSH.2>
            <MSH.3>
                <MSH.3.1>SNAP
                    EHR</MSH.3.1>
            </MSH.3>
            <MSH.4>
                <MSH.4.1>Kreetti
                    Clinic</MSH.4.1>
            </MSH.4>
            <MSH.5>
                <MSH.5.1>Receiving
                    Application</MSH.5.1>
            </MSH.5>
            <MSH.6>
                <MSH.6.1>Receiving
                    Facility</MSH.6.1>
            </MSH.6>
            <MSH.7>
                <MSH.7.1>20130719</MSH.7.1>
            </MSH.7>
            <MSH.8/>
            <MSH.9>
                <MSH.9.1>VXU</MSH.9.1>
                <MSH.9.2>V04</MSH.9.2>
            </MSH.9>
            <MSH.10>
                <MSH.10.1>634158415302812500</MSH.10.1>
            </MSH.10>
            <MSH.11>
                <MSH.11.1></MSH.11.1>
            </MSH.11>
            <MSH.12>
                <MSH.12.1>2.3.1</MSH.12.1>
            </MSH.12>
        </MSH>


        <PID>
            <PID.1>
                <PID.1.1>0123</PID.1.1>
            </PID.1>
            <PID.2/>
            <PID.3>
                <PID.3.1>0123</PID.3.1>
                <PID.3.2/>
                <PID.3.3/>
                <PID.3.4/>
                <PID.3.5>Mr</PID.3.5>
            </PID.3>
            <PID.4/>
            <PID.5>
                <PID.5.1>Jacob</PID.5.1>
                <PID.5.2>Oram</PID.5.2>
            </PID.5>
            <PID.6/>
            <PID.7>
                <PID.7.1>19930904</PID.7.1>
            </PID.7>
            <PID.8>
                <PID.8.1>M</PID.8.1>
            </PID.8>
            <PID.9/>
            <PID.10/>
            <PID.11>
                <PID.11.1>1111</PID.11.1>
                <PID.11.2/>
                <PID.11.3>Updated</PID.11.3>
                <PID.11.4>Dyer</PID.11.4>
                <PID.11.5>23323-2342</PID.11.5>
            </PID.11>
            <PID.12/>
            <PID.13>
                <PID.13.1/>
                <PID.13.2/>
                <PID.13.3/>
                <PID.13.4/>
                <PID.13.5/>
                <PID.13.6/>
                <PID.13.7>1111111111 </PID.13.7>
            </PID.13>
        </PID>



        <RXA>
            <RXA.1>
                <RXA.1.1>0</RXA.1.1>
            </RXA.1>
            <RXA.2>
                <RXA.2.1>999</RXA.2.1>
            </RXA.2>
            <RXA.3>
                <RXA.3.1>20091202</RXA.3.1>
            </RXA.3>
            <RXA.4>
                <RXA.4.1>20091202</RXA.4.1>
            </RXA.4>
            <RXA.5>
                <RXA.5.1>88</RXA.5.1>
                <RXA.5.2>Influenza</RXA.5.2>
                <RXA.5.3>CVX</RXA.5.3>
            </RXA.5>
            <RXA.6>
                <RXA.6.1>1</RXA.6.1>
            </RXA.6>
            <RXA.7>
                <RXA.7.1>1</RXA.7.1>
                <RXA.7.2>1</RXA.7.2>
                <RXA.7.3>1</RXA.7.3>
            </RXA.7>
            <RXA.8/>
            <RXA.9>
                <RXA.9.1>00</RXA.9.1>
            </RXA.9>
            <RXA.10>
                <RXA.10.1/>
                <RXA.10.2>Butler</RXA.10.2>
                <RXA.10.3>Internist</RXA.10.3>
                <RXA.10.4/>
                <RXA.10.5/>
                <RXA.10.6>Dr.</RXA.10.6>
            </RXA.10>
            <RXA.11>
                <RXA.11.1>Kreetti
                    Clinic</RXA.11.1>
            </RXA.11>
            <RXA.12/>
            <RXA.13/>
            <RXA.14/>
            <RXA.15>
                <RXA.15.1>42142314</RXA.15.1>
            </RXA.15>
            <RXA.16>
                <RXA.16.1>20100827000000</RXA.16.1>
            </RXA.16>
            <RXA.17>
                <RXA.17.1/>
                <RXA.17.2></RXA.17.2>
            </RXA.17>
        </RXA>


        <RXR>
            <RXR.1>
                <RXR.1.1/>
                <RXR.1.2>Injection</RXR.1.2>
            </RXR.1>
            <RXR.2>
                <RXR.2.1/>
                <RXR.2.2>Hand</RXR.2.2>
            </RXR.2>
        </RXR>
    </HL7Message>
役に立ちましたか?

解決

When I checked the Encoded message in the dashboard of Mirth connect, the new line was coming. So I thought that it might be the issue with File writer of the destination.

And then found that, it was only the default Notepad of windows that does not show the new line. Opening the generated file in any other editors included the new line. :)

他のヒント

The setting really exist in Mirth connect under the source tab where you define the message separator and segment separator, in HEX format. 0x0D is HEX for Carriage return- message separator.

The xml you have shown is the encoded message. Its not the raw hl7 message which is ascii/text based. Mirth converts the message to XML based for processing.

Take the HL7 message, open it in Notepad++, if you see CR LF block codes at the end of each segment in the message that means your message is properly formatted, if not you have to use a good message. ****

ライセンス: CC-BY-SA帰属
所属していません StackOverflow
scroll top