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
- Enter token. Use the units and conventions below.
- Run the tool. Correct any format, range, or cross-field input error before interpreting the output.
- 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 field | Meaning and units | Accepted input |
|---|---|---|
| token | Text in the explicitly supported lexical grammar. | Required. Text; maximum UTF-16 length 8192. |
| Output field | Interpretation | Returned shape |
|---|---|---|
| lexical | Lexical | Required. Text; maximum UTF-16 length 8192. |
| value | Value on the measurement or record basis stated above. | Required. Finite number. |
| hasExponent | Has Exponent | Required. Boolean. |
{
"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
-
Calculation and input contract: health-informatics/dicom-decimal-string-exponent-guard — tool.io
-
DICOM PS3.5: Value Representation — DICOM Standards Committee / NEMA
Similar or alternative tools
- DICOM Decimal String Scale
Return fractionDigits, safe-integer exponent, and fractionDigits-exponent as lexicalScale.
- UCUM Exponent Sign Token
Parse an optional sign followed by decimal digits as a safe-integer exponent.