Skip to content

Getting started

This walkthrough uses the repository’s synthetic DocBook fixtures to verify a source checkout, learn the command shape, and inspect the shared response contract. It does not download or reproduce official DICOM Standard content.

You need:

  • Python 3.12 or newer;
  • uv;
  • a source checkout of dicom-standard-kb.

Complete Install from source first.

Use explicit temporary paths so the exercise does not modify an existing local knowledge base:

Terminal window
uv run dicom-kb build-fixture \
--edition 2026b \
--cache-dir /tmp/dicom-standard-kb-fixture-cache \
--db /tmp/dicom-standard-kb-fixture.sqlite \
--force

The command prints a JSON build summary. Confirm that it contains:

  • "edition": "2026b";
  • the requested SQLite path;
  • a source-manifest digest;
  • import summaries;
  • aggregate metrics;
  • gate_failures and warnings arrays.

The 2026b label identifies this synthetic fixture. It is not a claim about the current official DICOM release.

Terminal window
uv run dicom-kb lookup tag '(0008,0060)' \
--edition 2026b \
--db /tmp/dicom-standard-kb-fixture.sqlite

Confirm that the response has:

  • "status": "ok";
  • "tool": "lookup_data_element";
  • a result for the Modality data element;
  • at least one source reference;
  • classification, parse_confidence, and trace.

The same resolver accepts a keyword:

Terminal window
uv run dicom-kb lookup tag Modality \
--edition 2026b \
--db /tmp/dicom-standard-kb-fixture.sqlite

A data-dictionary lookup tells you what an attribute is. A contextual lookup asks how it is used:

Terminal window
uv run dicom-kb context attribute Modality \
--edition 2026b \
--iod 'CT Image' \
--db /tmp/dicom-standard-kb-fixture.sqlite

Inspect the matched attribute-use rows, declared types, effective-type result, references, and warnings. The resolver may preserve ambiguity rather than forcing a single answer.

Terminal window
uv run dicom-kb verify \
--edition 2026b \
--cache-dir /tmp/dicom-standard-kb-fixture-cache \
--db /tmp/dicom-standard-kb-fixture.sqlite

A successful result has top-level "status": "ok". Verification checks the manifest digest, each fixture artifact checksum, and the database’s recorded edition and source-manifest digest.