This method will search for a segment within the HL7 message and return the reference to that segment as an object that is found.
Set objHL7Segment = objHL7Message.FindSegment("PID", 1)|
Parameter |
Type |
Description |
|---|---|---|
|
Segment |
String |
Segment ID to search for (for example, PID). |
|
Index |
Integer |
Index to start searching from. Note:
Indexes are always the 0-based offset from the first segment in the message, or MSH. Therefore, MSH would be 0, the next segment would be 1, and so on. To find a specific instance of a repeating segment, use GetSequenceNum from the first instance of the segment as input to the next call to FindSegment. |
|
Return Value |
Description |
|---|---|
|
Object ref |
A reference to a COBHL7Segment object. |
|
NULL |
Returned if an error occurred. |