Skip to content

Query SR templates, context groups, and codes

The PS3.16 resolvers provide citation-preserving local lookup for Structured Reporting templates, context groups, and coded concepts.

Use a TID or exact template name:

Terminal window
EDITION=2025e # Replace with your concrete edition.
uv run dicom-kb lookup sr-template 1500 \
--edition "$EDITION"

The result includes template metadata and ordered rows. A row can contain:

  • relationship type;
  • value type;
  • concept name;
  • cardinality;
  • condition;
  • included TID;
  • row order.

Included templates remain explicit through include_tid; the resolver does not silently flatten every nested template.

Use a CID or exact group name:

Terminal window
EDITION=2025e # Replace with your concrete edition.
uv run dicom-kb lookup context-group 29 \
--edition "$EDITION"

The result includes context-group metadata and ordered rows. A row can contain:

  • coding scheme designator;
  • coding scheme version;
  • code value;
  • code meaning;
  • included CID;
  • row order.

Preserve include rows when interpreting membership.

Supply the code value and, when known, the scheme:

Terminal window
EDITION=2025e # Replace with your concrete edition.
uv run dicom-kb lookup code CT \
--scheme DCM \
--edition "$EDITION"

The result reports the code, coding scheme, optional scheme version, meaning, and context groups in which the locally derived concept was found.

A code value without a scheme can be ambiguous. Prefer the scheme whenever your source data supplies it.

  1. Resolve the TID used by the document.
  2. Inspect ordered rows and included TIDs.
  3. Resolve referenced CIDs.
  4. Inspect coded and include rows.
  5. Resolve a code meaning with its scheme when needed.
  6. retain all source references and edition metadata.

The project provides structured lookup over parsed PS3.16 content. It does not replace:

  • a terminology server;
  • implementation-specific SR validation;
  • full template expansion with every semantic condition resolved;
  • an official conformance statement.

When a row condition is not mechanically decidable, preserve its text and reference rather than reducing it to a Boolean.