property Element[sCode : String] : IHL7CommonDataCell; (Default) (Read)

Class IHL7Message

Element is the most convenient way to retrieve content Code is a string with format SEG[]-N[].O.P

  Seg - 3 letter code of segment
  N   - Data Element index (starts at 1)
  O   - Component Element index (starts at 1) [optional]
  P   - Subcomponent index  [optional]

SEG-N-O-P is also accepted

both SEG and N can be followed by a condition to specify which repeat to use. In the absence of such a condition:

  for segments:      First matching segment
  for data elements: First Repeat (actually the 0th repeat, the field that isn't a repeat)

if a condition is specified, it can be a simple number - choose the nth instance. (note that the first segment is 1 and the first field is 0).

Alternatively, the condition can be an expression using any combination of the following items:

  =    case sensitive equals
  ==   non case sensitive equals
  !=   not equals
  !==  not equals - not case sensitive
  ~    Regex test
  |~   starts with (not case sensitive)
  ~|   ends with (not case sensitive)
  +    addition - numerical if both operands a numeric, else string concatenation
  ++   forced numerical addition (will be an error if one or both operands are not numerical)
  -    numerical subtraction (will be an error if one or both operands are not numerical)
  &    string concatenation
  and  logical and
  or   logical or
  xor  logical xor
  @    a nested query. The context for the nexted query will be the segment or field to which the condition is attached
  ""   string constants (double "" inside string constants for the character ")

Special Variables:

  @index  The index of this instance in the list

Support for () as precendence operators is planned, but they are not currently supported.

if a condition simply consists of a number, it will be taken to be a reference to the index i.e. PID[2] is the same as PID[@index=2]


  EVN-1                                  Event Type
  MSH-9-3                                Structure identifier
  PID[1]-3-1                             UR number in second PID segment (i.e. in an A17 message) - counting is from zero
  PID-11[@7="H"].1                       1st Street line of Home Address
  PID-13[@2 = "PRN" and @3="PH"].1       Phone number for home phone
  OBX[@3.1="HEIGHT" or @3.2="HEIGHT"]-5  Value from OBX segment for Weight

© Kestral Computing P/L 2000 - 2003. HL7Connect v2.00-063 generated on 30-Nov 2015.
Keywords: Element