GetEscFieldValue

Top  Previous  Next

EasyHL7 Object

EHL7.EHL7Message

Method

GetEscFieldValue(hSegment, nFieldNumber, nFieldComponent)

Parameters

(see below)

Returns

String (field value)

Example

strValue = oMSG.GetEscFieldValue(strPIDHandle,5,1)  -- returns the value of field 5 component 1 of the segment referenced in strPIDHandle

 

 

Refer to the EasyHL7 documentation for a discussion of ESCAPE characters in HL7: http://www.hermetechnz.com/Documentation/EasyHL7/escapecharactersinhl7.htm

 

Name: GetEscFieldValue()

 

Parameters

1) hSegment (Segment Handle)

2) nFieldNumber (Long) index of the data field in the segment (1-xxx) to get value from

3) nFieldComponent (Optional Long) Default = 1, which component of the field element to get value from

       

Returns: String

 

Description: Returns the "Escaped" value from a field / component element of a segment.  If an error occurs IsError is set to true.

 

Programming Note: Passing 0 in nFieldComponent will return the escaped values in ALL components for the field delimited with component delimiter or an empty string ("") if all components are empty.  When calling this method it is safest to pass a value > 0 in the nFieldComponent parameter. 

 

For further information, please see the EasyHL7 documentation http://www.hermetechnz.com/Documentation/EasyHL7/index.html.