IMPAX 6.5.1 Server Knowledge Base home > Configuring IMPAX Server with Administration Tools > Source Manager > Customizing field mappings to extract information from images > List of field mapping grammar functions

sub


This function returns the substring within the input text string defined by the offset and length parameters.

Syntax

sub( input, offset, length, [pad] )

Parameters

Remarks

The input text string can be another field mapping grammar function.

If the number of characters available in the input string starting at the offset position is fewer than the number defined by the length parameter, then the substring returned by this function is left-padded (that is, the string text is right-justified) with padding characters.

Examples

A string that includes the patient ID (1234), patient name (TEST^PATIENT), and study start date (2002Jan24) concatenated together as a single string using no separator character.

Element to extract Expression Text extracted
Patient ID sub( '1234TEST^PATIENT2002Jan24', 0, 4 ) 1234
Patient name sub( '1234TEST^PATIENT2002Jan24', 4, 12 ) TEST^PATIENT
Study start date sub( '1234TEST^PATIENT2002Jan24', 16, 9 ) 2002Jan24

See also


Topic number: 9017

Applies to: IMPAX 6.5.1 Server Knowledge Base