An index is a parameter used to identify a specific position within the context of an object. In the HL7 API, indexes always start at 0.
For example, if you were to index segments within the context of an HL7 message, the first segment would have an index of 0. The next segment would have an index of 1. If you were to index fields within the context of a segment, the first field would have an index of 0. The next field would have an index of 1.
If a script should find a specific instance of a repeating segment, such as OBX, you may need to use other methods to provide the appropriate context for the index. See the note under FindSegment.