简体   繁体   English

TCP HL7消息以。(句点)作为段终止符

[英]TCP HL7 message has .(period) as segment terminator

I am receiving a hl7 message through tcp, in which am getting message with .(periods) at the end of each segments, so my hl7 receiver engine is unable to process the message and its breaking, sample message through tcp is 我正在通过tcp收到一条hl7消息,在该消息中,每个段的末尾都带有。(句点)。因此,我的hl7接收器引擎无法处理该消息,并且它通过tcp的中断,示例消息是

%0D%0A00000000 | 00 00 02 fc 10 5e 00 00 00 00 00 00 02 e2 0b 4d .....^.........M
%0D%0A00000016 | 53 48 7c 5e 7e 5c 26 7c 41 54 48 45 4e 41 4e 45 SH|^~\&|AAEEAAEE
%0D%0A00000032 | 54 7c 36 31 30 5e 56 41 20 2d 20 4d 69 64 20 41 T|610^VA - Mode B
%0D%0A00000048 | 74 6c 61 6e 74 69 63 20 57 6f 6d 65 6e 27 73 20 ody test 
%0D%0A00000064 | 43 61 72 65 7c 56 49 5a 54 45 4b 3a 3a 36 31 30 Care|VIoTooK::610
%0D%0A00000080 | 7c 7c 32 30 31 34 30 35 33 30 31 35 30 33 7c 7c ||201405301503||
%0D%0A00000096 | 53 49 55 5e 53 31 35 7c 31 38 35 32 31 37 34 32 SIU^S15|18521742
%0D%0A00000112 | 7c 54 7c 32 2e 32 7c 7c 7c 7c 7c 7c 7c 7c 0d 53 |T|2.2||||||||.S
%0D%0A00000128 | 43 48 7c 36 34 30 39 36 34 33 7c 36 34 30 39 36 CH|6409643|64096
%0D%0A00000144 | 34 33 7c 7c 7c 7c 31 5e 50 54 20 43 41 4e 43 45 43||||1^PT CANCE
%0D%0A00000160 | 4c 4c 45 44 7c 54 65 73 74 69 6e 67 3b 54 45 53 LLED|Testing;TES
%0D%0A00000176 | 54 49 4e 47 7c 4d 41 32 30 5e 4d 41 4d 4d 4f 47 TING|MA20^MAMMOG
%0D%0A00000192 | 52 41 4d 7c 32 30 7c 6d 69 6e 75 74 65 73 7c 5e RAM|20|minutes|^
%0D%0A00000208 | 5e 5e 32 30 31 34 30 36 30 32 30 38 32 30 7c 7c ^^201406020820||
%0D%0A00000224 | 7c 7c 7c 6d 68 65 61 6e 67 7c 7c 7c 7c 7c 7c 7c |||mheang|||||||
%0D%0A00000240 | 7c 7c 0d 50 49 44 7c 7c 34 37 35 30 31 33 7c 34 ||.PID||475013|4
%0D%0A00000256 | 37 35 30 31 33 7c 7c 54 45 53 54 45 52 5e 41 54 75013||TESTER^AT
%0D%0A00000272 | 48 45 4e 41 5e 5e 7c 7c 31 39 39 34 30 35 33 30 HENA^^||19940530
%0D%0A00000288 | 7c 46 7c 7c 39 30 30 5e 57 68 69 74 65 7c 33 31 |F||900^White|31
%0D%0A00000304 | 31 20 41 52 53 45 4e 41 4c 20 53 54 52 45 45 54 1 ARSENAL STREET
%0D%0A00000320 | 5e 5e 57 41 54 45 52 54 4f 57 4e 5e 4d 41 5e 30 ^^WATERTOWN^MA^0
%0D%0A00000336 | 32 34 37 32 5e 55 4e 49 54 45 44 20 53 54 41 54 2472^UNITED STAT
%0D%0A00000352 | 45 53 7c 7c 28 36 36 36 29 36 36 36 2d 36 36 36 ES||(666)666-666
%0D%0A00000368 | 36 5e 28 37 37 37 29 37 37 37 2d 37 37 37 37 7c 6^(777)777-7777|
%0D%0A00000384 | 28 39 39 39 29 39 39 39 2d 39 39 39 39 7c 31 32 (999)999-9999|12
%0D%0A00000400 | 34 5e 45 6e 67 6c 69 73 68 7c 53 7c 7c 7c 31 32 4^English|S|||12
%0D%0A00000416 | 33 34 35 36 37 38 39 7c 7c 7c 34 33 5e 4e 6f 74 3456789|||43^Not
%0D%0A00000432 | 20 48 69 73 70 61 6e 69 63 20 6f 72 20 4c 61 74 Hispanic or Lat
%0D%0A00000448 | 69 6e 6f 7c 7c 7c 7c 7c 7c 7c 7c 0d 50 56 31 7c ino||||||||.PV1|
%0D%0A00000464 | 7c 7c 31 37 5e 4d 41 49 43 2d 43 68 65 73 61 70 ||17^MAIC-Chesap
%0D%0A00000480 | 65 61 6b 65 5e 5e 4d 41 49 43 2d 43 68 65 73 61 eake^^MAIC-Chesa
%0D%0A00000496 | 70 65 61 6b 65 7c 7c 7c 7c 34 35 5e 4d 41 4d 4d peake||||45^MAMM
%0D%0A00000512 | 4f 47 52 41 4d 7c 33 37 30 32 5e 53 4d 49 54 48 OGRAM|3702^SMITH
%0D%0A00000528 | 2c 20 43 4c 41 59 54 4f 4e 7c 7c 7c 7c 7c 7c 7c , CLAYTON|||||||
%0D%0A00000544 | 7c 7c 34 35 5e 4d 41 4d 4d 4f 47 52 41 4d 7c 7c ||45^MAMMOGRAM||
%0D%0A00000560 | 7c 7c 7c 7c 7c 7c 7c 7c 7c 7c 7c 7c 7c 7c 7c 7c ||||||||||||||||
%0D%0A00000576 | 7c 7c 7c 7c 7c 7c 7c 7c 7c 7c 7c 7c 7c 7c 7c 7c ||||||||||||||||
%0D%0A00000592 | 7c 0d 44 47 31 7c 7c 49 43 44 39 7c 7c 6e 6f 20 |.DG1||ICD9||no 
%0D%0A00000608 | 63 75 72 72 65 6e 74 20 64 69 61 67 6e 6f 73 69 current diagnosi
%0D%0A00000624 | 73 7c 7c 7c 7c 7c 7c 7c 7c 7c 7c 7c 7c 7c 7c 7c s|||||||||||||||
%0D%0A00000640 | 0d 52 47 53 7c 7c 7c 0d 41 49 47 7c 7c 7c 4d 41 .RGS|||.AIG|||MA
%0D%0A00000656 | 4d 4d 4f 47 52 41 4d 7c 7c 7c 7c 7c 32 30 31 34 MMOGRAM|||||2014
%0D%0A00000672 | 30 36 30 32 30 38 32 30 7c 7c 7c 32 30 7c 6d 69 06020820|||20|mi
%0D%0A00000688 | 6e 75 74 65 73 7c 7c 0d 41 49 4c 7c 7c 7c 31 37 nutes||.AIL|||17
%0D%0A00000704 | 5e 4d 41 49 43 2d 43 68 65 73 61 70 65 61 6b 65 ^MAIC-Chesapeake
%0D%0A00000720 | 7c 7c 7c 32 30 31 34 30 36 30 32 30 38 32 30 7c |||201406020820|
%0D%0A00000736 | 7c 7c 32 30 7c 6d 69 6e 75 74 65 73 7c 7c 1c 0d ||20|minutes||..

As you can see each segment is ended with periods. 如您所见,每个段都以句点结尾。 So How to process the message? 那么如何处理消息? I cannot replace all periods since periods may also exist in midst of the message. 我无法替换所有句点,因为消息中间也可能存在句点。

Any help will be appreciated. 任何帮助将不胜感激。

The message you are viewing arrived to you via TCPIP. 您正在查看的消息是通过TCPIP到达的。 It is wrapped in MLLP protocol for transmission. 它包装在MLLP协议中进行传输。 Hex 0b is the message header and 1c 0d is the footer. 十六进制0b是消息头,1c 0d是页脚。

You can find more information about MLLP at this link: http://www.interfaceware.com/blog/common-hl7-transports/ 您可以在以下链接中找到有关MLLP的更多信息: http : //www.interfaceware.com/blog/common-hl7-transports/

Incidentally the 4 characters immediately following MSH are what define the separators that should be used throughout the message. 顺便说一句,紧随MSH之后的4个字符定义了应在整个消息中使用的分隔符。 Let me know if you need a follow up. 让我知道您是否需要跟进。

Edit it seems I may have misunderstood the question. 编辑似乎我可能误解了这个问题。 There appears to be nothing wrong with the message. 该消息似乎没有错。 Those are carriage returns separating the segments. 这些是回车,将各段分开。 Hope that helps. 希望能有所帮助。

There is no period "." 没有句号“。” segment delimiter in your HL7 Message. HL7消息中的分段定界符。 If you look carefully, you will see, that the segment delimiter is 0d in hex or 13 in decimal notation. 如果仔细看,您会发现段分隔符为十六进制的0d或十进制的13。 This is standard. 这是标准的。 Just your editor plane shows not representable bytes as periods instead of chars. 只是您的编辑器平面将不可表示的字节显示为句点而不是字符。

So your issue is something different. 因此,您的问题有所不同。

I recommend to show your message in two different ways, separate the hex and the character presentation. 我建议以两种不同的方式显示您的消息,将十六进制和字符表示法分开。

I would consider reading the Microsoft documentation on the HL7 format. 我会考虑阅读有关HL7格式的Microsoft文档。

In particular, the following two articles may be of use: 特别是,以下两篇文章可能有用:

It's worth noting that period is not mentioned as a delimiter in Microsoft's documentation. 值得注意的是,微软文档中没有将句点作为分隔符。 As such, it sounds like your message format is non-standard, and furthermore, periods which are not supposed to be terminators are not being escaped ( \\. ). 因此,您的消息格式听起来像是非标准的,而且,没有被视为终止符的句点也无法转义( \\. )。

It sounds like you may need to request that your client escape these characters and, if possible, follow the HL7 specification. 听起来您可能需要请求客户端转义这些字符,并在可能的情况下遵循HL7规范。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM