Skip to content

Main content

UCUM Annotation Bracket Token Tool

Split one terminal UCUM annotation from its code without interpreting unit algebra or validating the unit vocabulary.

Loading tool…

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

  1. Enter code. 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 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 fieldMeaning and unitsAccepted input
codeCodeRequired. Text; maximum UTF-16 length 8192.
Output fieldInterpretationReturned shape
baseBaseRequired. Text; maximum UTF-16 length 8192.
annotationAnnotationRequired. Text; maximum UTF-16 length 8192.
annotatedAnnotatedRequired. Boolean.
json
{
  "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

  1. Calculation and input contract: health-informatics/ucum-annotation-bracket-token — tool.io

  2. The Unified Code for Units of Measure, Version 2.2 — UCUM Organization

Similar or alternative tools