Description
Return fieldNumber for ordinary split arrays; for MSH return fieldNumber-1 except separator MSH-1, represented by splitIndex -1 and separatorField true.
Clinical exchange formats use exact delimiters, character grammars, and scoped identifiers. A local token check addresses one syntax condition and can succeed without validating a complete message or its clinical meaning.
Return fieldNumber for ordinary split arrays; for MSH return fieldNumber-1 except separator MSH-1, represented by splitIndex -1 and separatorField true.
When to use this tool
Use HL7 Segment Field Number Offset when you need one bounded spelling, delimiter, or identifier component.
How to use the tool and how it works
- Enter segment, fieldNumber. Use the units and conventions below.
- Run the tool. Correct any format, range, or cross-field input error before interpreting the output.
- Read splitIndex, separatorField. Inspect separatorField before interpreting the associated values.
Require a three-character uppercase ASCII letter/digit segment and positive fieldNumber. Return fieldNumber for ordinary split arrays; for MSH return fieldNumber-1 except separator MSH-1, represented by splitIndex -1 and separatorField true.1
| Input field | Meaning and units | Accepted input |
|---|---|---|
| segment | Segment | Required. Text; maximum UTF-16 length 8192. |
| fieldNumber | Field Number | Required. Safe integer; minimum 1. |
| Output field | Interpretation | Returned shape |
|---|---|---|
| splitIndex | Index into an array including segment ID at position zero; -1 sentinel for the MSH-1 separator. | Required. Safe integer. |
| separatorField | Whether the requested field is MSH-1, which has no ordinary split-array element. | Required. Boolean. |
{
"input": {
"segment": "MSH",
"fieldNumber": 2
},
"output": {
"splitIndex": 1,
"separatorField": false
}
} Limitations and assumptions
- The split array includes segment ID at index zero and the MSH separator is outside that indexing; no full HL7 message, delimiter configuration, field semantics, or profile is validated.
- Inputs must satisfy both the field types and the cross-field conditions above. Invalid input causes an error; a successful false flag or documented placeholder is a different result.
- Numeric calculations use binary floating point unless exact decimal-integer arithmetic is explicitly stated. No hidden measurement tolerance or decimal rounding is added; nonfinite or out-of-contract results are rejected. Numeric signed-zero results are exported as zero.
Alternative or Complementary methods
Use the relevant full standard, implementation profile, and validated parser when interoperable or clinical record validity matters.
References
Similar or alternative tools
- HL7 Delimiter Role Label
Map the concatenated order to field, component, repetition, escape, subcomponent, and optional truncation roles.
- HL7 Person Name Family Given Component Token
Return the first as family, second as given, and all remaining as additional.