Mirth:入站消息模板与通道源类型不同

发布于 2024-07-23 12:51:20 字数 1033 浏览 5 评论 0原文

问题是入站消息模板期望的类型与我想要指定或使用的类型不同。 要求是让 SINGLE 通道将 HL7 v2 转换为 v3,调用 Web 服务,然后转换 SOAP 结果 XML,将其转换为 HL7 v2.x 并将其发送回原始调用者。 这必须异步完成

设置: 考虑 Mirth 频道中的情况:

  • 源是 LLP 侦听器。 类型是 HL7 v2.x。 发送者是 HCIS(医疗保健信息系统)。
  • 源变压器,与当前问题无关。
  • 4个目的地(按顺序):

    • Javascript 编写器 - 调用代码模板来执行一些数据库工作。
    • SOAP 发送器 - 调用返回 HL7 v3 的 Web 服务。
    • Javascript 编写器 - 包含一些调用代码模板的 Transformers DB 编写器。 问题就出在这里。
    • Javascript Writer - 再次调用代码模板。
  • 后处理器生成自定义确认以发送回 HCIS。

问题: 入站消息模板需要 HL7 v2.x,因为它继承了源的数据类型。 我需要将 HL7 v3 模板映射到出站消息模板。 出站模板工作正常,因为它没有绑定到任何东西。

 tmp['PID']['PID.5']['PID.5.1'] = msg['controlActProcess']['subject']['target']['identifiedPerson']['name']['family'].toString();

我已经在另一个通道中使用 HL7 v3 作为传入数据类型测试了此设置,并且它运行良好。

问题: 如何强制 Mirth 将我的入站消息模板识别为 HL7 v3,而不是继承通道的传入数据类型?

The problem is that the Inbound Message Template is expecting different type than I want to specify or work with. The requirement is to have a SINGLE channel convert HL7 v2 to v3, call a web service, then convert the SOAP resulting XML, and convert that to HL7 v2.x and send it back to the original caller. This must be done asynchronously.

Setup:
Consider the situation in a Mirth channel:

  • Source is LLP listener. Type is HL7 v2.x. The sender is the HCIS (Health Care Information System).
  • Source Transformer, not relevant to problem at hand.
  • 4 Destinations (in order):

    • Javascript Writer - calling into Code Templates to do some database work.
    • SOAP Sender - calling a web service which returns HL7 v3.
    • Javascript Writer - containing a handful of Transformers DB writer calling into Code Templates. The problem lies here.
    • Javascript Writer - again calling into Code Templates.
  • the PostProcessor generates a custom Acknowledgement to send back to the HCIS.

Problem:
The Inbound Message Template expects HL7 v2.x because it inherits the datatype from the Source. I need to map an HL7 v3 template to an Outbound Message Template. The Outbound Template is working fine, as it's not bound to anything.

 tmp['PID']['PID.5']['PID.5.1'] = msg['controlActProcess']['subject']['target']['identifiedPerson']['name']['family'].toString();

I have tested this setup in another channel with HL7 v3 as the incoming datatype, and it works perfectly.

Question:
How can I force Mirth to recognize my Inbound Message Template as HL7 v3 instead of inheriting the channel's incoming data type?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

路弥 2024-07-30 12:51:20

我知道有点晚了,但是您能否将其分成 2 个通道:一个 HL7 v2.x 到通道编写器,然后另一个设置为 HL7 v3.x 的通道读取器?

如果你解决了这个问题,我很想知道如何解决。

A little late, I know, but could you break it into 2 channels: a HL7 v2.x to a channel writer, and then another set up as a channel reader to HL7 v3.x?

If you've solved this, I'd be curious to know how.

葮薆情 2024-07-30 12:51:20

好吧,我在你提出这个问题两年半后才写这篇文章,所以现在你已经以某种方式处理了它。 但是,为了提供信息,这里是一个答复。

您有一个输入为 HL7 v2.x 的输出连接器。 您需要 XML 格式的输入数据(HL7 v3 是 XML),以便您可以使用 E4X 对其进行操作。

解决方案: Mirth Connect 会自动处理此问题。 只要连接器具有过滤器或转换器,Mirth 就会将输入消息转换为 XML。 您说过该连接器具有转换器,因此您应该可以使用 HL7 输入消息的 XML 表示形式。

如果您使用的通道没有过滤器和变压器,则可以通过添加条件始终为真的过滤器来强制转换。

Okay, I'm writing this two and a half years after you posted the question, so by now you've dealt with it somehow. But, for the sake of making the information available, here's a reply.

You have an output connector whose input is HL7 v2.x. You need the input data in XML format (HL7 v3 is XML) so that you can manipulate it with E4X.

Solution: Mirth Connect handles this automatically. Whenever the connector has a filter or a transformer, Mirth transforms the input message to XML. You said that this connector has transformers, so the XML representation of the HL7 input message should be available to you.

If you are using a channel with no filters and no transformers, you can force the transformation by adding a filter where the condition is always true.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文