HL7 数据是如何被处理的(译文)

来源:互联网 发布:java编程题库 编辑:程序博客网 时间:2024/05/01 10:42

HL7 数据是如何被处理的(译文)

HL7接收和发送管道是HL7处理的关键. DASM解析消息的时候, 3件发生的事情对HL7处理来说是很重要的

 

  1. 如果配置了ACK, 或者说是MSH.15MSH.16的需要, DASM生成一个或多

   个ACKs(决定于配置或MSH的值). 如果消息与部署的HL7 schema 比较是有效

   的, 那么生成一个有效ACK, 否则生成NACK. ACK/NACK与初始消息被放在

   BizTalk message box

 

2. BizTalk Server 从不会丢掉队列中的消息. 某些格式的消息始终被放在

  message box. 如果消息匹配了已经部署的HL7 schema, 该消息被解析

  成XML; 否则该消息不会被解析. 相反地该消息会被以原格式放进message

   box. 数据不被解析(是因为它不符合schema). 失败发生在HL7发送管道

  中运行HL7 ASM, 因为HL7 ASM把数据与预期的schema相比较, 并试图

  把XML格式串行化成HL7 v2的格式. 如果该数据不是一个内部的HL7 XML

   格式, 那么该数据在HL7 ASM运行时失败.

 

3. 在解析阶段, HL7 DASM 把队列中的一个消息分成三部分: 第一部分是MSH

  , DASM用来处理指令的; 第二部分是在已定义的HL7消息段(这些是遵循

  HL7标准的); 第三段是自定义段, 或叫Z, DASM认为是一个消息的结束段

  (这是HL7标准建议的段).

 

Although the DASM expects the bulk of custom segments to appear at the end

 of a message (because the standard suggests that they be placed there), it

can handle floating Z segments. This is because it is designed to assume that

any segment that does not match a segment definition from the message

schema is an undeclared Z segment. However, once the DASM finds a floating

 undeclared Z segment, it assumes that all other segments are Z segments and

 stops validating them.

 

 

摘自: MS文档HL7_V2_DeveloperGuide.doc

下面是原文:

The HL7 Receive and Send pipelines is the crux of HL7 processing. When an HL7 message is parsed by the HL7 Disassembler component of the HL7 pipeline (the HL7 DASM), three things happen that are fundamental to HL7 processing.

·      If configured for acknowledgements, or if the MSH.15 and MSH.16 request them, the DASM generates one or more acknowledgements (depending on the configuration or MSH values). If the message is valid compared to the deployed HL7 schema, a positive acknowledgement is generated (an ACK). If the message does not match the deployed HL7 schema, a negative acknowledgement (or NACK) is generated. The ACK/NACK is placed in the BizTalk message box along with the original message.

·      BizTalk Server never rejects the inbound message. Some format of the message is always placed in the message box. If the message matches the deployed HL7 schema, it is parsed into XML. If the message does not match the deployed HL7 schema, it is not parsed; rather, it is placed into the message box in its original format. Data that is not parsed (because it fails validation against the schema) fails when it runs through the HL7 Assembler component (HL7 ASM) in the HL7 Send Pipeline because the HL7 ASM compares the data to its expected schema and tries to serialize it from XML to an HL7 v2 format. If the data is not in an internal HL7 XML format, it will fail in the HL7 ASM component.

   · During parsing, the HL7 DASM breaks the inbound message into three parts:  one part for the MSH segment, which the DASM uses for processing instructions; one part for the expected segments in the defined HL7 message (those that are defined by the HL7 standards); and one part for custom segments, or Z segments, which the DASM expects to be at the end of a message (as suggested by the HL7 standards).

Although the DASM expects the bulk of custom segments to appear at the end of a message (because the standard suggests that they be placed there), it can handle floating Z segments. This is because it is designed to assume that any segment that does not match a segment definition from the message schema is an undeclared Z segment. However, once the DASM finds a floating undeclared Z segment, it assumes that all other segments are Z segments and stops validating them.

 

原创粉丝点击