LastComponent

Top  Previous  Next

New in version 2.x of Commando

EasyHL7 Object

EHL7.EHL7Message

Method

LastComponent(hSegment, nFieldNumber)

Parameters

(see below)

Returns

Long (the last component in the field which contains data)

Example

nComponent = oMSG.LastComponent(strPIDHandle, 5 )  -- returns component index of the last component in the patient name field which has a value

 

Name: LastComponent()

 

Parameters

1) hSegment (Segment Handle)

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

 

       

Returns: Number (Long)

 

Description: Returns component index of the last component in the field which has a value.  If an error occurs IsError is set to true and the function returns -1.  If the field is empty the function returns 0

 

 

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