Next / Previous / Contents / Shipman's homepage

69. class DispositionField

Represents a disposition code. See the specification.

Much of the work is done by the parent class, Section 27, “class SingleField: Generic single-character field”. Warning: this is a fixed-field version, so blank disposition codes are not allowed.

baseclasses.py
# - - - - -   c l a s s   D i s p o s i t i o n F i e l d   - - - - -

class DispositionField(SingleField):
    '''Represents a disposition code.

      Exports: as inherited.
    '''

    VALID_CODES = "BDEILMOPSTW"

69.1. DispositionField.scanField()

Uses the parent class's .scanField() method to do all the work.

baseclasses.py
# - - -   D i s p o s i t i o n F i e l d . s c a n F i e l d   - - -

    @staticmethod
    def scanField(encounter, scan, fieldName):
        '''Scan a fixed-format disposition code.
        '''
        SingleField.scanField(encounter, scan, fieldName,
                              DispositionField, "disposition code")