HAPI HL7 处理响应消息

问题描述 投票:0回答:1

我是 HAPI 新手,正在检查它。 当我向服务器发送 Q01 消息(Hapi Test Panel Vers. 2.01)时,响应消息无法进一步处理,因为换行存在问题。

响应消息看起来像(如果我使用 parser.encode(message),结果相同。

System.out.println("Received response: "+response); -> returns:
A|AA|12345ponse: MSH|^~\&|Fac1|App1|Fac2|App2|20240423125734.121+0200||ACK^Q01|804||2.3.1

我需要从 HAPI TestPanel 发送的所有段。

我该如何处理这个问题?

hl7 hapi
1个回答
1
投票

HAPI 中换行符的使用有点棘手。所以在末尾插入一个,例如:

System.out.println("Received response: "+response +"\n");
© www.soinside.com 2019 - 2024. All rights reserved.