Go to the first, previous, next, last section, table of contents.

Classes and types of objects

An HL7 object may be of one of the following classes, which is not to be confused with a C++ class:

the set of delimiters
a HL7 message
a group in a HL7 message
a segment
a data type, either atomic or composite

Except for the set of delimiters, any class may be repetitive, which is reflected in the repeat bit in the status byte. An HL7 object of a certain class may be of some type. For example, if the object is a segment, then the type would be MSH or QRR etc. The appropriate values are taken from the table, which defines the message type, segment id, and data types.

The information about Class and Type is not as vital as is the status information. In fact, there are object classes which do not have a type (group, dset) or which can not repeat (dset). However, there are cases, when e.g. a segment has to be read, without knowing, in advance, what segment this will be. Therefore, we need a method to identify the type of a segment anyway, thus it seems reasonable to let the object identify itself. Classes and types can be set only by the object's setclass() and settype() members, which are not public. However the public can see the class and type of an object with theclass() and thetype().

Go to the first, previous, next, last section, table of contents.