This class inherits from FieldItem, but it
doesn't have a .scanField() method, because
the location code comes from the input file name. It does
have a .flatten() method used by BaseEncounter.flatten().
# - - - - - c l a s s L o c a t i o n F i e l d - - - - -
class LocationField(FieldItem):
"""Represents a location code.
Exports: as inherited.
"""
Generic field flattener.
# - - - L o c a t i o n F i e l d . f l a t t e n - - -
# @staticmethod
def flatten ( locationField ):
"""Flatten a location code.
"""
if locationField is None:
return BLANK_LOC_CODE
else:
return locationField.value
flatten = staticmethod ( flatten )