Description
Return base, annotation, and annotated.
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 base, annotation, and annotated.
When to use this tool
Use UCUM Annotation Bracket Token when you need one bounded spelling, delimiter, or identifier component.
How to use the tool and how it works
- Enter code. Use the units and conventions below.
- Run the tool. Correct any format, range, or cross-field input error before interpreting the output.
- Read base, annotation, annotated. Inspect annotated before interpreting the associated values.
Require a nonempty code and either no braces or exactly one nonempty terminal brace annotation after a nonempty base. Return base, annotation, and annotated.1
UCUM annotations do not alter unit semantics. This helper accepts only a nonempty terminal annotation attached to a nonempty base, so it is narrower than the complete UCUM grammar.2
| Input field | Meaning and units | Accepted input |
|---|---|---|
| code | Code | Required. Text; maximum UTF-16 length 8192. |
| Output field | Interpretation | Returned shape |
|---|---|---|
| base | Base | Required. Text; maximum UTF-16 length 8192. |
| annotation | Annotation | Required. Text; maximum UTF-16 length 8192. |
| annotated | Annotated | Required. Boolean. |
{
"input": {
"code": "mg{creatinine}"
},
"output": {
"base": "mg",
"annotation": "creatinine",
"annotated": true
}
} Limitations and assumptions
- The base is not validated as UCUM and annotation is not interpreted; this split does not establish unit equivalence, dimensional correctness, or clinical interchangeability.
- 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
Similar or alternative tools
- UCUM Exponent Sign Token
Parse an optional sign followed by decimal digits as a safe-integer exponent.
- Clinical Unit Case Sensitive Prefix Tag
Return exactMatch and caseOnlyDifference when unequal spellings become equal under JavaScript lowercase.