문제

The HL7 receiver I am sending to is expecting a very specific end of file marker in a TCP Message:

<FS><CR>

Where <FS> is ascii 28 and <CR> is ascii 13.

We are using Mirth 2.x as our HL7 engine. The <CR> (Carriage Return) is fairly straight forward.

But how do I send the The File separator?

도움이 되었습니까?

해결책

Here is how I was able to solve this problem.

In the source transformer I defined "Start of File" and "End of File" variables like this:

channelMap.put('SOF',String.fromCharCode(11)); // Start Of File: returns \v (vertical tab));
channelMap.put('EOF',String.fromCharCode(28,13)); // End Of File: returns <FS><CR>);

In the destination template I then did this:

${SOF}${message.encodedData}${EOF}

I wrote the messages out to temporary file and opened them in a Hex Editor. I was able to confirm that the a 0x0B (Ascii 11) was written prior to the message and the message closed with 0x1C 0x0D (Ascii 28, Ascii 13)

다른 팁

I'd recommend using the LLP Sender in Mirth. It can be configured to use different separator chars if needed.

My guess is that the two bytes you are seeing are the end of of segment and the end of message chars.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top