Previous Page TOC Index Next Page

2.23.4 Modes for updating via repeating segments

When groups of repeating segments appear within a message it is not obvious from the basic HL7 abstract message syntax how best to apply the new group of repeating segments on the receiving system. HL7 suggests two methods: the "snapshot" mode and the "action code/unique identifier" mode.

Background:

The segments which repeat in HL7 messages ADT/Finance messages ( AL1, DG1, PR1, GT1, IN1, IN2, IN3, NK1 , NTE) present a problem if the requirement is to update only part of the information previously sent. Prior to this (2.3) version of the Standard, all such repeating segments had to be sent again in the update, because there was no way to indicate which ones changed and which ones didn’t. For example, if two DG1 segments were sent originally (containing a primary and secondary diagnosis), and then if a tertiary diagnoses needed to be sent, the sending system had to send all diagnoses which were currently valid, that is, three DG1 segments (containing primary, secondary and tertiary diagnosis). This way of doing things is referred to as the "snapshot" mode. In this mode, everything (all repeating segments) must be sent with every subsequent message in the series of messages.

In the Order Entry, Observation Reporting and Master Files chapters, action codes (e.g., order control codes and result status codes) and unique identifiers (e.g., placer and filler numbers) are currently specified as part of the ORC, OBR, OBX and MFE segments. So, except for the NTE segments, this problem exists mainly for the ADT and Finance chapter segments.

For systems implementing Version 2.3 or higher, if a particular repeating segment can be updated by either of these two modes, the parties concerned will determine by agreement on a site-specific basis whether an interface will use the "snapshot" mode or the "action code/unique identifier" mode.

2.23.4.1 Snapshot mode update definition

In the "snapshot" mode, the group of repeating segments from the incoming message replaces the prior group of repeating segments on the receiving system. This is equivalent to a deletion of the prior group followed by the addition of the new group. The snapshot mode is the usual mode in Version 2.2 and 2.1 implementations of HL7, but it is also available for Version 2.3 and future versions. To specify "delete all of the segments in this repeating group" in the snapshot mode, send a single segment with "delete data" indicated for all fields.

For example, if the following DG1 segment is in an ADT update message (for an inpatient stay):

DG1|""|""|""|""|""|""|""|""|""|""|""|""|""|""|""|""|""|""|""<CR>

and the snapshot mode is being used, this indicates that all previously transmitted diagnoses for this inpatient stay should be deleted.

2.23.4.2 Action code/unique identifier mode update definition

In the "action code/unique identifier" mode, each member of a repeating group of segments must have a unique identifier (equivalent to the filler number in observational reports messages). The choice of delete/update/insert is determined by the action code (equivalent to the result status in observational reports messages). Refer to HL7 table 0206 - Segment action code for valid values.

Table 0206 - Segment action code

Value

Description

A

Add/Insert

D

Delete

U

Update

The unique identifier is defined in a general manner as follows: it uniquely identifies one of multiple repetitions of the primary entity defined by the repeating segment in a way that does not change over time. It is not dependent on any particular message identifier level (MSH) fields; it functions across messages, not just within a message. The unique identifier will be chosen on a segment-specific basis, depending on the primary entity referenced by the segment. For some cases, such as a diagnosis code, it may be a CE data type. For others, such as a person identifier, it may be a CX data type. For others it may be an EI (entity identifier) data type.

Note: This mode is available for use only for new segments for Version 2.3 and for new segments in future versions

Previous Page TOC Index Next Page