Resolve an attribute in context
Use contextual resolution to answer questions such as “What type is Modality in the CT Image IOD?” A PS3.6 data-element row alone cannot answer that question.
Prerequisites
Section titled “Prerequisites”The knowledge base should include:
- PS3.3 IOD, module, macro, and attribute-use structures;
- PS3.4 SOP Class links when resolving by SOP Class;
- PS3.6 data elements.
Resolve by IOD
Section titled “Resolve by IOD”EDITION=2025e # Replace with your concrete edition.uv run dicom-kb resolve attribute-context Modality \ --iod 'CT Image' \ --edition "$EDITION"The documented alias is equivalent:
EDITION=2025e # Replace with your concrete edition.uv run dicom-kb context attribute Modality \ --iod 'CT Image' \ --edition "$EDITION"Resolve by SOP Class
Section titled “Resolve by SOP Class”EDITION=2025e # Replace with your concrete edition.uv run dicom-kb resolve attribute-context Modality \ --sop-class 'CT Image Storage' \ --edition "$EDITION"The SOP Class is first resolved through the imported PS3.4 graph to its applicable IOD context.
Read the result in layers
Section titled “Read the result in layers”- Confirm the data element matched the intended tag or keyword.
- Inspect every applicable attribute-use row.
- Distinguish each row’s declared type from the top-level
effective_type. - Read the explanation and condition text.
- Inspect warnings and references.
- Check
classification.machine_decidability.
How effective type is computed
Section titled “How effective type is computed”The resolver only reports effective_type when it can make a bounded
determination from parsed rows:
- One applicable use returns its declared type.
- Multiple applicable uses are compared using the DICOM lowest-type rule.
- Matched descriptions and condition text are inspected for bounded explicit override language such as “shall be Type 1.”
- A deterministic explicit override can take precedence.
- Conflicting or ambiguous override prose leaves
effective_typenull. - Source-reference warnings identify the unresolved boundary.
The response is classified as partially decidable even when a value is returned because the broader condition semantics can require implementation or instance context beyond the parser.
What to do with a null effective type
Section titled “What to do with a null effective type”Do not choose the strictest or most convenient type from memory.
Instead:
- preserve the matched use rows and warnings;
- follow the returned
refs; - retrieve a bounded cited excerpt when explanation is needed;
- state that the project could not make a unique machine decision.
Use the result in an agent
Section titled “Use the result in an agent”A safe synthesis instruction is:
Use only the returned attribute-use rows and references. Report effective_typewhen non-null. When it is null, describe the ambiguity and do not infer anormative type.Pass the full response envelope rather than a flattened result.
Failure modes
Section titled “Failure modes”validation_error: the attribute identifier is malformed.not_found: the data element or requested context did not resolve.- candidates or warnings: more than one context or use remains plausible.
- null
effective_type: no bounded unique decision was available.
These outcomes are part of the public contract, not parser crashes.