pydicom.sr.Code

class pydicom.sr.Code(value: str, scheme_designator: str, meaning: str, scheme_version: str | None = None)[source]

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).

..versionadded: 1.4

__init__()

Methods

__init__()

count(value, /)

Return number of occurrences of value.

index(value[, start, stop])

Return first index of value.

Attributes

meaning

Alias for field number 2

scheme_designator

Alias for field number 1

scheme_version

Alias for field number 3

value

Alias for field number 0

count(value, /)

Return number of occurrences of value.

index(value, start=0, stop=9223372036854775807, /)

Return first index of value.

Raises ValueError if the value is not present.

meaning: str

Alias for field number 2

scheme_designator: str

Alias for field number 1

scheme_version: str | None

Alias for field number 3

value: str

Alias for field number 0