Esempio n. 1
0
    def __init__(self):
        Segment.__init__(self)
        self.field_count = 2

        self.id = Element(
            name="GE",
            description="Functional Group Trailer Identifier",
            required=True,
            min_length=2,
            max_length=2,
            content="GE",
        )
        self.fields.append(self.id)

        self.ge01 = Element(
            name="GE01",
            description="Number of Transaction Sets",
            required=True,
            min_length=1,
            max_length=6,
            content="",
        )
        self.fields.append(self.ge01)

        self.ge02 = Element(
            name="GE02",
            description="Group Control Number",
            required=True,
            min_length=1,
            max_length=9,
            content="",
        )
        self.fields.append(self.ge02)
Esempio n. 2
0
    def __init__(self):
        Segment.__init__(self)
        self.field_count = 2

        self.id = Element(
            name="SE",
            description="Transaction Set Trailer",
            required=True,
            min_length=2,
            max_length=2,
            content="SE",
        )
        self.fields.append(self.id)

        self.se01 = Element(
            name="SE01",
            description="Number of Included Segments",
            required=True,
            min_length=1,
            max_length=6,
            content="",
        )
        self.fields.append(self.se01)

        self.se02 = Element(
            name="SE02",
            description="Transaction Set Control Number",
            required=True,
            min_length=4,
            max_length=9,
            content="",
        )
        self.fields.append(self.se02)
Esempio n. 3
0
 def _parse_unknown_body(self, segment):
     if segment:
         generic_segment = Segment()
         generic_field_list = segment.split(self.document.config.element_separator)
         self._parse__unknown_segment(generic_segment, generic_field_list)
         try:
             self.current_transaction.transaction_body.append(generic_segment)
         except AttributeError:
             pass
Esempio n. 4
0
    def __init__(self):
        Segment.__init__(self)
        self.field_count = 3

        self.id = Element(
            name="ST",
            description="Transaction Set Header",
            required=True,
            min_length=2,
            max_length=2,
            content="ST",
        )
        self.fields.append(self.id)

        self.st01 = Element(
            name="ST01",
            description="Transaction Set ID Code",
            required=True,
            min_length=3,
            max_length=3,
            content="",
        )
        self.fields.append(self.st01)

        self.st02 = Element(
            name="ST02",
            description="Transaction Set Control Number",
            required=True,
            min_length=4,
            max_length=9,
            content="",
        )
        self.fields.append(self.st02)

        self.st03 = Element(
            name="ST03",
            description="Implementation Convention Reference",
            required=False,
            min_length=1,
            max_length=35,
            content="",
        )
        self.fields.append(self.st03)
Esempio n. 5
0
    def __init__(self):
        Segment.__init__(self)
        self.field_count = 8

        self.id = Element(
            name="GS",
            description="Functional Group Header Code",
            required=True,
            min_length=2,
            max_length=2,
            content="GS",
        )
        self.fields.append(self.id)

        self.gs01 = Element(
            name="GS01",
            description="Functional Identifier Code",
            required=True,
            min_length=2,
            max_length=2,
            content="",
        )
        self.fields.append(self.gs01)

        self.gs02 = Element(
            name="GS02",
            description="Application Senders Code",
            required=True,
            min_length=2,
            max_length=15,
            content="",
        )
        self.fields.append(self.gs02)

        self.gs03 = Element(
            name="GS03",
            description="Application Receiver Code",
            required=True,
            min_length=2,
            max_length=15,
            content="",
        )
        self.fields.append(self.gs03)

        self.gs04 = Element(
            name="GS04",
            description="Group Date",
            required=True,
            min_length=8,
            max_length=8,
            content="",
        )
        self.fields.append(self.gs04)

        self.gs05 = Element(
            name="GS05",
            description="Group Time",
            required=True,
            min_length=4,
            max_length=4,
            content="",
        )
        self.fields.append(self.gs05)

        self.gs06 = Element(
            name="GS06",
            description="Group Control Number",
            required=True,
            min_length=1,
            max_length=9,
            content="",
        )
        self.fields.append(self.gs06)

        self.gs07 = Element(
            name="GS07",
            description="Responsible Agency Code",
            required=True,
            min_length=1,
            max_length=2,
            content="",
        )
        self.fields.append(self.gs07)

        self.gs08 = Element(
            name="GS08",
            description="Version Indicator ID Code",
            required=True,
            min_length=1,
            max_length=12,
            content="",
        )
        self.fields.append(self.gs08)