com.merge.HL7
Interface HL7Field.FieldFormatter

Enclosing class:
HL7Field

public static interface HL7Field.FieldFormatter

Defines the interface for formatting simple field values before sending and after receiving.


Method Summary
 java.lang.String formatValue(java.lang.String value, HL7MessageConfiguration config, java.lang.String fieldType)
          Called by the toolkit to format the value of a field before sending.
 java.lang.String unFormatValue(java.lang.String value, HL7MessageConfiguration config, java.lang.String fieldType)
          Called by the toolkit to remove formatting from the received value of a simple field.
 

Method Detail

formatValue

java.lang.String formatValue(java.lang.String value,
                             HL7MessageConfiguration config,
                             java.lang.String fieldType)
Called by the toolkit to format the value of a field before sending. E.g. escaping separator characters.

Parameters:
value - The value of the field to be formatted,
config - The configuration object containing separators.
fieldType - The type of the field.
Returns:
A formatted string that will be sent as the value of the field.

unFormatValue

java.lang.String unFormatValue(java.lang.String value,
                               HL7MessageConfiguration config,
                               java.lang.String fieldType)
Called by the toolkit to remove formatting from the received value of a simple field. E.g. removing escaping of separator characters.

Parameters:
value - The received value.
config - The configuration object containing separators.
fieldType - The type of the field.
Returns:
A string that will be stored as the value of the field.

Copyright © 2010 Merge Healthcare Inc. All Rights Reserved.