GetFieldValue

Top  Previous  Next

EasyHL7 Object

EHL7.EHL7Message

Method

GetFieldValue(hSegment, nFieldNumber, nFieldComponent)

Parameters

(see below)

Returns

String (Field Value).

Example

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

 

Name: GetFieldValue()

 

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 value from a field element of a segment.  If an error occurs IsError is set to true

 

Programming Note: Passing 0 in nFieldComponent will return the values in ALL components for the field delimited with "^" or an empty string ("") if all components are empty.

 

 

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