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


69.1. DispositionField.scanField()

Uses the parent class's .scanField() method to do all the work.
# - - -   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   - - -

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