Look up enumerated values and defined terms
DICOM distinguishes enumerated values from defined terms. The knowledge base stores them as separate term kinds and preserves the DocBook source reference for each imported term.
Choose the correct query
Section titled “Choose the correct query”Use enumerated values when the standard presents a closed normative set:
EDITION=2025e # Replace with your concrete edition.uv run dicom-kb lookup enumerated-values PatientSex \ --edition "$EDITION"Use defined terms when the standard presents an extensible or recommended vocabulary:
EDITION=2025e # Replace with your concrete edition.uv run dicom-kb lookup defined-terms Modality \ --edition "$EDITION"Do not merge the two result kinds in downstream code.
Add context
Section titled “Add context”The same attribute can have value terms attached to different uses. Supply an exact context when you know it:
EDITION=2025e # Replace with your concrete edition.uv run dicom-kb lookup defined-terms Modality \ --context 'CT Image' \ --edition "$EDITION"Supported deterministic context forms include imported exact names or identifiers for:
- a PS3.3 module;
- a PS3.3 macro;
- a PS3.3 IOD;
- a PS3.4 SOP Class that resolves to one or more IODs.
The resolver uses imported graph relationships and attribute-use links rather than free-form semantic similarity.
Inspect candidates
Section titled “Inspect candidates”When one input maps to multiple stored term contexts, the resolver returns candidates rather than combining values into a guessed set.
Preserve:
- term kind;
- term text;
- context label and linked attribute-use information;
- IOD, SOP Class, module, or macro references;
- warnings and source references.
Know the boundary
Section titled “Know the boundary”TID, CID, and DICOMweb labels are not attribute-use contexts for this resolver. Use the dedicated PS3.16 and PS3.18 tools for those domains.
Agent guidance
Section titled “Agent guidance”Ask the agent to:
- use the context-aware query when context is available;
- keep enumerated values and defined terms distinct;
- report ambiguity rather than unioning candidates;
- cite the returned standard references;
- avoid inventing a value that is absent from the selected edition.