Description
Return fractionDigits, safe-integer exponent, and fractionDigits-exponent as lexicalScale.
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 fractionDigits, safe-integer exponent, and fractionDigits-exponent as lexicalScale.
When to use this tool
Use DICOM Decimal String Scale 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 fractionDigits, exponent, lexicalScale. Use the output convention below.
Require token at most 16 characters, trim only outer ASCII spaces, and parse the supported signed decimal/exponent spelling. Return fractionDigits, safe-integer exponent, and fractionDigits-exponent as lexicalScale.1
DICOM Decimal String permits decimal or exponent notation within its 16-byte limit. The lexical scale described here preserves written decimal structure without converting it to a binary numeric value.2
| Input field | Meaning and units | Accepted input |
|---|---|---|
| token | Text in the explicitly supported lexical grammar. | Required. Text; minimum UTF-16 length 1; maximum UTF-16 length 16. |
| Output field | Interpretation | Returned shape |
|---|---|---|
| fractionDigits | Fraction Digits | Required. Safe integer. |
| exponent | Exponent | Required. Safe integer. |
| lexicalScale | Written fractional digits minus exponent, distinct from binary floating-point precision. | Required. Safe integer. |
{
"input": {
"token": " 1.20E+2"
},
"output": {
"fractionDigits": 2,
"exponent": 2,
"lexicalScale": 0
}
} Limitations and assumptions
- Scale is lexical rather than binary precision; no numeric value is evaluated and complete DICOM element encoding or clinical unit interpretation is not 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
-
Calculation and input contract: health-informatics/dicom-decimal-string-scale — tool.io
-
DICOM PS3.5: Value Representation — DICOM Standards Committee / NEMA
Similar or alternative tools
- DICOM Decimal String Exponent Guard
Convert to a finite Number and return the trimmed lexical token and hasExponent.
- UCUM Exponent Sign Token
Parse an optional sign followed by decimal digits as a safe-integer exponent.