2

在自 BT2006 离开 Biztalk 之后,我们正在考虑将其带回组织中。我早期遇到的挫折之一是在处理 HL7 和编排时,我们需要为每种 ADT 消息类型进行单独的编排,即使每种类型的架构本质上是相同的,并且每个编排都做了完全相同的事情。进入 BizTalk 2010 世界,这里有什么改进吗?是否有一种模式可以用来为所有 ADT 类型使用单个编排?

4

2 回答 2

3

如我所见,您在这里有两种可能性。

  1. 将消息视为匿名消息。这意味着您的消息是“未键入的”(您将其声明为 System.Xml.XmlDocument 类型)。然后您的编排可以询问消息以确定它是什么类型。
  2. 创建一个信封消息,其正文可以是所有可能的消息类型(使用 xsd 选择组选择器)。然后,您的编排处理信封消息类型。使用这种方法,您可以通过在信封头中设置一个值来声明包含在信封正文中的类型。

我更喜欢第二个;虽然这肯定需要更多的工作(您需要将所有入站消息包装在一个信封中),但它允许您通过查看信封标题来了解消息的内容。这意味着如果需要,您仍然可以按消息类型进行路由。

于 2012-04-09T09:12:03.203 回答
3

自 2006 年发布以来,BizTalk 中的 HL7 消息传递基本保持不变。因为 BizTalk 为每种消息和事件类型(例如 ADT^A01、ADT^A03、ADT^A08)定义了一个架构,而不仅仅是针对每种消息类型(例如 ADT、BAR、MDM),您的映射和编排很快就会变得一团糟。

以下是我过去为解决此限制所做的工作:

  1. 允许消息以无类型方式进入编排。即设置 MessageType = System.Xml.XmlDocument。我发现一般来说,我只对解析或更新一些元素感兴趣,所以我只需编写一个带有一些通用 linq 语句的辅助库来获取我需要的数据。这样,我可以编写一个获取 PID-3(患者 ID 号)的 linq 语句,并且我可以在任何消息或事件类型上一致地使用它,因为 PID 保持不变。同样,我也会使用相同的技术来更新消息。如果您要更新的字段存在较大的结构差异,或者您要读取/更新大量数据,则此技术效果不佳。
  2. Create master/canonical HL7 message type schemas. This takes a bit more work, but depending on how many message types you are looking to process, this can really pay off and is more consistent with how healthcare organizations think of their HL7 interfaces. In order to do this, you would need to define a new schema for a message type and include all possible segments for this message. So, instead of having multiple ADT types defined, you would roll all the possible variations for A01, A03, A04, etc. under one master schema. This will allow you greatly reduce the amount of mapping and parsing logic needed. Unfortunately, since this is not the HL7 accelerator's default behavior and will require some custom pipelines and orchestration logic to achieve. Basically, you will need to modify some properties to get the Accelerator to think that your new master message is valid.

For mostly pass-through interfaces, I would recommend technique #1. Otherwise, if you will be generating or needing to consume basically any message event in a canonical fashion, technique #2 can pay off in the long run.

于 2012-04-10T16:08:03.493 回答