Concepts and Context Groups (pydicom.sr)

The sr module contains an interface for DICOM’s CIDs.

Collection(name)

Interface for a collection of concepts, such as SNOMED-CT, or a DICOM CID.

Concepts(collections)

Management class for the available concept collections.

Code(value, scheme_designator, meaning[, ...])

Namedtuple for representation of a coded concept consisting of the actual code value, the coding scheme designator, the code meaning (and optionally the coding scheme version).

Usage

Individual Code values can be accessed via either their scheme (such as SCT) or the DICOM CID:

>>> from pydicom.sr import codes
>>> codes.SCT.Transverse
Code(value='62824007', scheme_designator='SCT', meaning='Transverse', scheme_version=None)
>>> codes.CID4.Cornea
Code(value='28726007', scheme_designator='SCT', meaning='Cornea', scheme_version=None)

A list of available attribute keywords for each scheme or CID is available via dir():

>>> dir(codes.CID6)
['Coronal', 'FiveChamber', 'FourChamber', ... ]