def test_item_code(self): value = get_path_as_text(self.data, ['test_item_code', 'code']) if value is not None: value = value.lower() return value
def full_address(self): parts = [] street = get_path_as_text(self.data, ['street']) if street: parts.extend(street.split(";")) parts.extend([ get_path_as_text(self.data, ['city', 'description']), get_path_as_text(self.data, ['state', 'description']), get_path_as_text(self.data, ['zip', 'description']), get_path_as_text(self.data, ['country', 'description']), ]) return "\n".join(x for x in parts if x)
def gender(self): gender = get_path_as_text(self.data, ['gender', 'code']).upper() if gender == '1' or gender == 'M': return 'M' elif gender == '2' or gender == 'F': return 'F' else: return None
def last_name(self): return get_path_as_text(self.data, ['name', 'family_name'])
def first_name(self): return get_path_as_text(self.data, ['name', 'given_name'])
def organization(self): return get_path_as_text(self.data, ['organization', 'code'])
def number_type(self): return get_path_as_text(self.data, ['number_type'])
def number(self): return get_path_as_text(self.data, ['number'])