Next / Previous / Contents / Shipman's homepage

74.17. BaseEncounter.tailDisposition(): Scan disposition code tail field

Parses a disposition code from a tail. We can use the regular fixed-field DispositionField.scan() method; the disposition code is always exactly one character. See Section 69.1, “DispositionField.scanField().
# - - -   B a s e E n c o u n t e r . t a i l D i s p o s i t i o n

    def tailDisposition(self, scan):
        '''Parse a disposition code in a tail field.

          [ scan is a Scan object ->
              if scan starts with a disposition code ->
                scan  :=  scan advanced past that code
                self.(DISPOSITION_ATTR)  :=  a Disposition object
                    representing that code
              else ->
                Log()  +:=  error message(s)
                raise SyntaxError ]
        DispositionField.scanField(self, scan, DISPOSITION_ATTR)