简体   繁体   English

HL7段中括号和括号的含义是什么?

[英]What do brackets and braces mean in HL7 segments?

I'm working on a project that involves HL7 messages. 我正在开发一个涉及HL7消息的项目。 I've been reading the documentation to understand what the different kind of segments mean. 我一直在阅读文档,以了解不同类型的细分是什么意思。

I've come across three different kinds of syntax when looking at the documents, they are below: 在查看文档时我遇到了三种不同的语法,它们如下:

在此输入图像描述

What is the difference between a segment without any sort of braces or brackets, a segment with both braces and brackets, and a segment with just brackets? 没有任何大括号或括号的段,带有大括号和括号的段以及带有括号的段之间有什么区别?

I assumed a segment with brackets may be some sort of array or list, but I haven't been able to find anything confirming this. 我假设带括号的段可能是某种数组或列表,但我无法找到确认这一点的任何内容。

Brackets indicate the segment is optional. 括号表示该段是可选的。 [UAC] means the UAC segment may or may not be in the message. [UAC]表示UAC段可能在消息中,也可能不在消息中。

Braces (or curly brackets) indicate the segment can repeat. 大括号(或大括号)表示该段可以重复。 [{ SFT }] means the SFT segment may or may not be in the message, and could repeat multiple times if it is. [{ SFT }]表示SFT段可能在消息中,也可能不在消息中,如果是,则可能重复多次。

A segment without any brackets or braces should be in the message once. 没有任何括号或大括号的段应在消息中一次。

See this page for example. 例如,请参阅此页面

Segment with brackets ( [] ): 带括号的段( [] ):
- Brackets indicate segment is optional. - 括号表示段是可选的。
- These segments may or may not present in the message. - 这些段可能会也可能不会出现在消息中。

Segment with braces ( {} ): 带括号( {} )的细分:
- Braces indicate segment is repeatable. - 大括号表示分段是可重复的。
- These segments may repeat more than once in same message. - 这些段可能会在同一条消息中重复多次。
- The sequence of repeat segments may also matter. - 重复片段的顺序也很重要。

Based on above, meaning of other combinations can be easily understood. 基于上述,可以容易地理解其他组合的含义。

Segment without brackets and braces: 没有括号和大括号的段:
- These are mandatory segments (not optional; as not enclosed in brackets). - 这些是必填段(不是可选的;不包括在括号中)。
- These are allowed only once in the message (no repeat; as not enclosed in braces). - 这些只在消息中允许一次(不重复;不包括在大括号中)。
- That means one and only one instance of the segment must present in the message. - 这意味着该段中必须只有一个实例出现在消息中。

Segment with brackets as well as braces: 带括号和括号的段:
- These are optional segments (as enclosed in brackets). - 这些是可选段(括在括号中)。
- If present , these may occur once or multiple time in the message (as enclosed in braces). - 如果存在 ,这些可能在消息中出现一次或多次(如括号中所示)。

You may find the details here and here . 您可以在此处此处找到详细信息。


So, in your screen shot in question: 所以,在您的屏幕截图中:

  • MSH segment must present only once . MSH必须 只出现一次
  • [{SFT}] segment may not present at all; [{SFT}]可能根本不存在 ; may present once ; 可能会出现一次 ; may present multiple times . 可能会出现多次
  • [UAC] segment may present only once or may not present at all. [UAC]部分可能只出现一次或根本不出席。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM