@classmethod
    def parse_key(cls, key):
        def parse_part(keyparts, index, prefix):
            if len(keyparts) > index:
                num = keyparts[index]
                if num[0].upper() == prefix:
                    num = num[1:]
                return int(num)
            else:
                return None

        parts = key.split('.')
        segment = parts[0][:3]
        if len(parts[0]) > 3:
            segment_num = int(parts[0][3:])
        else:
            segment_num = 1
        field_num = parse_part(parts, 1, 'F')
        repeat_num = parse_part(parts, 2, 'R')
        component_num = parse_part(parts, 3, 'C')
        subcomponent_num = parse_part(parts, 4, 'S')
        return cls(segment, segment_num, field_num, repeat_num, component_num, subcomponent_num)
Convert a statistical significance to its ascii representation - this
dataset/ETHPy150Open johnpaulett/python-hl7/hl7/accessor.py/Accessor.parse_key--crossover with--dataset/ETHPy150Open UDST/urbansim/urbansim/utils/misc.py/signif