如何使用 hapi 简单服务器接收未经请求的 hl7 消息?
我正在尝试使用 hapi 库开发一个简单的 hl7 服务器,基于此示例: http://hl7api.sourceforge.net/xref/ca/uhn/hl7v2/examples/SendAndReceiveAMessage.html
我可以向另一个发送查询消息,我在套接字上得到了确认发送 QBP^Q22,但没有运气在单独的端口上接收查询响应。我尝试尽可能地遵循上面的示例,并尝试用 TwoPortServer 替换 SimpleServer,但这似乎并没有更好的效果。 有什么想法吗?
I'm trying to develop a simple hl7 server using the hapi library, based on this example: http://hl7api.sourceforge.net/xref/ca/uhn/hl7v2/examples/SendAndReceiveAMessage.html
I can send a query message to another, I get the acknowledgement on the socket used to send the QBP^Q22, but had no luck receiving the query response on a seperate port. I've tried to follow the above example as closely as possible, and tried replacing the SimpleServer with TwoPortServer, but that didn't seem to work any better.
Any ideas?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
根据我的经验,MSH 段中有两个字段允许您告诉客户端和服务器通过哪些端口进行通信。据我所知,您正在硬编码的消息,这两个端口没有显示。为了遵循 HL7 标准,我建议弄清楚如何使用这两个字段。
In my experience, there are two fields in the MSH segment that allow you to tell the client and server which ports to communicate over. From what I can tell about the message that you are hard coding, these two ports are not shown. In order to follow the HL7 standard, I recommend figuring out how those two fields are used.