Skip to content

Main content

HL7 Component Escape Gap Tool

Inspect literal HL7 escape-delimited spans before counting component separators; no escape-content decoding or full message validation.

Loading tool…

Description

Toggle escape state at each escape delimiter, count completed pairs, count separators outside pairs, and report unclosedEscape.

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.

Toggle escape state at each escape delimiter, count completed pairs, count separators outside pairs, and report unclosedEscape.

When to use this tool

Use HL7 Component Escape Gap when you need one bounded spelling, delimiter, or identifier component.

How to use the tool and how it works

  1. Enter componentText, escapeCharacter, componentSeparator. Use the units and conventions below.
  2. Run the tool. Correct any format, range, or cross-field input error before interpreting the output.
  3. Read unescapedSeparators, completedEscapes, unclosedEscape. Inspect unclosedEscape before interpreting the associated values.

Require distinct one-unit escapeCharacter and componentSeparator. Toggle escape state at each escape delimiter, count completed pairs, count separators outside pairs, and report unclosedEscape.1

Input fieldMeaning and unitsAccepted input
componentTextComponent TextRequired. Text; maximum UTF-16 length 8192.
escapeCharacterEscape CharacterRequired. Text; maximum UTF-16 length 8192.
componentSeparatorComponent SeparatorRequired. Text; maximum UTF-16 length 8192.
Output fieldInterpretationReturned shape
unescapedSeparatorsUnescaped SeparatorsRequired. Safe integer.
completedEscapesCompleted EscapesRequired. Safe integer.
unclosedEscapeUnclosed EscapeRequired. Boolean.
json
{
  "input": {
    "componentText": "A\\S\\B^C",
    "escapeCharacter": "\\",
    "componentSeparator": "^"
  },
  "output": {
    "unescapedSeparators": 1,
    "completedEscapes": 1,
    "unclosedEscape": false
  }
}

Limitations and assumptions

  • This screens delimiter balance only; empty or invalid escape bodies can still form completed pairs, and no HL7 escape semantics or full message 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.

Alternative or Complementary methods

Use the relevant full standard, implementation profile, and validated parser when interoperable or clinical record validity matters.

References

  1. Calculation and input contract: health-informatics/hl7-component-escape-gap — tool.io

Similar or alternative tools