Next / Previous / Contents / Shipman's homepage

73. class SwabField: Cloacal swab code

A single-column, fixed field containing a cloacal swab code. See the specification for this field.

baseclasses.py
# - - - - -   c l a s s   S w a b F i e l d   - - - - -

class SwabField(SingleField):
    '''Represents a cloacal swab code.

      Exports:  As inherited.
    '''

    VALID_CODES = "12FC"

73.1. SwabField.scanField()

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

baseclasses.py
# - - -   S w a b F i e l d . s c a n F i e l d   - - -

    @staticmethod
    def scanField(encounter, scan, fieldName):
        '''Scans a cloacal swab field.
        '''
        SingleField.scanField(encounter, scan, fieldName,
                              SwabField, "cloacal swab")