Skip to content

Main content

DICOM Decimal String Exponent Guard Tool

Validate one DICOM DS decimal token including its 16-character budget and permitted surrounding spaces; preserve lexical form separately from the finite numeric value.

Loading tool…

Description

Convert to a finite Number and return the trimmed lexical token and hasExponent.

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.

Convert to a finite Number and return the trimmed lexical token and hasExponent.

When to use this tool

Use DICOM Decimal String Exponent Guard when you need one bounded spelling, delimiter, or identifier component.

How to use the tool and how it works

  1. Enter token. 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 lexical, value, hasExponent. Inspect hasExponent before interpreting the associated values.

Require 1-16 characters, trim outer ASCII spaces, and validate decimal spelling with optional exponent. Convert to a finite Number and return the trimmed lexical token and hasExponent.1

DICOM Decimal String permits exponent notation and outer space padding. A finite binary Number conversion still differs from exact decimal preservation and cannot validate a complete data element.2

Input fieldMeaning and unitsAccepted input
tokenText in the explicitly supported lexical grammar.Required. Text; maximum UTF-16 length 8192.
Output fieldInterpretationReturned shape
lexicalLexicalRequired. Text; maximum UTF-16 length 8192.
valueValue on the measurement or record basis stated above.Required. Finite number.
hasExponentHas ExponentRequired. Boolean.
json
{
  "input": {
    "token": " +1.25E-3 "
  },
  "output": {
    "lexical": "+1.25E-3",
    "value": 0.00125,
    "hasExponent": true
  }
}

Limitations and assumptions

  • Finite conversion can round decimal digits or underflow to zero; this is not exact decimal arithmetic, a full DICOM element validator, or clinical result validation.
  • 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/dicom-decimal-string-exponent-guard — tool.io

  2. DICOM PS3.5: Value Representation — DICOM Standards Committee / NEMA

Similar or alternative tools