This wiki has undergone a migration to Confluence found Here
<meta name="googlebot" content="noindex">

V2 lengths Current wording

From HL7Wiki
Revision as of 21:53, 19 May 2008 by GrahameGrieve (talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

2.5.3.2 Length Definition: Number of characters that one occurrence of the data field may occupy if populated. The information is given in the form of the minimum and the maximum length separated by two dots, e.g. n..m.

In the segment attribute tables and the component tables this information is in a column labeled LEN.

The length is not of conceptual importance in the abstract message or the HL7 coding rules. The length of a field is normative if given. In the normative standard only a few elements exist requiring a predefined length. MSH-1 and MSH-2 are examples thereof. See section 2.B, "Conformance Using Message Profiles". Length definitions SHALL be specified for elements that represent primitive data types i.e. they have no components or sub-components. The following conventions have been applied:

a) The length of the data field shall be expressed in form of two numbers – minimum and maximum length. Those two numbers are separated by two dots e.g. n..m.

b) The length information is only specified if it is of normative interest. According to practice length information may vary. Therefore, it is left to the profile creator to specify the minimum and maximum length within an implementation profile. See Chapter 2B.

c) If the (maximum) length needs to convey the notion of a Very Large Number, the number "*" should be displayed to alert the user. This convention takes the place of the practice in versions prior to 2.7 of abbreviating this expression as 64K or 65536.

d) Informative length definitions for a data field is expressed in form of two numbers in parenthesis e.g. (n..m). This length can be used by an implementer as a reasonable default.

In v 2.7 lengths are being assigned to data types. See HL7 Table 0440 - Data Types.


Current Chapter 2A wording

Beginning HL7 Version 2.5 maximum lengths are being assigned to data types.

The following rules apply to the setting of data type length:

a) The upper bound maximum length of a data type is the sum of:

1) The combined length of all components (including those not required) that are not mutually exclusive.

2) The combined length of the largest set of mutually exclusive components.

3) The combined length of message delimiters that are required to construct the field, based on Section 2.6-Message construction Rules.

b) The lower bound maximum length of a data type is the sum of:

1) The combined length of all required components that are not mutually exclusive.

2) The combined length of the largest set of mutually exclusive required components.

3) The combined length of message delimiters that are required to construct the field, based on Section 2.6-Message construction Rules.