<filename>web/claims_837/models.py
#!/usr/bin/env python
"""Generated by make837.py on 2008-02-12 14:41:11.161000"""

import web.claims.models
class Factory( web.claims.models.Factory ):
    """Factory for a generated application."""
    @staticmethod
    def makeSegment( segmentToken, compositeSep, segmentType=None ):
        """Create a Segment from a SegmentToken and an Segment definition.

        :param segmentToken: An :class:`X12.parse.SegmentToken` instance:
        a list-like collection of Element values.  It turns out that a simple
        list of values may also work, if it does NOT have trailing empty
        items omitted.  Real Segment Tokens can have trailing empty items
        omitted.
        :param compositeSep: Composite internal separator from the ISA segment.
        :param segmentType: An :class:`X12.parse.Segment` instance, which
        defines the Elements and Composites of this X12Segment.
        :returns: X12Segment instance
        """
        seg= web.claims.models.Factory.makeSegment( segmentToken, compositeSep, segmentType )
        appSegClass= eval( "Segment_%s" % ( segmentToken[0], ) )
        appSeg= appSegClass( segment= seg )
        appSeg.unmarshall( segmentToken, compositeSep )
        appSeg.save()
        return seg


from web.claims.models import X12Segment
from django.db import models

class Segment_ISA(models.Model):
    """Properties(syntax='',req_sit=u'R',repeat=u'1',pos=u'010',desc=u'Interchange Control Header')"""
    segment = models.ForeignKey( X12Segment )
    ISA01 = models.CharField( max_length=2 ) # (u'ID', u'2', u'2') u'I01'
    ISA02 = models.CharField( max_length=10 ) # (u'AN', u'10', u'10') u'I02'
    ISA03 = models.CharField( max_length=2 ) # (u'ID', u'2', u'2') u'I03'
    ISA04 = models.CharField( max_length=10 ) # (u'AN', u'10', u'10') u'I04'
    ISA05 = models.CharField( max_length=2 ) # (u'ID', u'2', u'2') u'I05'
    ISA06 = models.CharField( max_length=15 ) # (u'AN', u'15', u'15') u'I06'
    ISA07 = models.CharField( max_length=2 ) # (u'ID', u'2', u'2') u'I05'
    ISA08 = models.CharField( max_length=15 ) # (u'AN', u'15', u'15') u'I07'
    ISA09 = models.CharField( max_length=6 ) # (u'DT', u'6', u'6') u'I08'
    ISA10 = models.CharField( max_length=4 ) # (u'TM', u'4', u'4') u'I09'
    ISA11 = models.CharField( max_length=1 ) # (u'ID', u'1', u'1') u'I10'
    ISA12 = models.CharField( max_length=5 ) # (u'ID', u'5', u'5') u'I11'
    ISA13 = models.CharField( max_length=9 ) # (u'N0', u'9', u'9') u'I12'
    ISA14 = models.CharField( max_length=1 ) # (u'ID', u'1', u'1') u'I13'
    ISA15 = models.CharField( max_length=1 ) # (u'ID', u'1', u'1') u'I14'
    ISA16 = models.CharField( max_length=1 ) # (u'AN', u'1', u'1') u'I15'
    def unmarshall( self, segmentToken, cs=':' ):
        self.ISA01 = segmentToken.elt(1)
        self.ISA02 = segmentToken.elt(2)
        self.ISA03 = segmentToken.elt(3)
        self.ISA04 = segmentToken.elt(4)
        self.ISA05 = segmentToken.elt(5)
        self.ISA06 = segmentToken.elt(6)
        self.ISA07 = segmentToken.elt(7)
        self.ISA08 = segmentToken.elt(8)
        self.ISA09 = segmentToken.elt(9)
        self.ISA10 = segmentToken.elt(10)
        self.ISA11 = segmentToken.elt(11)
        self.ISA12 = segmentToken.elt(12)
        self.ISA13 = segmentToken.elt(13)
        self.ISA14 = segmentToken.elt(14)
        self.ISA15 = segmentToken.elt(15)
        self.ISA16 = segmentToken.elt(16)

class Segment_GS(models.Model):
    """Properties(syntax='',req_sit=u'R',repeat=u'1',pos=u'010',desc=u'Functional Group Header')"""
    segment = models.ForeignKey( X12Segment )
    GS01 = models.CharField( max_length=2 ) # (u'ID', u'2', u'2') u'Functional Identifier Code'
    GS02 = models.CharField( max_length=15 ) # (u'AN', u'2', u'15') u'Application Senders Code'
    GS03 = models.CharField( max_length=15 ) # (u'AN', u'2', u'15') u'124'
    GS04 = models.CharField( max_length=8 ) # (u'DT', u'8', u'8') u'Date'
    GS05 = models.CharField( max_length=8 ) # (u'TM', u'4', u'8') u'Time'
    GS06 = models.CharField( max_length=9 ) # (u'N0', u'1', u'9') u'Group Control Number'
    GS07 = models.CharField( max_length=2 ) # (u'ID', u'1', u'2') u'Responsible Agency Code'
    GS08 = models.CharField( max_length=12 ) # (u'AN', u'1', u'12') u'Version / Release / Industry Identifier Code'
    def unmarshall( self, segmentToken, cs=':' ):
        self.GS01 = segmentToken.elt(1)
        self.GS02 = segmentToken.elt(2)
        self.GS03 = segmentToken.elt(3)
        self.GS04 = segmentToken.elt(4)
        self.GS05 = segmentToken.elt(5)
        self.GS06 = segmentToken.elt(6)
        self.GS07 = segmentToken.elt(7)
        self.GS08 = segmentToken.elt(8)

class Segment_ST(models.Model):
    """Properties(syntax='',req_sit=u'R',repeat=u'1',pos=u'005',desc=u'Transaction Set Header')"""
    segment = models.ForeignKey( X12Segment )
    ST01 = models.CharField( max_length=3 ) # (u'ID', u'3', u'3') u'Transaction Set Identifier Code'
    ST02 = models.CharField( max_length=9 ) # (u'AN', u'4', u'9') u'Transaction Set Control Number'
    def unmarshall( self, segmentToken, cs=':' ):
        self.ST01 = segmentToken.elt(1)
        self.ST02 = segmentToken.elt(2)

class Segment_BHT(models.Model):
    """Properties(syntax='',req_sit=u'R',repeat=u'1',pos=u'010',desc=u'Beginning of Hierarchical Transaction')"""
    segment = models.ForeignKey( X12Segment )
    BHT01 = models.CharField( max_length=4 ) # (u'ID', u'4', u'4') u'Hierarchical Structure Code'
    BHT02 = models.CharField( max_length=2 ) # (u'ID', u'2', u'2') u'Transaction Set Purpose Code'
    BHT03 = models.CharField( max_length=30 ) # (u'AN', u'1', u'30') u'Reference Identification'
    BHT04 = models.CharField( max_length=8 ) # (u'DT', u'8', u'8') u'Date'
    BHT05 = models.CharField( max_length=8 ) # (u'TM', u'4', u'8') u'Time'
    BHT06 = models.CharField( max_length=2 ) # (u'ID', u'2', u'2') u'Transaction Type Code'
    def unmarshall( self, segmentToken, cs=':' ):
        self.BHT01 = segmentToken.elt(1)
        self.BHT02 = segmentToken.elt(2)
        self.BHT03 = segmentToken.elt(3)
        self.BHT04 = segmentToken.elt(4)
        self.BHT05 = segmentToken.elt(5)
        self.BHT06 = segmentToken.elt(6)

class Segment_REF(models.Model):
    """Properties(syntax=u'R0203',req_sit=u'R',repeat=u'1',pos=u'015',desc=u'Transmission Type Identification')"""
    segment = models.ForeignKey( X12Segment )
    REF01 = models.CharField( max_length=3 ) # (u'ID', u'2', u'3') u'Reference Identification Qualifier'
    REF02 = models.CharField( max_length=30 ) # (u'AN', u'1', u'30') u'Reference Identification'
    REF03 = models.CharField( max_length=80, null=True, blank=True ) # (u'AN', u'1', u'80') u'Description'
    # <Composite u'C040', Properties(req_sit=u'N',refdes=u'REF04',seq=u'04',desc=u'Reference Identifier'), 
    def unmarshall( self, segmentToken, cs=':' ):
        self.REF01 = segmentToken.elt(1)
        self.REF02 = segmentToken.elt(2)
        self.REF03 = segmentToken.elt(3)
        self.C040 = segmentToken.elt(4)

class Segment_NM1(models.Model):
    """Properties(syntax=u'P0809 C1110',req_sit=u'R',repeat=u'1',pos=u'020',desc=u'Submitter Name')"""
    segment = models.ForeignKey( X12Segment )
    NM101 = models.CharField( max_length=3 ) # (u'ID', u'2', u'3') u'Entity Identifier Code'
    NM102 = models.CharField( max_length=1 ) # (u'ID', u'1', u'1') u'Entity Type Qualifier'
    NM103 = models.CharField( max_length=35 ) # (u'AN', u'1', u'35') u'Name Last or Organization Name'
    NM104 = models.CharField( max_length=25, null=True, blank=True ) # (u'AN', u'1', u'25') u'Name First'
    NM105 = models.CharField( max_length=25, null=True, blank=True ) # (u'AN', u'1', u'25') u'Name Middle'
    NM106 = models.CharField( max_length=10, null=True, blank=True ) # (u'AN', u'1', u'10') u'Name Prefix'
    NM107 = models.CharField( max_length=10, null=True, blank=True ) # (u'AN', u'1', u'10') u'Name Suffix'
    NM108 = models.CharField( max_length=2 ) # (u'ID', u'1', u'2') u'Identification Code Qualifier'
    NM109 = models.CharField( max_length=80 ) # (u'AN', u'2', u'80') u'Identification Code'
    NM110 = models.CharField( max_length=2, null=True, blank=True ) # (u'ID', u'2', u'2') u'Entity Relationship Code'
    NM111 = models.CharField( max_length=3, null=True, blank=True ) # (u'ID', u'2', u'3') u'Entity Identifier Code'
    def unmarshall( self, segmentToken, cs=':' ):
        self.NM101 = segmentToken.elt(1)
        self.NM102 = segmentToken.elt(2)
        self.NM103 = segmentToken.elt(3)
        self.NM104 = segmentToken.elt(4)
        self.NM105 = segmentToken.elt(5)
        self.NM106 = segmentToken.elt(6)
        self.NM107 = segmentToken.elt(7)
        self.NM108 = segmentToken.elt(8)
        self.NM109 = segmentToken.elt(9)
        self.NM110 = segmentToken.elt(10)
        self.NM111 = segmentToken.elt(11)

class Segment_PER(models.Model):
    """Properties(syntax=u'P0304 P0506 P0708',req_sit=u'R',repeat=u'2',pos=u'045',desc=u'Submitter EDI Contact Information')"""
    segment = models.ForeignKey( X12Segment )
    PER01 = models.CharField( max_length=2 ) # (u'ID', u'2', u'2') u'Contact Function Code'
    PER02 = models.CharField( max_length=60 ) # (u'AN', u'1', u'60') u'Name'
    PER03 = models.CharField( max_length=2 ) # (u'ID', u'2', u'2') u'Communication Number Qualifier'
    PER04 = models.CharField( max_length=80 ) # (u'AN', u'1', u'80') u'Communication Number'
    PER05 = models.CharField( max_length=2, null=True, blank=True ) # (u'ID', u'2', u'2') u'Communication Number Qualifier'
    PER06 = models.CharField( max_length=80, null=True, blank=True ) # (u'AN', u'1', u'80') u'Communication Number'
    PER07 = models.CharField( max_length=2, null=True, blank=True ) # (u'ID', u'2', u'2') u'Communication Number Qualifier'
    PER08 = models.CharField( max_length=80, null=True, blank=True ) # (u'AN', u'1', u'80') u'Communication Number'
    PER09 = models.CharField( max_length=20, null=True, blank=True ) # (u'AN', u'1', u'20') u'Contact Inquiry Reference'
    def unmarshall( self, segmentToken, cs=':' ):
        self.PER01 = segmentToken.elt(1)
        self.PER02 = segmentToken.elt(2)
        self.PER03 = segmentToken.elt(3)
        self.PER04 = segmentToken.elt(4)
        self.PER05 = segmentToken.elt(5)
        self.PER06 = segmentToken.elt(6)
        self.PER07 = segmentToken.elt(7)
        self.PER08 = segmentToken.elt(8)
        self.PER09 = segmentToken.elt(9)

class Segment_HL(models.Model):
    """Properties(syntax='',req_sit=u'R',repeat=u'1',pos=u'001',desc=u'Billing/Pay-To Provider Hierarchical Level')"""
    segment = models.ForeignKey( X12Segment )
    HL01 = models.CharField( max_length=12 ) # (u'AN', u'1', u'12') u'Hierarchical ID Number'
    HL02 = models.CharField( max_length=12, null=True, blank=True ) # (u'AN', u'1', u'12') u'Hierarchical Parent ID Number'
    HL03 = models.CharField( max_length=2 ) # (u'ID', u'1', u'2') u'Hierarchical Level Code'
    HL04 = models.CharField( max_length=1 ) # (u'ID', u'1', u'1') u'Hierarchical Child Code'
    def unmarshall( self, segmentToken, cs=':' ):
        self.HL01 = segmentToken.elt(1)
        self.HL02 = segmentToken.elt(2)
        self.HL03 = segmentToken.elt(3)
        self.HL04 = segmentToken.elt(4)

class Segment_PRV(models.Model):
    """Properties(syntax='',req_sit=u'S',repeat=u'1',pos=u'003',desc=u'Billing/Pay-To Provider Specialty Information')"""
    segment = models.ForeignKey( X12Segment )
    PRV01 = models.CharField( max_length=3 ) # (u'ID', u'1', u'3') u'Provider Code'
    PRV02 = models.CharField( max_length=3 ) # (u'ID', u'2', u'3') u'Reference Identification Qualifier'
    PRV03 = models.CharField( max_length=30 ) # (u'AN', u'1', u'30') u'Reference Identification'
    PRV04 = models.CharField( max_length=2, null=True, blank=True ) # (u'ID', u'2', u'2') u'State or Province Code'
    # <Composite u'C035', Properties(req_sit=u'N',refdes='',seq=u'05',desc=u'Provider Specialty Information'), 
    PRV06 = models.CharField( max_length=3, null=True, blank=True ) # (u'ID', u'3', u'3') u'Provider Organization Code'
    def unmarshall( self, segmentToken, cs=':' ):
        self.PRV01 = segmentToken.elt(1)
        self.PRV02 = segmentToken.elt(2)
        self.PRV03 = segmentToken.elt(3)
        self.PRV04 = segmentToken.elt(4)
        self.C035 = segmentToken.elt(5)
        self.PRV06 = segmentToken.elt(6)

class Segment_CUR(models.Model):
    """Properties(syntax=u'C0807 C0907 L101112 C1110 C1210 L131415 C1413 C1513 L161718 C1716 C1816 L192021 C2019 C2119',req_sit=u'S',repeat=u'1',pos=u'010',desc=u'Foreign Currency Information')"""
    segment = models.ForeignKey( X12Segment )
    CUR01 = models.CharField( max_length=3 ) # (u'ID', u'2', u'3') u'Entity Identifier Code'
    CUR02 = models.CharField( max_length=3 ) # (u'ID', u'3', u'3') u'Currency Code'
    CUR03 = models.CharField( max_length=10, null=True, blank=True ) # (u'R', u'4', u'10') u'Exchange Rate'
    CUR04 = models.CharField( max_length=3, null=True, blank=True ) # (u'ID', u'2', u'3') u'Entity Identifier Code'
    CUR05 = models.CharField( max_length=3, null=True, blank=True ) # (u'ID', u'3', u'3') u'Currency Code'
    CUR06 = models.CharField( max_length=3, null=True, blank=True ) # (u'ID', u'3', u'3') u'Currency Market/Exchange Code'
    CUR07 = models.CharField( max_length=3, null=True, blank=True ) # (u'ID', u'3', u'3') u'Date/Time Qualifier'
    CUR08 = models.CharField( max_length=8, null=True, blank=True ) # (u'DT', u'8', u'8') u'Date'
    CUR09 = models.CharField( max_length=8, null=True, blank=True ) # (u'TM', u'4', u'8') u'Time'
    CUR10 = models.CharField( max_length=3, null=True, blank=True ) # (u'ID', u'3', u'3') u'Date/Time Qualifier'
    CUR11 = models.CharField( max_length=8, null=True, blank=True ) # (u'DT', u'8', u'8') u'Date'
    CUR12 = models.CharField( max_length=8, null=True, blank=True ) # (u'TM', u'4', u'8') u'Time'
    CUR13 = models.CharField( max_length=3, null=True, blank=True ) # (u'ID', u'3', u'3') u'Date/Time Qualifier'
    CUR14 = models.CharField( max_length=8, null=True, blank=True ) # (u'DT', u'8', u'8') u'Date'
    CUR15 = models.CharField( max_length=8, null=True, blank=True ) # (u'TM', u'4', u'8') u'Time'
    CUR16 = models.CharField( max_length=3, null=True, blank=True ) # (u'ID', u'3', u'3') u'Date/Time Qualifier'
    CUR17 = models.CharField( max_length=8, null=True, blank=True ) # (u'DT', u'8', u'8') u'Date'
    CUR18 = models.CharField( max_length=8, null=True, blank=True ) # (u'TM', u'4', u'8') u'Time'
    CUR19 = models.CharField( max_length=3, null=True, blank=True ) # (u'ID', u'3', u'3') u'Date/Time Qualifier'
    CUR20 = models.CharField( max_length=8, null=True, blank=True ) # (u'DT', u'8', u'8') u'Date'
    CUR21 = models.CharField( max_length=8, null=True, blank=True ) # (u'TM', u'4', u'8') u'Time'
    def unmarshall( self, segmentToken, cs=':' ):
        self.CUR01 = segmentToken.elt(1)
        self.CUR02 = segmentToken.elt(2)
        self.CUR03 = segmentToken.elt(3)
        self.CUR04 = segmentToken.elt(4)
        self.CUR05 = segmentToken.elt(5)
        self.CUR06 = segmentToken.elt(6)
        self.CUR07 = segmentToken.elt(7)
        self.CUR08 = segmentToken.elt(8)
        self.CUR09 = segmentToken.elt(9)
        self.CUR10 = segmentToken.elt(10)
        self.CUR11 = segmentToken.elt(11)
        self.CUR12 = segmentToken.elt(12)
        self.CUR13 = segmentToken.elt(13)
        self.CUR14 = segmentToken.elt(14)
        self.CUR15 = segmentToken.elt(15)
        self.CUR16 = segmentToken.elt(16)
        self.CUR17 = segmentToken.elt(17)
        self.CUR18 = segmentToken.elt(18)
        self.CUR19 = segmentToken.elt(19)
        self.CUR20 = segmentToken.elt(20)
        self.CUR21 = segmentToken.elt(21)

class Segment_N3(models.Model):
    """Properties(syntax='',req_sit=u'R',repeat=u'1',pos=u'025',desc=u'Billing Provider Address')"""
    segment = models.ForeignKey( X12Segment )
    N301 = models.CharField( max_length=55 ) # (u'AN', u'1', u'55') u'Address Information'
    N302 = models.CharField( max_length=55, null=True, blank=True ) # (u'AN', u'1', u'55') u'Address Information'
    def unmarshall( self, segmentToken, cs=':' ):
        self.N301 = segmentToken.elt(1)
        self.N302 = segmentToken.elt(2)

class Segment_N4(models.Model):
    """Properties(syntax=u'C0605',req_sit=u'R',repeat=u'1',pos=u'030',desc=u'Billing Provider City/State/ZIP Code')"""
    segment = models.ForeignKey( X12Segment )
    N401 = models.CharField( max_length=30 ) # (u'AN', u'2', u'30') u'City Name'
    N402 = models.CharField( max_length=2 ) # (u'ID', u'2', u'2') u'State or Province Code'
    N403 = models.CharField( max_length=15 ) # (u'ID', u'3', u'15') u'Postal Code'
    N404 = models.CharField( max_length=3, null=True, blank=True ) # (u'ID', u'2', u'3') u'Country Code'
    N405 = models.CharField( max_length=2, null=True, blank=True ) # (u'ID', u'1', u'2') u'Location Qualifier'
    N406 = models.CharField( max_length=30, null=True, blank=True ) # (u'AN', u'1', u'30') u'Location Identifier'
    def unmarshall( self, segmentToken, cs=':' ):
        self.N401 = segmentToken.elt(1)
        self.N402 = segmentToken.elt(2)
        self.N403 = segmentToken.elt(3)
        self.N404 = segmentToken.elt(4)
        self.N405 = segmentToken.elt(5)
        self.N406 = segmentToken.elt(6)

class Segment_SBR(models.Model):
    """Properties(syntax='',req_sit=u'R',repeat=u'1',pos=u'005',desc=u'Subscriber Information')"""
    segment = models.ForeignKey( X12Segment )
    SBR01 = models.CharField( max_length=1 ) # (u'ID', u'1', u'1') u'Payer Responsibility Sequence Number Code'
    SBR02 = models.CharField( max_length=2, null=True, blank=True ) # (u'ID', u'2', u'2') u'Individual Relationship Code'
    SBR03 = models.CharField( max_length=30, null=True, blank=True ) # (u'AN', u'1', u'30') u'Reference Identification'
    SBR04 = models.CharField( max_length=60, null=True, blank=True ) # (u'AN', u'1', u'60') u'Name'
    SBR05 = models.CharField( max_length=3, null=True, blank=True ) # (u'ID', u'1', u'3') u'Insurance Type Code'
    SBR06 = models.CharField( max_length=1, null=True, blank=True ) # (u'ID', u'1', u'1') u'Coordination of Benefits Code'
    SBR07 = models.CharField( max_length=1, null=True, blank=True ) # (u'ID', u'1', u'1') u'Yes/No Condition or Response Code'
    SBR08 = models.CharField( max_length=2, null=True, blank=True ) # (u'ID', u'2', u'2') u'Employment Status Code'
    SBR09 = models.CharField( max_length=2, null=True, blank=True ) # (u'ID', u'1', u'2') u'Claim Filing Indicator Code'
    def unmarshall( self, segmentToken, cs=':' ):
        self.SBR01 = segmentToken.elt(1)
        self.SBR02 = segmentToken.elt(2)
        self.SBR03 = segmentToken.elt(3)
        self.SBR04 = segmentToken.elt(4)
        self.SBR05 = segmentToken.elt(5)
        self.SBR06 = segmentToken.elt(6)
        self.SBR07 = segmentToken.elt(7)
        self.SBR08 = segmentToken.elt(8)
        self.SBR09 = segmentToken.elt(9)

class Segment_PAT(models.Model):
    """Properties(syntax=u'P0506 P0708',req_sit=u'S',repeat=u'1',pos=u'007',desc=u'Patient Information')"""
    segment = models.ForeignKey( X12Segment )
    PAT01 = models.CharField( max_length=2, null=True, blank=True ) # (u'ID', u'2', u'2') u'Individual Relationship Code'
    PAT02 = models.CharField( max_length=1, null=True, blank=True ) # (u'ID', u'1', u'1') u'Patient Location Code'
    PAT03 = models.CharField( max_length=2, null=True, blank=True ) # (u'ID', u'2', u'2') u'Employment Status Code'
    PAT04 = models.CharField( max_length=1, null=True, blank=True ) # (u'ID', u'1', u'1') u'Student Status Code'
    PAT05 = models.CharField( max_length=3, null=True, blank=True ) # (u'ID', u'2', u'3') u'Date Time Period Format Qualifier'
    PAT06 = models.CharField( max_length=35, null=True, blank=True ) # (u'AN', u'1', u'35') u'Date Time Period'
    PAT07 = models.CharField( max_length=2, null=True, blank=True ) # (u'ID', u'2', u'2') u'Unit or Basis for Measurement Code'
    PAT08 = models.CharField( max_length=10, null=True, blank=True ) # (u'R', u'1', u'10') u'Weight'
    PAT09 = models.CharField( max_length=1, null=True, blank=True ) # (u'ID', u'1', u'1') u'Yes/No Condition or Response Code'
    def unmarshall( self, segmentToken, cs=':' ):
        self.PAT01 = segmentToken.elt(1)
        self.PAT02 = segmentToken.elt(2)
        self.PAT03 = segmentToken.elt(3)
        self.PAT04 = segmentToken.elt(4)
        self.PAT05 = segmentToken.elt(5)
        self.PAT06 = segmentToken.elt(6)
        self.PAT07 = segmentToken.elt(7)
        self.PAT08 = segmentToken.elt(8)
        self.PAT09 = segmentToken.elt(9)

class Segment_DMG(models.Model):
    """Properties(syntax=u'P0102',req_sit=u'S',repeat=u'1',pos=u'032',desc=u'Subscriber Demographic Information')"""
    segment = models.ForeignKey( X12Segment )
    DMG01 = models.CharField( max_length=3 ) # (u'ID', u'2', u'3') u'Date Time Period Format Qualifier'
    DMG02 = models.CharField( max_length=35 ) # (u'AN', u'1', u'35') u'Date Time Period'
    DMG03 = models.CharField( max_length=1 ) # (u'ID', u'1', u'1') u'Gender Code'
    DMG04 = models.CharField( max_length=1, null=True, blank=True ) # (u'ID', u'1', u'1') u'Marital Status Code'
    DMG05 = models.CharField( max_length=1, null=True, blank=True ) # (u'ID', u'1', u'1') u'Race or Ethnicity Code'
    DMG06 = models.CharField( max_length=2, null=True, blank=True ) # (u'ID', u'1', u'2') u'Citizenship Status Code'
    DMG07 = models.CharField( max_length=3, null=True, blank=True ) # (u'ID', u'2', u'3') u'Country Code'
    DMG08 = models.CharField( max_length=2, null=True, blank=True ) # (u'ID', u'1', u'2') u'Basis of Verification Code'
    DMG09 = models.CharField( max_length=15, null=True, blank=True ) # (u'R', u'1', u'15') u'Quantity'
    def unmarshall( self, segmentToken, cs=':' ):
        self.DMG01 = segmentToken.elt(1)
        self.DMG02 = segmentToken.elt(2)
        self.DMG03 = segmentToken.elt(3)
        self.DMG04 = segmentToken.elt(4)
        self.DMG05 = segmentToken.elt(5)
        self.DMG06 = segmentToken.elt(6)
        self.DMG07 = segmentToken.elt(7)
        self.DMG08 = segmentToken.elt(8)
        self.DMG09 = segmentToken.elt(9)

class Segment_CLM(models.Model):
    """Properties(syntax='',req_sit=u'R',repeat=u'1',pos=u'130',desc=u'Claim Information')"""
    segment = models.ForeignKey( X12Segment )
    CLM01 = models.CharField( max_length=38 ) # (u'AN', u'1', u'38') u'Claim Submitters Identifier'
    CLM02 = models.CharField( max_length=18 ) # (u'R', u'1', u'18') u'Monetary Amount'
    CLM03 = models.CharField( max_length=2, null=True, blank=True ) # (u'ID', u'1', u'2') u'Claim Filing Indicator Code'
    CLM04 = models.CharField( max_length=2, null=True, blank=True ) # (u'ID', u'1', u'2') u'Non-Institutional Claim Type Code'
    # <Composite u'C023', Properties(req_sit=u'R',refdes='',seq=u'05',desc=u'Place of Service Code'), 
    CLM05_01 = models.CharField( max_length=2 ) # (u'AN', u'1', u'2') u'Facility Code Value'
    CLM05_02 = models.CharField( max_length=2, null=True, blank=True ) # (u'ID', u'1', u'2') u'Facility Code Qualifier'
    CLM05_03 = models.CharField( max_length=1 ) # (u'ID', u'1', u'1') u'Claim Frequency Type Code'
    CLM06 = models.CharField( max_length=1 ) # (u'ID', u'1', u'1') u'Yes/No Condition or Response Code'
    CLM07 = models.CharField( max_length=1 ) # (u'ID', u'1', u'1') u'Provider Accept Assignment Code'
    CLM08 = models.CharField( max_length=1 ) # (u'ID', u'1', u'1') u'Yes/No Condition or Response Code'
    CLM09 = models.CharField( max_length=1 ) # (u'ID', u'1', u'1') u'Release of Information Code'
    CLM10 = models.CharField( max_length=1, null=True, blank=True ) # (u'ID', u'1', u'1') u'Patient Signature Source Code'
    # <Composite u'C024', Properties(req_sit=u'S',refdes='',seq=u'11',desc=u'Accident/Employment/Related Causes'), 
    CLM11_01 = models.CharField( max_length=3 ) # (u'ID', u'2', u'3') u'Related-Causes Code'
    CLM11_02 = models.CharField( max_length=3, null=True, blank=True ) # (u'ID', u'2', u'3') u'Related-Causes Code'
    CLM11_03 = models.CharField( max_length=3, null=True, blank=True ) # (u'ID', u'2', u'3') u'Related-Causes Code'
    CLM11_04 = models.CharField( max_length=2, null=True, blank=True ) # (u'ID', u'2', u'2') u'State or Province Code'
    CLM11_05 = models.CharField( max_length=3, null=True, blank=True ) # (u'ID', u'2', u'3') u'Country Code'
    CLM12 = models.CharField( max_length=3, null=True, blank=True ) # (u'ID', u'2', u'3') u'Special Program Code'
    CLM13 = models.CharField( max_length=1, null=True, blank=True ) # (u'ID', u'1', u'1') u'Yes/No Condition or Response Code'
    CLM14 = models.CharField( max_length=3, null=True, blank=True ) # (u'ID', u'1', u'3') u'Level of Service Code'
    CLM15 = models.CharField( max_length=1, null=True, blank=True ) # (u'ID', u'1', u'1') u'Yes/No Condition or Response Code'
    CLM16 = models.CharField( max_length=1, null=True, blank=True ) # (u'ID', u'1', u'1') u'Provider Agreement Code'
    CLM17 = models.CharField( max_length=2, null=True, blank=True ) # (u'ID', u'1', u'2') u'Claim Status Code'
    CLM18 = models.CharField( max_length=1, null=True, blank=True ) # (u'ID', u'1', u'1') u'Yes/No Condition or Response Code'
    CLM19 = models.CharField( max_length=2, null=True, blank=True ) # (u'ID', u'2', u'2') u'Claim Submission Reason Code'
    CLM20 = models.CharField( max_length=2, null=True, blank=True ) # (u'ID', u'1', u'2') u'Delay Reason Code'
    def unmarshall( self, segmentToken, cs=':' ):
        self.CLM01 = segmentToken.elt(1)
        self.CLM02 = segmentToken.elt(2)
        self.CLM03 = segmentToken.elt(3)
        self.CLM04 = segmentToken.elt(4)
        # composite= segmentToken[5].split(cs)
        self.CLM05_01 = segmentToken.subElt(5,cs,0)
        self.CLM05_02 = segmentToken.subElt(5,cs,1)
        self.CLM05_03 = segmentToken.subElt(5,cs,2)
        self.CLM06 = segmentToken.elt(6)
        self.CLM07 = segmentToken.elt(7)
        self.CLM08 = segmentToken.elt(8)
        self.CLM09 = segmentToken.elt(9)
        self.CLM10 = segmentToken.elt(10)
        # composite= segmentToken[11].split(cs)
        self.CLM11_01 = segmentToken.subElt(11,cs,0)
        self.CLM11_02 = segmentToken.subElt(11,cs,1)
        self.CLM11_03 = segmentToken.subElt(11,cs,2)
        self.CLM11_04 = segmentToken.subElt(11,cs,3)
        self.CLM11_05 = segmentToken.subElt(11,cs,4)
        self.CLM12 = segmentToken.elt(12)
        self.CLM13 = segmentToken.elt(13)
        self.CLM14 = segmentToken.elt(14)
        self.CLM15 = segmentToken.elt(15)
        self.CLM16 = segmentToken.elt(16)
        self.CLM17 = segmentToken.elt(17)
        self.CLM18 = segmentToken.elt(18)
        self.CLM19 = segmentToken.elt(19)
        self.CLM20 = segmentToken.elt(20)

class Segment_DTP(models.Model):
    """Properties(syntax='',req_sit=u'S',repeat=u'1',pos=u'135',desc=u'Date - Initial Treatment')"""
    segment = models.ForeignKey( X12Segment )
    DTP01 = models.CharField( max_length=3 ) # (u'ID', u'3', u'3') u'Date/Time Qualifier'
    DTP02 = models.CharField( max_length=3 ) # (u'ID', u'2', u'3') u'Date Time Period Format Qualifier'
    DTP03 = models.CharField( max_length=35 ) # (u'AN', u'1', u'35') u'Date Time Period'
    def unmarshall( self, segmentToken, cs=':' ):
        self.DTP01 = segmentToken.elt(1)
        self.DTP02 = segmentToken.elt(2)
        self.DTP03 = segmentToken.elt(3)

class Segment_PWK(models.Model):
    """Properties(syntax=u'P0506',req_sit=u'S',repeat=u'10',pos=u'155',desc=u'Claim Supplemental Information')"""
    segment = models.ForeignKey( X12Segment )
    PWK01 = models.CharField( max_length=2 ) # (u'ID', u'2', u'2') u'Report Type Code'
    PWK02 = models.CharField( max_length=2 ) # (u'ID', u'1', u'2') u'Report Transmission Code'
    PWK03 = models.CharField( max_length=2, null=True, blank=True ) # (u'N0', u'1', u'2') u'Report Copies Needed'
    PWK04 = models.CharField( max_length=3, null=True, blank=True ) # (u'ID', u'2', u'3') u'Entity Identifier Code'
    PWK05 = models.CharField( max_length=2, null=True, blank=True ) # (u'ID', u'1', u'2') u'Identification Code Qualifier'
    PWK06 = models.CharField( max_length=80, null=True, blank=True ) # (u'AN', u'2', u'80') u'Identification Code'
    PWK07 = models.CharField( max_length=80, null=True, blank=True ) # (u'AN', u'1', u'80') u'Description'
    # <Composite u'C002', Properties(req_sit=u'N',refdes=u'PWK08',seq=u'08',desc=u'Actions Indicated'), 
    PWK09 = models.CharField( max_length=2, null=True, blank=True ) # (u'ID', u'1', u'2') u'Request Category Code'
    def unmarshall( self, segmentToken, cs=':' ):
        self.PWK01 = segmentToken.elt(1)
        self.PWK02 = segmentToken.elt(2)
        self.PWK03 = segmentToken.elt(3)
        self.PWK04 = segmentToken.elt(4)
        self.PWK05 = segmentToken.elt(5)
        self.PWK06 = segmentToken.elt(6)
        self.PWK07 = segmentToken.elt(7)
        self.C002 = segmentToken.elt(8)
        self.PWK09 = segmentToken.elt(9)

class Segment_CN1(models.Model):
    """Properties(syntax='',req_sit=u'S',repeat=u'1',pos=u'160',desc=u'Contract Information')"""
    segment = models.ForeignKey( X12Segment )
    CN101 = models.CharField( max_length=2 ) # (u'ID', u'2', u'2') u'Contract Type Code'
    CN102 = models.CharField( max_length=18, null=True, blank=True ) # (u'R', u'1', u'18') u'Monetary Amount'
    CN103 = models.CharField( max_length=6, null=True, blank=True ) # (u'R', u'1', u'6') u'Percent'
    CN104 = models.CharField( max_length=30, null=True, blank=True ) # (u'AN', u'1', u'30') u'Reference Identification'
    CN105 = models.CharField( max_length=6, null=True, blank=True ) # (u'R', u'1', u'6') u'Terms Discount Percent'
    CN106 = models.CharField( max_length=30, null=True, blank=True ) # (u'AN', u'1', u'30') u'Version Identifier'
    def unmarshall( self, segmentToken, cs=':' ):
        self.CN101 = segmentToken.elt(1)
        self.CN102 = segmentToken.elt(2)
        self.CN103 = segmentToken.elt(3)
        self.CN104 = segmentToken.elt(4)
        self.CN105 = segmentToken.elt(5)
        self.CN106 = segmentToken.elt(6)

class Segment_AMT(models.Model):
    """Properties(syntax='',req_sit=u'S',repeat=u'1',pos=u'175',desc=u'Credit/Debit Card Maximum Amount')"""
    segment = models.ForeignKey( X12Segment )
    AMT01 = models.CharField( max_length=3 ) # (u'ID', u'1', u'3') u'Amount Qualifier Code'
    AMT02 = models.CharField( max_length=18 ) # (u'R', u'1', u'18') u'Monetary Amount'
    AMT03 = models.CharField( max_length=1, null=True, blank=True ) # (u'ID', u'1', u'1') u'Credit/Debit Flag Code'
    def unmarshall( self, segmentToken, cs=':' ):
        self.AMT01 = segmentToken.elt(1)
        self.AMT02 = segmentToken.elt(2)
        self.AMT03 = segmentToken.elt(3)

class Segment_K3(models.Model):
    """Properties(syntax='',req_sit=u'S',repeat=u'10',pos=u'185',desc=u'File Information')"""
    segment = models.ForeignKey( X12Segment )
    K301 = models.CharField( max_length=80 ) # (u'AN', u'1', u'80') u'Fixed Format Information'
    K302 = models.CharField( max_length=2, null=True, blank=True ) # (u'ID', u'1', u'2') u'Record Format Code'
    # <Composite u'C001', Properties(req_sit=u'N',refdes=u'K303',seq=u'03',desc=u'Composite Unit of Measure'), 
    def unmarshall( self, segmentToken, cs=':' ):
        self.K301 = segmentToken.elt(1)
        self.K302 = segmentToken.elt(2)
        self.C001 = segmentToken.elt(3)

class Segment_NTE(models.Model):
    """Properties(syntax='',req_sit=u'S',repeat=u'1',pos=u'190',desc=u'Claim Note')"""
    segment = models.ForeignKey( X12Segment )
    NTE01 = models.CharField( max_length=3 ) # (u'ID', u'3', u'3') u'Note Reference Code'
    NTE02 = models.CharField( max_length=80 ) # (u'AN', u'1', u'80') u'Description'
    def unmarshall( self, segmentToken, cs=':' ):
        self.NTE01 = segmentToken.elt(1)
        self.NTE02 = segmentToken.elt(2)

class Segment_CR1(models.Model):
    """Properties(syntax=u'P0102 P0506',req_sit=u'S',repeat=u'1',pos=u'195',desc=u'Ambulance Transport Information')"""
    segment = models.ForeignKey( X12Segment )
    CR101 = models.CharField( max_length=2, null=True, blank=True ) # (u'ID', u'2', u'2') u'Unit or Basis for Measurement Code'
    CR102 = models.CharField( max_length=10, null=True, blank=True ) # (u'R', u'1', u'10') u'Weight'
    CR103 = models.CharField( max_length=1 ) # (u'ID', u'1', u'1') u'Ambulance Transport Code'
    CR104 = models.CharField( max_length=1 ) # (u'ID', u'1', u'1') u'Ambulance Transport Reason Code'
    CR105 = models.CharField( max_length=2 ) # (u'ID', u'2', u'2') u'Unit or Basis for Measurement Code'
    CR106 = models.CharField( max_length=15 ) # (u'R', u'1', u'15') u'Quantity'
    CR107 = models.CharField( max_length=55, null=True, blank=True ) # (u'AN', u'1', u'55') u'Address Information'
    CR108 = models.CharField( max_length=55, null=True, blank=True ) # (u'AN', u'1', u'55') u'Address Information'
    CR109 = models.CharField( max_length=80, null=True, blank=True ) # (u'AN', u'1', u'80') u'Description'
    CR110 = models.CharField( max_length=80, null=True, blank=True ) # (u'AN', u'1', u'80') u'Description'
    def unmarshall( self, segmentToken, cs=':' ):
        self.CR101 = segmentToken.elt(1)
        self.CR102 = segmentToken.elt(2)
        self.CR103 = segmentToken.elt(3)
        self.CR104 = segmentToken.elt(4)
        self.CR105 = segmentToken.elt(5)
        self.CR106 = segmentToken.elt(6)
        self.CR107 = segmentToken.elt(7)
        self.CR108 = segmentToken.elt(8)
        self.CR109 = segmentToken.elt(9)
        self.CR110 = segmentToken.elt(10)

class Segment_CR2(models.Model):
    """Properties(syntax=u'P0102 C0403 P0506',req_sit=u'S',repeat=u'1',pos=u'200',desc=u'Spinal Manipulation Service Information')"""
    segment = models.ForeignKey( X12Segment )
    CR201 = models.CharField( max_length=9, null=True, blank=True ) # (u'N0', u'1', u'9') u'Count'
    CR202 = models.CharField( max_length=15, null=True, blank=True ) # (u'R', u'1', u'15') u'Quantity'
    CR203 = models.CharField( max_length=3, null=True, blank=True ) # (u'ID', u'2', u'3') u'Subluxation Level Code'
    CR204 = models.CharField( max_length=3, null=True, blank=True ) # (u'ID', u'2', u'3') u'Subluxation Level Code'
    CR205 = models.CharField( max_length=2, null=True, blank=True ) # (u'ID', u'2', u'2') u'Unit or Basis for Measurement Code'
    CR206 = models.CharField( max_length=15, null=True, blank=True ) # (u'R', u'1', u'15') u'Quantity'
    CR207 = models.CharField( max_length=15, null=True, blank=True ) # (u'R', u'1', u'15') u'Quantity'
    CR208 = models.CharField( max_length=1 ) # (u'ID', u'1', u'1') u'Nature of Condition Code'
    CR209 = models.CharField( max_length=1, null=True, blank=True ) # (u'ID', u'1', u'1') u'Yes/No Condition or Response Code'
    CR210 = models.CharField( max_length=80, null=True, blank=True ) # (u'AN', u'1', u'80') u'Description'
    CR211 = models.CharField( max_length=80, null=True, blank=True ) # (u'AN', u'1', u'80') u'Description'
    CR212 = models.CharField( max_length=1, null=True, blank=True ) # (u'ID', u'1', u'1') u'Yes/No Condition or Response Code'
    def unmarshall( self, segmentToken, cs=':' ):
        self.CR201 = segmentToken.elt(1)
        self.CR202 = segmentToken.elt(2)
        self.CR203 = segmentToken.elt(3)
        self.CR204 = segmentToken.elt(4)
        self.CR205 = segmentToken.elt(5)
        self.CR206 = segmentToken.elt(6)
        self.CR207 = segmentToken.elt(7)
        self.CR208 = segmentToken.elt(8)
        self.CR209 = segmentToken.elt(9)
        self.CR210 = segmentToken.elt(10)
        self.CR211 = segmentToken.elt(11)
        self.CR212 = segmentToken.elt(12)

class Segment_CRC(models.Model):
    """Properties(syntax='',req_sit=u'S',repeat=u'3',pos=u'220',desc=u'Ambulance Certification')"""
    segment = models.ForeignKey( X12Segment )
    CRC01 = models.CharField( max_length=2 ) # (u'ID', u'2', u'2') u'Code Category'
    CRC02 = models.CharField( max_length=1 ) # (u'ID', u'1', u'1') u'Yes/No Condition or Response Code'
    CRC03 = models.CharField( max_length=2 ) # (u'ID', u'2', u'2') u'Condition Indicator'
    CRC04 = models.CharField( max_length=2, null=True, blank=True ) # (u'ID', u'2', u'2') u'Condition Indicator'
    CRC05 = models.CharField( max_length=2, null=True, blank=True ) # (u'ID', u'2', u'2') u'Condition Indicator'
    CRC06 = models.CharField( max_length=2, null=True, blank=True ) # (u'ID', u'2', u'2') u'Condition Indicator'
    CRC07 = models.CharField( max_length=2, null=True, blank=True ) # (u'ID', u'2', u'2') u'Condition Indicator'
    def unmarshall( self, segmentToken, cs=':' ):
        self.CRC01 = segmentToken.elt(1)
        self.CRC02 = segmentToken.elt(2)
        self.CRC03 = segmentToken.elt(3)
        self.CRC04 = segmentToken.elt(4)
        self.CRC05 = segmentToken.elt(5)
        self.CRC06 = segmentToken.elt(6)
        self.CRC07 = segmentToken.elt(7)

class Segment_HI(models.Model):
    """Properties(syntax='',req_sit=u'S',repeat=u'1',pos=u'231',desc=u'Health Care Diagnosis Code')"""
    segment = models.ForeignKey( X12Segment )
    # <Composite u'C022', Properties(req_sit=u'R',refdes='',seq=u'01',desc=u'Principal Diagnosis'), 
    HI01_01 = models.CharField( max_length=3 ) # (u'ID', u'1', u'3') u'Code List Qualifier Code'
    HI01_02 = models.CharField( max_length=30 ) # (u'AN', u'1', u'30') u'Industry Code'
    HI01_03 = models.CharField( max_length=3, null=True, blank=True ) # (u'ID', u'2', u'3') u'Date Time Period Format Qualifier'
    HI01_04 = models.CharField( max_length=35, null=True, blank=True ) # (u'AN', u'1', u'35') u'Date Time Period'
    HI01_05 = models.CharField( max_length=18, null=True, blank=True ) # (u'R', u'1', u'18') u'Monetary Amount'
    HI01_06 = models.CharField( max_length=15, null=True, blank=True ) # (u'R', u'1', u'15') u'Quantity'
    HI01_07 = models.CharField( max_length=30, null=True, blank=True ) # (u'AN', u'1', u'30') u'Version Identifier'
    # <Composite u'C022', Properties(req_sit=u'S',refdes='',seq=u'02',desc=u'Diagnosis'), 
    HI02_01 = models.CharField( max_length=3 ) # (u'ID', u'1', u'3') u'Code List Qualifier Code'
    HI02_02 = models.CharField( max_length=30 ) # (u'AN', u'1', u'30') u'Industry Code'
    HI02_03 = models.CharField( max_length=3, null=True, blank=True ) # (u'ID', u'2', u'3') u'Date Time Period Format Qualifier'
    HI02_04 = models.CharField( max_length=35, null=True, blank=True ) # (u'AN', u'1', u'35') u'Date Time Period'
    HI02_05 = models.CharField( max_length=18, null=True, blank=True ) # (u'R', u'1', u'18') u'Monetary Amount'
    HI02_06 = models.CharField( max_length=15, null=True, blank=True ) # (u'R', u'1', u'15') u'Quantity'
    HI02_07 = models.CharField( max_length=30, null=True, blank=True ) # (u'AN', u'1', u'30') u'Version Identifier'
    # <Composite u'C022', Properties(req_sit=u'S',refdes='',seq=u'03',desc=u'Diagnosis'), 
    HI03_01 = models.CharField( max_length=3 ) # (u'ID', u'1', u'3') u'Code List Qualifier Code'
    HI03_02 = models.CharField( max_length=30 ) # (u'AN', u'1', u'30') u'Industry Code'
    HI03_03 = models.CharField( max_length=3, null=True, blank=True ) # (u'ID', u'2', u'3') u'Date Time Period Format Qualifier'
    HI03_04 = models.CharField( max_length=35, null=True, blank=True ) # (u'AN', u'1', u'35') u'Date Time Period'
    HI03_05 = models.CharField( max_length=18, null=True, blank=True ) # (u'R', u'1', u'18') u'Monetary Amount'
    HI03_06 = models.CharField( max_length=15, null=True, blank=True ) # (u'R', u'1', u'15') u'Quantity'
    HI03_07 = models.CharField( max_length=30, null=True, blank=True ) # (u'AN', u'1', u'30') u'Version Identifier'
    # <Composite u'C022', Properties(req_sit=u'S',refdes='',seq=u'04',desc=u'Diagnosis'), 
    HI04_01 = models.CharField( max_length=3 ) # (u'ID', u'1', u'3') u'Code List Qualifier Code'
    HI04_02 = models.CharField( max_length=30 ) # (u'AN', u'1', u'30') u'Industry Code'
    HI04_03 = models.CharField( max_length=3, null=True, blank=True ) # (u'ID', u'2', u'3') u'Date Time Period Format Qualifier'
    HI04_04 = models.CharField( max_length=35, null=True, blank=True ) # (u'AN', u'1', u'35') u'Date Time Period'
    HI04_05 = models.CharField( max_length=18, null=True, blank=True ) # (u'R', u'1', u'18') u'Monetary Amount'
    HI04_06 = models.CharField( max_length=15, null=True, blank=True ) # (u'R', u'1', u'15') u'Quantity'
    HI04_07 = models.CharField( max_length=30, null=True, blank=True ) # (u'AN', u'1', u'30') u'Version Identifier'
    # <Composite u'C022', Properties(req_sit=u'S',refdes='',seq=u'05',desc=u'Diagnosis'), 
    HI05_01 = models.CharField( max_length=3 ) # (u'ID', u'1', u'3') u'Code List Qualifier Code'
    HI05_02 = models.CharField( max_length=30 ) # (u'AN', u'1', u'30') u'Industry Code'
    HI05_03 = models.CharField( max_length=3, null=True, blank=True ) # (u'ID', u'2', u'3') u'Date Time Period Format Qualifier'
    HI05_04 = models.CharField( max_length=35, null=True, blank=True ) # (u'AN', u'1', u'35') u'Date Time Period'
    HI05_05 = models.CharField( max_length=18, null=True, blank=True ) # (u'R', u'1', u'18') u'Monetary Amount'
    HI05_06 = models.CharField( max_length=15, null=True, blank=True ) # (u'R', u'1', u'15') u'Quantity'
    HI05_07 = models.CharField( max_length=30, null=True, blank=True ) # (u'AN', u'1', u'30') u'Version Identifier'
    # <Composite u'C022', Properties(req_sit=u'S',refdes='',seq=u'06',desc=u'Diagnosis'), 
    HI06_01 = models.CharField( max_length=3 ) # (u'ID', u'1', u'3') u'Code List Qualifier Code'
    HI06_02 = models.CharField( max_length=30 ) # (u'AN', u'1', u'30') u'Industry Code'
    HI06_03 = models.CharField( max_length=3, null=True, blank=True ) # (u'ID', u'2', u'3') u'Date Time Period Format Qualifier'
    HI06_04 = models.CharField( max_length=35, null=True, blank=True ) # (u'AN', u'1', u'35') u'Date Time Period'
    HI06_05 = models.CharField( max_length=18, null=True, blank=True ) # (u'R', u'1', u'18') u'Monetary Amount'
    HI06_06 = models.CharField( max_length=15, null=True, blank=True ) # (u'R', u'1', u'15') u'Quantity'
    HI06_07 = models.CharField( max_length=30, null=True, blank=True ) # (u'AN', u'1', u'30') u'Version Identifier'
    # <Composite u'C022', Properties(req_sit=u'S',refdes='',seq=u'07',desc=u'Diagnosis'), 
    HI07_01 = models.CharField( max_length=3 ) # (u'ID', u'1', u'3') u'Code List Qualifier Code'
    HI07_02 = models.CharField( max_length=30 ) # (u'AN', u'1', u'30') u'Industry Code'
    HI07_03 = models.CharField( max_length=3, null=True, blank=True ) # (u'ID', u'2', u'3') u'Date Time Period Format Qualifier'
    HI07_04 = models.CharField( max_length=35, null=True, blank=True ) # (u'AN', u'1', u'35') u'Date Time Period'
    HI07_05 = models.CharField( max_length=18, null=True, blank=True ) # (u'R', u'1', u'18') u'Monetary Amount'
    HI07_06 = models.CharField( max_length=15, null=True, blank=True ) # (u'R', u'1', u'15') u'Quantity'
    HI07_07 = models.CharField( max_length=30, null=True, blank=True ) # (u'AN', u'1', u'30') u'Version Identifier'
    # <Composite u'C022', Properties(req_sit=u'S',refdes='',seq=u'08',desc=u'Diagnosis'), 
    HI08_01 = models.CharField( max_length=3 ) # (u'ID', u'1', u'3') u'Code List Qualifier Code'
    HI08_02 = models.CharField( max_length=30 ) # (u'AN', u'1', u'30') u'Industry Code'
    HI08_03 = models.CharField( max_length=3, null=True, blank=True ) # (u'ID', u'2', u'3') u'Date Time Period Format Qualifier'
    HI08_04 = models.CharField( max_length=35, null=True, blank=True ) # (u'AN', u'1', u'35') u'Date Time Period'
    HI08_05 = models.CharField( max_length=18, null=True, blank=True ) # (u'R', u'1', u'18') u'Monetary Amount'
    HI08_06 = models.CharField( max_length=15, null=True, blank=True ) # (u'R', u'1', u'15') u'Quantity'
    HI08_07 = models.CharField( max_length=30, null=True, blank=True ) # (u'AN', u'1', u'30') u'Version Identifier'
    # <Composite u'C022', Properties(req_sit=u'N',refdes=u'HI09',seq=u'09',desc=u'Health Care Code Information'), 
    # <Composite u'C022', Properties(req_sit=u'N',refdes=u'HI10',seq=u'10',desc=u'Health Care Code Information'), 
    # <Composite u'C022', Properties(req_sit=u'N',refdes=u'HI11',seq=u'11',desc=u'Health Care Code Information'), 
    # <Composite u'C022', Properties(req_sit=u'N',refdes=u'HI12',seq=u'12',desc=u'Health Care Code Information'), 
    def unmarshall( self, segmentToken, cs=':' ):
        # composite= segmentToken[1].split(cs)
        self.HI01_01 = segmentToken.subElt(1,cs,0)
        self.HI01_02 = segmentToken.subElt(1,cs,1)
        self.HI01_03 = segmentToken.subElt(1,cs,2)
        self.HI01_04 = segmentToken.subElt(1,cs,3)
        self.HI01_05 = segmentToken.subElt(1,cs,4)
        self.HI01_06 = segmentToken.subElt(1,cs,5)
        self.HI01_07 = segmentToken.subElt(1,cs,6)
        # composite= segmentToken[2].split(cs)
        self.HI02_01 = segmentToken.subElt(2,cs,0)
        self.HI02_02 = segmentToken.subElt(2,cs,1)
        self.HI02_03 = segmentToken.subElt(2,cs,2)
        self.HI02_04 = segmentToken.subElt(2,cs,3)
        self.HI02_05 = segmentToken.subElt(2,cs,4)
        self.HI02_06 = segmentToken.subElt(2,cs,5)
        self.HI02_07 = segmentToken.subElt(2,cs,6)
        # composite= segmentToken[3].split(cs)
        self.HI03_01 = segmentToken.subElt(3,cs,0)
        self.HI03_02 = segmentToken.subElt(3,cs,1)
        self.HI03_03 = segmentToken.subElt(3,cs,2)
        self.HI03_04 = segmentToken.subElt(3,cs,3)
        self.HI03_05 = segmentToken.subElt(3,cs,4)
        self.HI03_06 = segmentToken.subElt(3,cs,5)
        self.HI03_07 = segmentToken.subElt(3,cs,6)
        # composite= segmentToken[4].split(cs)
        self.HI04_01 = segmentToken.subElt(4,cs,0)
        self.HI04_02 = segmentToken.subElt(4,cs,1)
        self.HI04_03 = segmentToken.subElt(4,cs,2)
        self.HI04_04 = segmentToken.subElt(4,cs,3)
        self.HI04_05 = segmentToken.subElt(4,cs,4)
        self.HI04_06 = segmentToken.subElt(4,cs,5)
        self.HI04_07 = segmentToken.subElt(4,cs,6)
        # composite= segmentToken[5].split(cs)
        self.HI05_01 = segmentToken.subElt(5,cs,0)
        self.HI05_02 = segmentToken.subElt(5,cs,1)
        self.HI05_03 = segmentToken.subElt(5,cs,2)
        self.HI05_04 = segmentToken.subElt(5,cs,3)
        self.HI05_05 = segmentToken.subElt(5,cs,4)
        self.HI05_06 = segmentToken.subElt(5,cs,5)
        self.HI05_07 = segmentToken.subElt(5,cs,6)
        # composite= segmentToken[6].split(cs)
        self.HI06_01 = segmentToken.subElt(6,cs,0)
        self.HI06_02 = segmentToken.subElt(6,cs,1)
        self.HI06_03 = segmentToken.subElt(6,cs,2)
        self.HI06_04 = segmentToken.subElt(6,cs,3)
        self.HI06_05 = segmentToken.subElt(6,cs,4)
        self.HI06_06 = segmentToken.subElt(6,cs,5)
        self.HI06_07 = segmentToken.subElt(6,cs,6)
        # composite= segmentToken[7].split(cs)
        self.HI07_01 = segmentToken.subElt(7,cs,0)
        self.HI07_02 = segmentToken.subElt(7,cs,1)
        self.HI07_03 = segmentToken.subElt(7,cs,2)
        self.HI07_04 = segmentToken.subElt(7,cs,3)
        self.HI07_05 = segmentToken.subElt(7,cs,4)
        self.HI07_06 = segmentToken.subElt(7,cs,5)
        self.HI07_07 = segmentToken.subElt(7,cs,6)
        # composite= segmentToken[8].split(cs)
        self.HI08_01 = segmentToken.subElt(8,cs,0)
        self.HI08_02 = segmentToken.subElt(8,cs,1)
        self.HI08_03 = segmentToken.subElt(8,cs,2)
        self.HI08_04 = segmentToken.subElt(8,cs,3)
        self.HI08_05 = segmentToken.subElt(8,cs,4)
        self.HI08_06 = segmentToken.subElt(8,cs,5)
        self.HI08_07 = segmentToken.subElt(8,cs,6)
        self.C022 = segmentToken.elt(9)
        self.C022 = segmentToken.elt(10)
        self.C022 = segmentToken.elt(11)
        self.C022 = segmentToken.elt(12)

class Segment_HCP(models.Model):
    """Properties(syntax=u'R0113 P0910 P1112',req_sit=u'S',repeat=u'1',pos=u'241',desc=u'Claim Pricing/Repricing Information')"""
    segment = models.ForeignKey( X12Segment )
    HCP01 = models.CharField( max_length=2 ) # (u'ID', u'2', u'2') u'Pricing Methodology'
    HCP02 = models.CharField( max_length=18 ) # (u'R', u'1', u'18') u'Monetary Amount'
    HCP03 = models.CharField( max_length=18, null=True, blank=True ) # (u'R', u'1', u'18') u'Monetary Amount'
    HCP04 = models.CharField( max_length=30, null=True, blank=True ) # (u'AN', u'1', u'30') u'Reference Identification'
    HCP05 = models.CharField( max_length=9, null=True, blank=True ) # (u'R', u'1', u'9') u'Rate'
    HCP06 = models.CharField( max_length=30, null=True, blank=True ) # (u'AN', u'1', u'30') u'Reference Identification'
    HCP07 = models.CharField( max_length=18, null=True, blank=True ) # (u'R', u'1', u'18') u'Monetary Amount'
    HCP08 = models.CharField( max_length=48, null=True, blank=True ) # (u'AN', u'1', u'48') u'Product/Service ID'
    HCP09 = models.CharField( max_length=2, null=True, blank=True ) # (u'ID', u'2', u'2') u'Product/Service ID Qualifier'
    HCP10 = models.CharField( max_length=48, null=True, blank=True ) # (u'AN', u'1', u'48') u'Product/Service ID'
    HCP11 = models.CharField( max_length=2, null=True, blank=True ) # (u'ID', u'2', u'2') u'Unit or Basis for Measurement Code'
    HCP12 = models.CharField( max_length=15, null=True, blank=True ) # (u'R', u'1', u'15') u'Quantity'
    HCP13 = models.CharField( max_length=2, null=True, blank=True ) # (u'ID', u'2', u'2') u'Reject Reason Code'
    HCP14 = models.CharField( max_length=2, null=True, blank=True ) # (u'ID', u'1', u'2') u'Policy Compliance Code'
    HCP15 = models.CharField( max_length=2, null=True, blank=True ) # (u'ID', u'1', u'2') u'Exception Code'
    def unmarshall( self, segmentToken, cs=':' ):
        self.HCP01 = segmentToken.elt(1)
        self.HCP02 = segmentToken.elt(2)
        self.HCP03 = segmentToken.elt(3)
        self.HCP04 = segmentToken.elt(4)
        self.HCP05 = segmentToken.elt(5)
        self.HCP06 = segmentToken.elt(6)
        self.HCP07 = segmentToken.elt(7)
        self.HCP08 = segmentToken.elt(8)
        self.HCP09 = segmentToken.elt(9)
        self.HCP10 = segmentToken.elt(10)
        self.HCP11 = segmentToken.elt(11)
        self.HCP12 = segmentToken.elt(12)
        self.HCP13 = segmentToken.elt(13)
        self.HCP14 = segmentToken.elt(14)
        self.HCP15 = segmentToken.elt(15)

class Segment_CR7(models.Model):
    """Properties(syntax='',req_sit=u'R',repeat=u'1',pos=u'242',desc=u'Home Health Care Plan Information')"""
    segment = models.ForeignKey( X12Segment )
    CR701 = models.CharField( max_length=2 ) # (u'ID', u'2', u'2') u'Discipline Type Code'
    CR702 = models.CharField( max_length=9 ) # (u'N0', u'1', u'9') u'Number'
    CR703 = models.CharField( max_length=9 ) # (u'N0', u'1', u'9') u'Number'
    def unmarshall( self, segmentToken, cs=':' ):
        self.CR701 = segmentToken.elt(1)
        self.CR702 = segmentToken.elt(2)
        self.CR703 = segmentToken.elt(3)

class Segment_HSD(models.Model):
    """Properties(syntax=u'P0102 C0605',req_sit=u'S',repeat=u'3',pos=u'243',desc=u'Health Care Services Delivery')"""
    segment = models.ForeignKey( X12Segment )
    HSD01 = models.CharField( max_length=2, null=True, blank=True ) # (u'ID', u'2', u'2') u'Quantity Qualifier'
    HSD02 = models.CharField( max_length=15, null=True, blank=True ) # (u'R', u'1', u'15') u'Quantity'
    HSD03 = models.CharField( max_length=2, null=True, blank=True ) # (u'ID', u'2', u'2') u'Unit or Basis for Measurement Code'
    HSD04 = models.CharField( max_length=6, null=True, blank=True ) # (u'R', u'1', u'6') u'Sample Selection Modulus'
    HSD05 = models.CharField( max_length=2, null=True, blank=True ) # (u'ID', u'1', u'2') u'Time Period Qualifier'
    HSD06 = models.CharField( max_length=3, null=True, blank=True ) # (u'N0', u'1', u'3') u'Number of Periods'
    HSD07 = models.CharField( max_length=2, null=True, blank=True ) # (u'ID', u'1', u'2') u'Ship/Delivery or Calendar Pattern Code'
    HSD08 = models.CharField( max_length=1, null=True, blank=True ) # (u'ID', u'1', u'1') u'Ship/Delivery Pattern Time Code'
    def unmarshall( self, segmentToken, cs=':' ):
        self.HSD01 = segmentToken.elt(1)
        self.HSD02 = segmentToken.elt(2)
        self.HSD03 = segmentToken.elt(3)
        self.HSD04 = segmentToken.elt(4)
        self.HSD05 = segmentToken.elt(5)
        self.HSD06 = segmentToken.elt(6)
        self.HSD07 = segmentToken.elt(7)
        self.HSD08 = segmentToken.elt(8)

class Segment_CAS(models.Model):
    """Properties(syntax=u'L050607 C0605 C0705 L080910 C0908 C1008 L111213 C1211 C1311 L141516 C1514 C1614 L171819 C1817 C1917',req_sit=u'S',repeat=u'5',pos=u'295',desc=u'Claim Level Adjustments')"""
    segment = models.ForeignKey( X12Segment )
    CAS01 = models.CharField( max_length=2 ) # (u'ID', u'1', u'2') u'Claim Adjustment Group Code'
    CAS02 = models.CharField( max_length=5 ) # (u'ID', u'1', u'5') u'Claim Adjustment Reason Code'
    CAS03 = models.CharField( max_length=18 ) # (u'R', u'1', u'18') u'Monetary Amount'
    CAS04 = models.CharField( max_length=15, null=True, blank=True ) # (u'R', u'1', u'15') u'Quantity'
    CAS05 = models.CharField( max_length=5, null=True, blank=True ) # (u'ID', u'1', u'5') u'Claim Adjustment Reason Code'
    CAS06 = models.CharField( max_length=18, null=True, blank=True ) # (u'R', u'1', u'18') u'Monetary Amount'
    CAS07 = models.CharField( max_length=15, null=True, blank=True ) # (u'R', u'1', u'15') u'Quantity'
    CAS08 = models.CharField( max_length=5, null=True, blank=True ) # (u'ID', u'1', u'5') u'Claim Adjustment Reason Code'
    CAS09 = models.CharField( max_length=18, null=True, blank=True ) # (u'R', u'1', u'18') u'Monetary Amount'
    CAS10 = models.CharField( max_length=15, null=True, blank=True ) # (u'R', u'1', u'15') u'Quantity'
    CAS11 = models.CharField( max_length=5, null=True, blank=True ) # (u'ID', u'1', u'5') u'Claim Adjustment Reason Code'
    CAS12 = models.CharField( max_length=18, null=True, blank=True ) # (u'R', u'1', u'18') u'Monetary Amount'
    CAS13 = models.CharField( max_length=15, null=True, blank=True ) # (u'R', u'1', u'15') u'Quantity'
    CAS14 = models.CharField( max_length=5, null=True, blank=True ) # (u'ID', u'1', u'5') u'Claim Adjustment Reason Code'
    CAS15 = models.CharField( max_length=18, null=True, blank=True ) # (u'R', u'1', u'18') u'Monetary Amount'
    CAS16 = models.CharField( max_length=15, null=True, blank=True ) # (u'R', u'1', u'15') u'Quantity'
    CAS17 = models.CharField( max_length=5, null=True, blank=True ) # (u'ID', u'1', u'5') u'Claim Adjustment Reason Code'
    CAS18 = models.CharField( max_length=18, null=True, blank=True ) # (u'R', u'1', u'18') u'Monetary Amount'
    CAS19 = models.CharField( max_length=15, null=True, blank=True ) # (u'R', u'1', u'15') u'Quantity'
    def unmarshall( self, segmentToken, cs=':' ):
        self.CAS01 = segmentToken.elt(1)
        self.CAS02 = segmentToken.elt(2)
        self.CAS03 = segmentToken.elt(3)
        self.CAS04 = segmentToken.elt(4)
        self.CAS05 = segmentToken.elt(5)
        self.CAS06 = segmentToken.elt(6)
        self.CAS07 = segmentToken.elt(7)
        self.CAS08 = segmentToken.elt(8)
        self.CAS09 = segmentToken.elt(9)
        self.CAS10 = segmentToken.elt(10)
        self.CAS11 = segmentToken.elt(11)
        self.CAS12 = segmentToken.elt(12)
        self.CAS13 = segmentToken.elt(13)
        self.CAS14 = segmentToken.elt(14)
        self.CAS15 = segmentToken.elt(15)
        self.CAS16 = segmentToken.elt(16)
        self.CAS17 = segmentToken.elt(17)
        self.CAS18 = segmentToken.elt(18)
        self.CAS19 = segmentToken.elt(19)

class Segment_OI(models.Model):
    """Properties(syntax='',req_sit=u'R',repeat=u'1',pos=u'310',desc=u'Other Insurance Coverage Information')"""
    segment = models.ForeignKey( X12Segment )
    OI01 = models.CharField( max_length=2, null=True, blank=True ) # (u'ID', u'1', u'2') u'Claim Filing Indicator Code'
    OI02 = models.CharField( max_length=2, null=True, blank=True ) # (u'ID', u'2', u'2') u'Claim Submission Reason Code'
    OI03 = models.CharField( max_length=1 ) # (u'ID', u'1', u'1') u'Yes/No Condition or Response Code'
    OI04 = models.CharField( max_length=1, null=True, blank=True ) # (u'ID', u'1', u'1') u'Patient Signature Source Code'
    OI05 = models.CharField( max_length=1, null=True, blank=True ) # (u'ID', u'1', u'1') u'Provider Agreement Code'
    OI06 = models.CharField( max_length=1 ) # (u'ID', u'1', u'1') u'Release of Information Code'
    def unmarshall( self, segmentToken, cs=':' ):
        self.OI01 = segmentToken.elt(1)
        self.OI02 = segmentToken.elt(2)
        self.OI03 = segmentToken.elt(3)
        self.OI04 = segmentToken.elt(4)
        self.OI05 = segmentToken.elt(5)
        self.OI06 = segmentToken.elt(6)

class Segment_MOA(models.Model):
    """Properties(syntax='',req_sit=u'S',repeat=u'1',pos=u'320',desc=u'Medicare Outpatient Adjudication Information')"""
    segment = models.ForeignKey( X12Segment )
    MOA01 = models.CharField( max_length=10, null=True, blank=True ) # (u'R', u'1', u'10') u'Percent'
    MOA02 = models.CharField( max_length=18, null=True, blank=True ) # (u'R', u'1', u'18') u'Monetary Amount'
    MOA03 = models.CharField( max_length=30, null=True, blank=True ) # (u'AN', u'1', u'30') u'Reference Identification'
    MOA04 = models.CharField( max_length=30, null=True, blank=True ) # (u'AN', u'1', u'30') u'Reference Identification'
    MOA05 = models.CharField( max_length=30, null=True, blank=True ) # (u'AN', u'1', u'30') u'Reference Identification'
    MOA06 = models.CharField( max_length=30, null=True, blank=True ) # (u'AN', u'1', u'30') u'Reference Identification'
    MOA07 = models.CharField( max_length=30, null=True, blank=True ) # (u'AN', u'1', u'30') u'Reference Identification'
    MOA08 = models.CharField( max_length=18, null=True, blank=True ) # (u'R', u'1', u'18') u'Monetary Amount'
    MOA09 = models.CharField( max_length=18, null=True, blank=True ) # (u'R', u'1', u'18') u'Monetary Amount'
    def unmarshall( self, segmentToken, cs=':' ):
        self.MOA01 = segmentToken.elt(1)
        self.MOA02 = segmentToken.elt(2)
        self.MOA03 = segmentToken.elt(3)
        self.MOA04 = segmentToken.elt(4)
        self.MOA05 = segmentToken.elt(5)
        self.MOA06 = segmentToken.elt(6)
        self.MOA07 = segmentToken.elt(7)
        self.MOA08 = segmentToken.elt(8)
        self.MOA09 = segmentToken.elt(9)

class Segment_LX(models.Model):
    """Properties(syntax='',req_sit=u'R',repeat=u'1',pos=u'365',desc=u'Service Line')"""
    segment = models.ForeignKey( X12Segment )
    LX01 = models.CharField( max_length=6 ) # (u'N0', u'1', u'6') u'Assigned Number'
    def unmarshall( self, segmentToken, cs=':' ):
        self.LX01 = segmentToken.elt(1)

class Segment_SV1(models.Model):
    """Properties(syntax=u'P0304',req_sit=u'R',repeat=u'1',pos=u'370',desc=u'Professional Service')"""
    segment = models.ForeignKey( X12Segment )
    # <Composite u'C003', Properties(req_sit=u'R',refdes='',seq=u'01',desc=u'Procedure Identifier'), 
    SV101_01 = models.CharField( max_length=2 ) # (u'ID', u'2', u'2') u'Product/Service ID Qualifier'
    SV101_02 = models.CharField( max_length=48 ) # (u'AN', u'1', u'48') u'Product/Service ID'
    SV101_03 = models.CharField( max_length=2, null=True, blank=True ) # (u'AN', u'2', u'2') u'Procedure Modifier'
    SV101_04 = models.CharField( max_length=2, null=True, blank=True ) # (u'AN', u'2', u'2') u'Procedure Modifier'
    SV101_05 = models.CharField( max_length=2, null=True, blank=True ) # (u'AN', u'2', u'2') u'Procedure Modifier'
    SV101_06 = models.CharField( max_length=2, null=True, blank=True ) # (u'AN', u'2', u'2') u'Procedure Modifier'
    SV101_07 = models.CharField( max_length=80, null=True, blank=True ) # (u'AN', u'1', u'80') u'Description'
    SV102 = models.CharField( max_length=18 ) # (u'R', u'1', u'18') u'Monetary Amount'
    SV103 = models.CharField( max_length=2 ) # (u'ID', u'2', u'2') u'Unit or Basis for Measurement Code'
    SV104 = models.CharField( max_length=15 ) # (u'R', u'1', u'15') u'Quantity'
    SV105 = models.CharField( max_length=2, null=True, blank=True ) # (u'AN', u'1', u'2') u'Facility Code Value'
    SV106 = models.CharField( max_length=2, null=True, blank=True ) # (u'ID', u'1', u'2') u'Service Type Code'
    # <Composite u'C004', Properties(req_sit=u'S',refdes='',seq=u'07',desc=u'Diagnosis Code Pointer'), 
    SV107_01 = models.CharField( max_length=2 ) # (u'N0', u'1', u'2') u'Diagnosis Code Pointer'
    SV107_02 = models.CharField( max_length=2, null=True, blank=True ) # (u'N0', u'1', u'2') u'Diagnosis Code Pointer'
    SV107_03 = models.CharField( max_length=2, null=True, blank=True ) # (u'N0', u'1', u'2') u'Diagnosis Code Pointer'
    SV107_04 = models.CharField( max_length=2, null=True, blank=True ) # (u'N0', u'1', u'2') u'Diagnosis Code Pointer'
    SV108 = models.CharField( max_length=18, null=True, blank=True ) # (u'R', u'1', u'18') u'Monetary Amount'
    SV109 = models.CharField( max_length=1, null=True, blank=True ) # (u'ID', u'1', u'1') u'Yes/No Condition or Response Code'
    SV110 = models.CharField( max_length=2, null=True, blank=True ) # (u'ID', u'1', u'2') u'Multiple Procedure Code'
    SV111 = models.CharField( max_length=1, null=True, blank=True ) # (u'ID', u'1', u'1') u'Yes/No Condition or Response Code'
    SV112 = models.CharField( max_length=1, null=True, blank=True ) # (u'ID', u'1', u'1') u'Yes/No Condition or Response Code'
    SV113 = models.CharField( max_length=2, null=True, blank=True ) # (u'ID', u'1', u'2') u'Review Code'
    SV114 = models.CharField( max_length=2, null=True, blank=True ) # (u'AN', u'1', u'2') u'National or Local Assigned Review Value'
    SV115 = models.CharField( max_length=1, null=True, blank=True ) # (u'ID', u'1', u'1') u'Copay Status Code'
    SV116 = models.CharField( max_length=1, null=True, blank=True ) # (u'ID', u'1', u'1') u'Health Care Professional Shortage Area Code'
    SV117 = models.CharField( max_length=30, null=True, blank=True ) # (u'AN', u'1', u'30') u'Reference Identification'
    SV118 = models.CharField( max_length=15, null=True, blank=True ) # (u'ID', u'3', u'15') u'Postal Code'
    SV119 = models.CharField( max_length=18, null=True, blank=True ) # (u'R', u'1', u'18') u'Monetary Amount'
    SV120 = models.CharField( max_length=1, null=True, blank=True ) # (u'ID', u'1', u'1') u'Level of Care Code'
    SV121 = models.CharField( max_length=1, null=True, blank=True ) # (u'ID', u'1', u'1') u'Provider Agreement Code'
    def unmarshall( self, segmentToken, cs=':' ):
        # composite= segmentToken[1].split(cs)
        self.SV101_01 = segmentToken.subElt(1,cs,0)
        self.SV101_02 = segmentToken.subElt(1,cs,1)
        self.SV101_03 = segmentToken.subElt(1,cs,2)
        self.SV101_04 = segmentToken.subElt(1,cs,3)
        self.SV101_05 = segmentToken.subElt(1,cs,4)
        self.SV101_06 = segmentToken.subElt(1,cs,5)
        self.SV101_07 = segmentToken.subElt(1,cs,6)
        self.SV102 = segmentToken.elt(2)
        self.SV103 = segmentToken.elt(3)
        self.SV104 = segmentToken.elt(4)
        self.SV105 = segmentToken.elt(5)
        self.SV106 = segmentToken.elt(6)
        # composite= segmentToken[7].split(cs)
        self.SV107_01 = segmentToken.subElt(7,cs,0)
        self.SV107_02 = segmentToken.subElt(7,cs,1)
        self.SV107_03 = segmentToken.subElt(7,cs,2)
        self.SV107_04 = segmentToken.subElt(7,cs,3)
        self.SV108 = segmentToken.elt(8)
        self.SV109 = segmentToken.elt(9)
        self.SV110 = segmentToken.elt(10)
        self.SV111 = segmentToken.elt(11)
        self.SV112 = segmentToken.elt(12)
        self.SV113 = segmentToken.elt(13)
        self.SV114 = segmentToken.elt(14)
        self.SV115 = segmentToken.elt(15)
        self.SV116 = segmentToken.elt(16)
        self.SV117 = segmentToken.elt(17)
        self.SV118 = segmentToken.elt(18)
        self.SV119 = segmentToken.elt(19)
        self.SV120 = segmentToken.elt(20)
        self.SV121 = segmentToken.elt(21)

class Segment_SV5(models.Model):
    """Properties(syntax='',req_sit=u'S',repeat=u'1',pos=u'400',desc=u'Durable Medical Equipment Service')"""
    segment = models.ForeignKey( X12Segment )
    # <Composite u'C003', Properties(req_sit=u'R',refdes='',seq=u'01',desc=u'Composite Medical Procedure Identifier'), 
    SV501_01 = models.CharField( max_length=2 ) # (u'ID', u'2', u'2') u'Product/Service ID Qualifier'
    SV501_02 = models.CharField( max_length=48 ) # (u'AN', u'1', u'48') u'Product/Service ID'
    SV501_03 = models.CharField( max_length=2, null=True, blank=True ) # (u'AN', u'2', u'2') u'Procedure Modifier'
    SV501_04 = models.CharField( max_length=2, null=True, blank=True ) # (u'AN', u'2', u'2') u'Procedure Modifier'
    SV501_05 = models.CharField( max_length=2, null=True, blank=True ) # (u'AN', u'2', u'2') u'Procedure Modifier'
    SV501_06 = models.CharField( max_length=2, null=True, blank=True ) # (u'AN', u'2', u'2') u'Procedure Modifier'
    SV501_07 = models.CharField( max_length=80, null=True, blank=True ) # (u'AN', u'1', u'80') u'Description'
    SV502 = models.CharField( max_length=2 ) # (u'ID', u'2', u'2') u'Unit or Basis for Measurement Code'
    SV503 = models.CharField( max_length=15 ) # (u'R', u'1', u'15') u'Quantity'
    SV504 = models.CharField( max_length=18, null=True, blank=True ) # (u'R', u'1', u'18') u'Monetary Amount'
    SV505 = models.CharField( max_length=18, null=True, blank=True ) # (u'R', u'1', u'18') u'Monetary Amount'
    SV506 = models.CharField( max_length=1, null=True, blank=True ) # (u'ID', u'1', u'1') u'Frequency Code'
    SV507 = models.CharField( max_length=1, null=True, blank=True ) # (u'ID', u'1', u'1') u'Prognosis Code'
    def unmarshall( self, segmentToken, cs=':' ):
        # composite= segmentToken[1].split(cs)
        self.SV501_01 = segmentToken.subElt(1,cs,0)
        self.SV501_02 = segmentToken.subElt(1,cs,1)
        self.SV501_03 = segmentToken.subElt(1,cs,2)
        self.SV501_04 = segmentToken.subElt(1,cs,3)
        self.SV501_05 = segmentToken.subElt(1,cs,4)
        self.SV501_06 = segmentToken.subElt(1,cs,5)
        self.SV501_07 = segmentToken.subElt(1,cs,6)
        self.SV502 = segmentToken.elt(2)
        self.SV503 = segmentToken.elt(3)
        self.SV504 = segmentToken.elt(4)
        self.SV505 = segmentToken.elt(5)
        self.SV506 = segmentToken.elt(6)
        self.SV507 = segmentToken.elt(7)

class Segment_CR3(models.Model):
    """Properties(syntax=u'P0203',req_sit=u'S',repeat=u'1',pos=u'435',desc=u'Durable Medical Equipment Certification')"""
    segment = models.ForeignKey( X12Segment )
    CR301 = models.CharField( max_length=1 ) # (u'ID', u'1', u'1') u'Certification Type Code'
    CR302 = models.CharField( max_length=2 ) # (u'ID', u'2', u'2') u'Unit or Basis for Measurement Code'
    CR303 = models.CharField( max_length=15 ) # (u'R', u'1', u'15') u'Quantity'
    CR304 = models.CharField( max_length=1, null=True, blank=True ) # (u'ID', u'1', u'1') u'Insulin Dependent Code'
    CR305 = models.CharField( max_length=80, null=True, blank=True ) # (u'AN', u'1', u'80') u'Description'
    def unmarshall( self, segmentToken, cs=':' ):
        self.CR301 = segmentToken.elt(1)
        self.CR302 = segmentToken.elt(2)
        self.CR303 = segmentToken.elt(3)
        self.CR304 = segmentToken.elt(4)
        self.CR305 = segmentToken.elt(5)

class Segment_CR5(models.Model):
    """Properties(syntax='',req_sit=u'S',repeat=u'1',pos=u'445',desc=u'Home Oxygen Therapy Information')"""
    segment = models.ForeignKey( X12Segment )
    CR501 = models.CharField( max_length=1 ) # (u'ID', u'1', u'1') u'Certification Type Code'
    CR502 = models.CharField( max_length=15 ) # (u'R', u'1', u'15') u'Quantity'
    CR503 = models.CharField( max_length=1, null=True, blank=True ) # (u'ID', u'1', u'1') u'Oxygen Equipment Type Code'
    CR504 = models.CharField( max_length=1, null=True, blank=True ) # (u'ID', u'1', u'1') u'Oxygen Equipment Type Code'
    CR505 = models.CharField( max_length=80, null=True, blank=True ) # (u'AN', u'1', u'80') u'Description'
    CR506 = models.CharField( max_length=15, null=True, blank=True ) # (u'R', u'1', u'15') u'Quantity'
    CR507 = models.CharField( max_length=15, null=True, blank=True ) # (u'R', u'1', u'15') u'Quantity'
    CR508 = models.CharField( max_length=15, null=True, blank=True ) # (u'R', u'1', u'15') u'Quantity'
    CR509 = models.CharField( max_length=80, null=True, blank=True ) # (u'AN', u'1', u'80') u'Description'
    CR510 = models.CharField( max_length=15, null=True, blank=True ) # (u'R', u'1', u'15') u'Quantity'
    CR511 = models.CharField( max_length=15, null=True, blank=True ) # (u'R', u'1', u'15') u'Quantity'
    CR512 = models.CharField( max_length=1 ) # (u'ID', u'1', u'1') u'Oxygen Test Condition Code'
    CR513 = models.CharField( max_length=1, null=True, blank=True ) # (u'ID', u'1', u'1') u'Oxygen Test Findings Code'
    CR514 = models.CharField( max_length=1, null=True, blank=True ) # (u'ID', u'1', u'1') u'Oxygen Test Findings Code'
    CR515 = models.CharField( max_length=1, null=True, blank=True ) # (u'ID', u'1', u'1') u'Oxygen Test Findings Code'
    CR516 = models.CharField( max_length=15, null=True, blank=True ) # (u'R', u'1', u'15') u'Quantity'
    CR517 = models.CharField( max_length=1, null=True, blank=True ) # (u'ID', u'1', u'1') u'Oxygen Delivery System Code'
    CR518 = models.CharField( max_length=1, null=True, blank=True ) # (u'ID', u'1', u'1') u'Oxygen Equipment Type Code'
    def unmarshall( self, segmentToken, cs=':' ):
        self.CR501 = segmentToken.elt(1)
        self.CR502 = segmentToken.elt(2)
        self.CR503 = segmentToken.elt(3)
        self.CR504 = segmentToken.elt(4)
        self.CR505 = segmentToken.elt(5)
        self.CR506 = segmentToken.elt(6)
        self.CR507 = segmentToken.elt(7)
        self.CR508 = segmentToken.elt(8)
        self.CR509 = segmentToken.elt(9)
        self.CR510 = segmentToken.elt(10)
        self.CR511 = segmentToken.elt(11)
        self.CR512 = segmentToken.elt(12)
        self.CR513 = segmentToken.elt(13)
        self.CR514 = segmentToken.elt(14)
        self.CR515 = segmentToken.elt(15)
        self.CR516 = segmentToken.elt(16)
        self.CR517 = segmentToken.elt(17)
        self.CR518 = segmentToken.elt(18)

class Segment_MEA(models.Model):
    """Properties(syntax=u'R03050608 C0504 C0604 L07030506 E0803',req_sit=u'S',repeat=u'20',pos=u'462',desc=u'Test Result')"""
    segment = models.ForeignKey( X12Segment )
    MEA01 = models.CharField( max_length=2 ) # (u'ID', u'2', u'2') u'Measurement Reference ID Code'
    MEA02 = models.CharField( max_length=3 ) # (u'ID', u'1', u'3') u'Measurement Qualifier'
    MEA03 = models.CharField( max_length=20 ) # (u'R', u'1', u'20') u'Measurement Value'
    # <Composite u'C001', Properties(req_sit=u'N',refdes='',seq=u'04',desc=u'Composite Unit of Measure'), 
    MEA05 = models.CharField( max_length=20, null=True, blank=True ) # (u'R', u'1', u'20') u'Range Minimum'
    MEA06 = models.CharField( max_length=20, null=True, blank=True ) # (u'R', u'1', u'20') u'Range Maximum'
    MEA07 = models.CharField( max_length=2, null=True, blank=True ) # (u'ID', u'2', u'2') u'Measurement Significance Code'
    MEA08 = models.CharField( max_length=2, null=True, blank=True ) # (u'ID', u'2', u'2') u'Measurement Attribute Code'
    MEA09 = models.CharField( max_length=2, null=True, blank=True ) # (u'ID', u'2', u'2') u'Surface/Layer/Position Code'
    MEA10 = models.CharField( max_length=4, null=True, blank=True ) # (u'ID', u'2', u'4') u'Measurement Method or Device'
    def unmarshall( self, segmentToken, cs=':' ):
        self.MEA01 = segmentToken.elt(1)
        self.MEA02 = segmentToken.elt(2)
        self.MEA03 = segmentToken.elt(3)
        self.C001 = segmentToken.elt(4)
        self.MEA05 = segmentToken.elt(5)
        self.MEA06 = segmentToken.elt(6)
        self.MEA07 = segmentToken.elt(7)
        self.MEA08 = segmentToken.elt(8)
        self.MEA09 = segmentToken.elt(9)
        self.MEA10 = segmentToken.elt(10)

class Segment_PS1(models.Model):
    """Properties(syntax='',req_sit=u'S',repeat=u'1',pos=u'488',desc=u'Purchased Service Information')"""
    segment = models.ForeignKey( X12Segment )
    PS101 = models.CharField( max_length=30 ) # (u'AN', u'1', u'30') u'Reference Identification'
    PS102 = models.CharField( max_length=18 ) # (u'R', u'1', u'18') u'Monetary Amount'
    PS103 = models.CharField( max_length=2, null=True, blank=True ) # (u'ID', u'2', u'2') u'State or Province Code'
    def unmarshall( self, segmentToken, cs=':' ):
        self.PS101 = segmentToken.elt(1)
        self.PS102 = segmentToken.elt(2)
        self.PS103 = segmentToken.elt(3)

class Segment_LIN(models.Model):
    """Properties(syntax='',req_sit=u'R',repeat=u'1',pos=u'494',desc=u'Drug Identification')"""
    segment = models.ForeignKey( X12Segment )
    LIN01 = models.CharField( max_length=20, null=True, blank=True ) # (u'AN', u'1', u'20') u'Assigned Identification'
    LIN02 = models.CharField( max_length=2 ) # (u'ID', u'2', u'2') u'Product/Service ID Qualifier'
    LIN03 = models.CharField( max_length=48 ) # (u'AN', u'1', u'48') u'Product/Service ID'
    LIN04 = models.CharField( max_length=2, null=True, blank=True ) # (u'ID', u'2', u'2') u'Product/Service ID Qualifier'
    LIN05 = models.CharField( max_length=48, null=True, blank=True ) # (u'AN', u'1', u'48') u'Product/Service ID'
    LIN06 = models.CharField( max_length=2, null=True, blank=True ) # (u'ID', u'2', u'2') u'Product/Service ID Qualifier'
    LIN07 = models.CharField( max_length=48, null=True, blank=True ) # (u'AN', u'1', u'48') u'Product/Service ID'
    LIN08 = models.CharField( max_length=2, null=True, blank=True ) # (u'ID', u'2', u'2') u'Product/Service ID Qualifier'
    LIN09 = models.CharField( max_length=48, null=True, blank=True ) # (u'AN', u'1', u'48') u'Product/Service ID'
    LIN10 = models.CharField( max_length=2, null=True, blank=True ) # (u'ID', u'2', u'2') u'Product/Service ID Qualifier'
    LIN11 = models.CharField( max_length=48, null=True, blank=True ) # (u'AN', u'1', u'48') u'Product/Service ID'
    LIN12 = models.CharField( max_length=2, null=True, blank=True ) # (u'ID', u'2', u'2') u'Product/Service ID Qualifier'
    LIN13 = models.CharField( max_length=48, null=True, blank=True ) # (u'AN', u'1', u'48') u'Product/Service ID'
    LIN14 = models.CharField( max_length=2, null=True, blank=True ) # (u'ID', u'2', u'2') u'Product/Service ID Qualifier'
    LIN15 = models.CharField( max_length=48, null=True, blank=True ) # (u'AN', u'1', u'48') u'Product/Service ID'
    LIN16 = models.CharField( max_length=2, null=True, blank=True ) # (u'ID', u'2', u'2') u'Product/Service ID Qualifier'
    LIN17 = models.CharField( max_length=48, null=True, blank=True ) # (u'AN', u'1', u'48') u'Product/Service ID'
    LIN18 = models.CharField( max_length=2, null=True, blank=True ) # (u'ID', u'2', u'2') u'Product/Service ID Qualifier'
    LIN19 = models.CharField( max_length=48, null=True, blank=True ) # (u'AN', u'1', u'48') u'Product/Service ID'
    LIN20 = models.CharField( max_length=2, null=True, blank=True ) # (u'ID', u'2', u'2') u'Product/Service ID Qualifier'
    LIN21 = models.CharField( max_length=48, null=True, blank=True ) # (u'AN', u'1', u'48') u'Product/Service ID'
    LIN22 = models.CharField( max_length=2, null=True, blank=True ) # (u'ID', u'2', u'2') u'Product/Service ID Qualifier'
    LIN23 = models.CharField( max_length=48, null=True, blank=True ) # (u'AN', u'1', u'48') u'Product/Service ID'
    LIN24 = models.CharField( max_length=2, null=True, blank=True ) # (u'ID', u'2', u'2') u'Product/Service ID Qualifier'
    LIN25 = models.CharField( max_length=48, null=True, blank=True ) # (u'AN', u'1', u'48') u'Product/Service ID'
    LIN26 = models.CharField( max_length=2, null=True, blank=True ) # (u'ID', u'2', u'2') u'Product/Service ID Qualifier'
    LIN27 = models.CharField( max_length=48, null=True, blank=True ) # (u'AN', u'1', u'48') u'Product/Service ID'
    LIN28 = models.CharField( max_length=2, null=True, blank=True ) # (u'ID', u'2', u'2') u'Product/Service ID Qualifier'
    LIN29 = models.CharField( max_length=48, null=True, blank=True ) # (u'AN', u'1', u'48') u'Product/Service ID'
    LIN30 = models.CharField( max_length=2, null=True, blank=True ) # (u'ID', u'2', u'2') u'Product/Service ID Qualifier'
    LIN31 = models.CharField( max_length=48, null=True, blank=True ) # (u'AN', u'1', u'48') u'Product/Service ID'
    def unmarshall( self, segmentToken, cs=':' ):
        self.LIN01 = segmentToken.elt(1)
        self.LIN02 = segmentToken.elt(2)
        self.LIN03 = segmentToken.elt(3)
        self.LIN04 = segmentToken.elt(4)
        self.LIN05 = segmentToken.elt(5)
        self.LIN06 = segmentToken.elt(6)
        self.LIN07 = segmentToken.elt(7)
        self.LIN08 = segmentToken.elt(8)
        self.LIN09 = segmentToken.elt(9)
        self.LIN10 = segmentToken.elt(10)
        self.LIN11 = segmentToken.elt(11)
        self.LIN12 = segmentToken.elt(12)
        self.LIN13 = segmentToken.elt(13)
        self.LIN14 = segmentToken.elt(14)
        self.LIN15 = segmentToken.elt(15)
        self.LIN16 = segmentToken.elt(16)
        self.LIN17 = segmentToken.elt(17)
        self.LIN18 = segmentToken.elt(18)
        self.LIN19 = segmentToken.elt(19)
        self.LIN20 = segmentToken.elt(20)
        self.LIN21 = segmentToken.elt(21)
        self.LIN22 = segmentToken.elt(22)
        self.LIN23 = segmentToken.elt(23)
        self.LIN24 = segmentToken.elt(24)
        self.LIN25 = segmentToken.elt(25)
        self.LIN26 = segmentToken.elt(26)
        self.LIN27 = segmentToken.elt(27)
        self.LIN28 = segmentToken.elt(28)
        self.LIN29 = segmentToken.elt(29)
        self.LIN30 = segmentToken.elt(30)
        self.LIN31 = segmentToken.elt(31)

class Segment_CTP(models.Model):
    """Properties(syntax='',req_sit=u'S',repeat=u'1',pos=u'495',desc=u'Drug Pricing')"""
    segment = models.ForeignKey( X12Segment )
    CTP01 = models.CharField( max_length=2, null=True, blank=True ) # (u'ID', u'2', u'2') u'Class of Trade Code'
    CTP02 = models.CharField( max_length=3, null=True, blank=True ) # (u'ID', u'3', u'3') u'Price Identifier Code'
    CTP03 = models.CharField( max_length=17 ) # (u'R', u'1', u'17') u'Unit Price'
    CTP04 = models.CharField( max_length=15 ) # (u'R', u'1', u'15') u'Quantity'
    # <Composite u'C001', Properties(req_sit=u'R',refdes='',seq=u'05',desc=u'Unit or Basis of Measurement'), 
    CTP05_01 = models.CharField( max_length=2 ) # (u'ID', u'2', u'2') u'Unit or Basis for Measurement Code'
    CTP05_02 = models.CharField( max_length=15, null=True, blank=True ) # (u'R', u'1', u'15') u'Exponent'
    CTP05_03 = models.CharField( max_length=10, null=True, blank=True ) # (u'R', u'1', u'10') u'Multiplier'
    CTP05_04 = models.CharField( max_length=2, null=True, blank=True ) # (u'ID', u'2', u'2') u'Unit or Basis for Measurement Code'
    CTP05_05 = models.CharField( max_length=15, null=True, blank=True ) # (u'R', u'1', u'15') u'Exponent'
    CTP05_06 = models.CharField( max_length=10, null=True, blank=True ) # (u'R', u'1', u'10') u'Multiplier'
    CTP05_07 = models.CharField( max_length=2, null=True, blank=True ) # (u'ID', u'2', u'2') u'Unit or Basis for Measurement Code'
    CTP05_08 = models.CharField( max_length=15, null=True, blank=True ) # (u'R', u'1', u'15') u'Exponent'
    CTP05_09 = models.CharField( max_length=10, null=True, blank=True ) # (u'R', u'1', u'10') u'Multiplier'
    CTP05_10 = models.CharField( max_length=2, null=True, blank=True ) # (u'ID', u'2', u'2') u'Unit or Basis for Measurement Code'
    CTP05_11 = models.CharField( max_length=15, null=True, blank=True ) # (u'R', u'1', u'15') u'Exponent'
    CTP05_12 = models.CharField( max_length=10, null=True, blank=True ) # (u'R', u'1', u'10') u'Multiplier'
    CTP05_13 = models.CharField( max_length=2, null=True, blank=True ) # (u'ID', u'2', u'2') u'Unit or Basis for Measurement Code'
    CTP05_14 = models.CharField( max_length=15, null=True, blank=True ) # (u'R', u'1', u'15') u'Exponent'
    CTP05_15 = models.CharField( max_length=10, null=True, blank=True ) # (u'R', u'1', u'10') u'Multiplier'
    CTP06 = models.CharField( max_length=3, null=True, blank=True ) # (u'ID', u'3', u'3') u'Price Multiplier Qualifier'
    CTP07 = models.CharField( max_length=10, null=True, blank=True ) # (u'R', u'1', u'10') u'Multiplier'
    CTP08 = models.CharField( max_length=18, null=True, blank=True ) # (u'R', u'1', u'18') u'Monetary Amount'
    CTP09 = models.CharField( max_length=2, null=True, blank=True ) # (u'ID', u'2', u'2') u'Basis of Unit Price Code'
    CTP10 = models.CharField( max_length=10, null=True, blank=True ) # (u'AN', u'1', u'10') u'Condition Value'
    CTP11 = models.CharField( max_length=2, null=True, blank=True ) # (u'N0', u'1', u'2') u'Multiple Price Quantity'
    def unmarshall( self, segmentToken, cs=':' ):
        self.CTP01 = segmentToken.elt(1)
        self.CTP02 = segmentToken.elt(2)
        self.CTP03 = segmentToken.elt(3)
        self.CTP04 = segmentToken.elt(4)
        # composite= segmentToken[5].split(cs)
        self.CTP05_01 = segmentToken.subElt(5,cs,0)
        self.CTP05_02 = segmentToken.subElt(5,cs,1)
        self.CTP05_03 = segmentToken.subElt(5,cs,2)
        self.CTP05_04 = segmentToken.subElt(5,cs,3)
        self.CTP05_05 = segmentToken.subElt(5,cs,4)
        self.CTP05_06 = segmentToken.subElt(5,cs,5)
        self.CTP05_07 = segmentToken.subElt(5,cs,6)
        self.CTP05_08 = segmentToken.subElt(5,cs,7)
        self.CTP05_09 = segmentToken.subElt(5,cs,8)
        self.CTP05_10 = segmentToken.subElt(5,cs,9)
        self.CTP05_11 = segmentToken.subElt(5,cs,10)
        self.CTP05_12 = segmentToken.subElt(5,cs,11)
        self.CTP05_13 = segmentToken.subElt(5,cs,12)
        self.CTP05_14 = segmentToken.subElt(5,cs,13)
        self.CTP05_15 = segmentToken.subElt(5,cs,14)
        self.CTP06 = segmentToken.elt(6)
        self.CTP07 = segmentToken.elt(7)
        self.CTP08 = segmentToken.elt(8)
        self.CTP09 = segmentToken.elt(9)
        self.CTP10 = segmentToken.elt(10)
        self.CTP11 = segmentToken.elt(11)

class Segment_SVD(models.Model):
    """Properties(syntax='',req_sit=u'R',repeat=u'1',pos=u'540',desc=u'Line Adjudication Information')"""
    segment = models.ForeignKey( X12Segment )
    SVD01 = models.CharField( max_length=80 ) # (u'AN', u'2', u'80') u'Identification Code'
    SVD02 = models.CharField( max_length=18 ) # (u'R', u'1', u'18') u'Monetary Amount'
    # <Composite u'C003', Properties(req_sit=u'R',refdes='',seq=u'03',desc=u'Procedure Identifier'), 
    SVD03_01 = models.CharField( max_length=2 ) # (u'ID', u'2', u'2') u'Product/Service ID Qualifier'
    SVD03_02 = models.CharField( max_length=48 ) # (u'AN', u'1', u'48') u'Product/Service ID'
    SVD03_03 = models.CharField( max_length=2, null=True, blank=True ) # (u'AN', u'2', u'2') u'Procedure Modifier'
    SVD03_04 = models.CharField( max_length=2, null=True, blank=True ) # (u'AN', u'2', u'2') u'Procedure Modifier'
    SVD03_05 = models.CharField( max_length=2, null=True, blank=True ) # (u'AN', u'2', u'2') u'Procedure Modifier'
    SVD03_06 = models.CharField( max_length=2, null=True, blank=True ) # (u'AN', u'2', u'2') u'Procedure Modifier'
    SVD03_07 = models.CharField( max_length=80, null=True, blank=True ) # (u'AN', u'1', u'80') u'Description'
    SVD04 = models.CharField( max_length=48, null=True, blank=True ) # (u'AN', u'1', u'48') u'Product/Service ID'
    SVD05 = models.CharField( max_length=15 ) # (u'R', u'1', u'15') u'Quantity'
    SVD06 = models.CharField( max_length=6, null=True, blank=True ) # (u'N0', u'1', u'6') u'Assigned Number'
    def unmarshall( self, segmentToken, cs=':' ):
        self.SVD01 = segmentToken.elt(1)
        self.SVD02 = segmentToken.elt(2)
        # composite= segmentToken[3].split(cs)
        self.SVD03_01 = segmentToken.subElt(3,cs,0)
        self.SVD03_02 = segmentToken.subElt(3,cs,1)
        self.SVD03_03 = segmentToken.subElt(3,cs,2)
        self.SVD03_04 = segmentToken.subElt(3,cs,3)
        self.SVD03_05 = segmentToken.subElt(3,cs,4)
        self.SVD03_06 = segmentToken.subElt(3,cs,5)
        self.SVD03_07 = segmentToken.subElt(3,cs,6)
        self.SVD04 = segmentToken.elt(4)
        self.SVD05 = segmentToken.elt(5)
        self.SVD06 = segmentToken.elt(6)

class Segment_LQ(models.Model):
    """Properties(syntax=u'C0102',req_sit=u'R',repeat=u'1',pos=u'551',desc=u'Form Identification Code')"""
    segment = models.ForeignKey( X12Segment )
    LQ01 = models.CharField( max_length=3 ) # (u'ID', u'1', u'3') u'Code List Qualifier Code'
    LQ02 = models.CharField( max_length=30 ) # (u'AN', u'1', u'30') u'Industry Code'
    def unmarshall( self, segmentToken, cs=':' ):
        self.LQ01 = segmentToken.elt(1)
        self.LQ02 = segmentToken.elt(2)

class Segment_FRM(models.Model):
    """Properties(syntax=u'R02030405',req_sit=u'R',repeat=u'99',pos=u'552',desc=u'Supporting Documentation')"""
    segment = models.ForeignKey( X12Segment )
    FRM01 = models.CharField( max_length=20 ) # (u'AN', u'1', u'20') u'Assigned Identification'
    FRM02 = models.CharField( max_length=1, null=True, blank=True ) # (u'ID', u'1', u'1') u'Yes/No Condition or Response Code'
    FRM03 = models.CharField( max_length=30, null=True, blank=True ) # (u'AN', u'1', u'30') u'Reference Identification'
    FRM04 = models.CharField( max_length=8, null=True, blank=True ) # (u'DT', u'8', u'8') u'Date'
    FRM05 = models.CharField( max_length=6, null=True, blank=True ) # (u'R', u'1', u'6') u'Percent'
    def unmarshall( self, segmentToken, cs=':' ):
        self.FRM01 = segmentToken.elt(1)
        self.FRM02 = segmentToken.elt(2)
        self.FRM03 = segmentToken.elt(3)
        self.FRM04 = segmentToken.elt(4)
        self.FRM05 = segmentToken.elt(5)

class Segment_SE(models.Model):
    """Properties(syntax='',req_sit=u'R',repeat=u'1',pos=u'555',desc=u'Transaction Set Trailer')"""
    segment = models.ForeignKey( X12Segment )
    SE01 = models.CharField( max_length=10 ) # (u'N0', u'1', u'10') u'Number of Included Segments'
    SE02 = models.CharField( max_length=9 ) # (u'AN', u'4', u'9') u'Transaction Set Control Number'
    def unmarshall( self, segmentToken, cs=':' ):
        self.SE01 = segmentToken.elt(1)
        self.SE02 = segmentToken.elt(2)

class Segment_GE(models.Model):
    """Properties(syntax='',req_sit=u'R',repeat=u'1',pos=u'030',desc=u'Functional Group Trailer')"""
    segment = models.ForeignKey( X12Segment )
    GE01 = models.CharField( max_length=6 ) # (u'N0', u'1', u'6') u'97'
    GE02 = models.CharField( max_length=9 ) # (u'N0', u'1', u'9') u'Group Control Number'
    def unmarshall( self, segmentToken, cs=':' ):
        self.GE01 = segmentToken.elt(1)
        self.GE02 = segmentToken.elt(2)

class Segment_TA1(models.Model):
    """Properties(syntax='',req_sit=u'S',repeat=u'1',pos=u'020',desc=u'Interchange Acknowledgement')"""
    segment = models.ForeignKey( X12Segment )
    TA101 = models.CharField( max_length=9 ) # (u'N0', u'9', u'9') u'I12'
    TA102 = models.CharField( max_length=6 ) # (u'DT', u'6', u'6') u'I08'
    TA103 = models.CharField( max_length=4 ) # (u'TM', u'4', u'4') u'I09'
    TA104 = models.CharField( max_length=1 ) # (u'ID', u'1', u'1') u'I17'
    TA105 = models.CharField( max_length=3 ) # (u'ID', u'3', u'3') u'I18'
    def unmarshall( self, segmentToken, cs=':' ):
        self.TA101 = segmentToken.elt(1)
        self.TA102 = segmentToken.elt(2)
        self.TA103 = segmentToken.elt(3)
        self.TA104 = segmentToken.elt(4)
        self.TA105 = segmentToken.elt(5)

class Segment_IEA(models.Model):
    """Properties(syntax='',req_sit=u'R',repeat=u'1',pos=u'030',desc=u'Interchange Control Trailer')"""
    segment = models.ForeignKey( X12Segment )
    IEA01 = models.CharField( max_length=5 ) # (u'N0', u'1', u'5') u'I16'
    IEA02 = models.CharField( max_length=9 ) # (u'N0', u'9', u'9') u'I12'
    def unmarshall( self, segmentToken, cs=':' ):
        self.IEA01 = segmentToken.elt(1)
        self.IEA02 = segmentToken.elt(2)

class Segment_CL1(models.Model):
    """Properties(syntax='',req_sit=u'S',repeat=u'1',pos=u'140',desc=u'Institutional Claim Code')"""
    segment = models.ForeignKey( X12Segment )
    CL101 = models.CharField( max_length=1, null=True, blank=True ) # (u'ID', u'1', u'1') u'Admission Type Code'
    CL102 = models.CharField( max_length=1, null=True, blank=True ) # (u'ID', u'1', u'1') u'Admission Source Code'
    CL103 = models.CharField( max_length=2, null=True, blank=True ) # (u'ID', u'1', u'2') u'Patient Status Code'
    CL104 = models.CharField( max_length=1, null=True, blank=True ) # (u'ID', u'1', u'1') u'Nursing Home Residential Status Code'
    def unmarshall( self, segmentToken, cs=':' ):
        self.CL101 = segmentToken.elt(1)
        self.CL102 = segmentToken.elt(2)
        self.CL103 = segmentToken.elt(3)
        self.CL104 = segmentToken.elt(4)

class Segment_CR6(models.Model):
    """Properties(syntax='',req_sit=u'S',repeat=u'1',pos=u'216',desc=u'Home Health Care Information')"""
    segment = models.ForeignKey( X12Segment )
    CR601 = models.CharField( max_length=1 ) # (u'ID', u'1', u'1') u'Prognosis Code'
    CR602 = models.CharField( max_length=8 ) # (u'DT', u'8', u'8') u'Date'
    CR603 = models.CharField( max_length=3, null=True, blank=True ) # (u'ID', u'2', u'3') u'Date Time Period Format Qualifier'
    CR604 = models.CharField( max_length=35, null=True, blank=True ) # (u'AN', u'1', u'35') u'Date Time Period'
    CR605 = models.CharField( max_length=8 ) # (u'DT', u'8', u'8') u'Date'
    CR606 = models.CharField( max_length=1 ) # (u'ID', u'1', u'1') u'Yes/No Condition or Response Code'
    CR607 = models.CharField( max_length=1 ) # (u'ID', u'1', u'1') u'Yes/No Condition or Response Code'
    CR608 = models.CharField( max_length=1 ) # (u'ID', u'1', u'1') u'Certification Type Code'
    CR609 = models.CharField( max_length=8, null=True, blank=True ) # (u'DT', u'8', u'8') u'Date'
    CR610 = models.CharField( max_length=2, null=True, blank=True ) # (u'ID', u'2', u'2') u'Product/Service ID Qualifier'
    CR611 = models.CharField( max_length=15, null=True, blank=True ) # (u'AN', u'1', u'15') u'Medical Code Value'
    CR612 = models.CharField( max_length=8, null=True, blank=True ) # (u'DT', u'8', u'8') u'Date'
    CR613 = models.CharField( max_length=8, null=True, blank=True ) # (u'DT', u'8', u'8') u'Date'
    CR614 = models.CharField( max_length=8, null=True, blank=True ) # (u'DT', u'8', u'8') u'Date'
    CR615 = models.CharField( max_length=3, null=True, blank=True ) # (u'ID', u'2', u'3') u'Date Time Period Format Qualifier'
    CR616 = models.CharField( max_length=35, null=True, blank=True ) # (u'AN', u'1', u'35') u'Date Time Period'
    CR617 = models.CharField( max_length=1 ) # (u'ID', u'1', u'1') u'Patient Location Code'
    CR618 = models.CharField( max_length=8, null=True, blank=True ) # (u'DT', u'8', u'8') u'Date'
    CR619 = models.CharField( max_length=8, null=True, blank=True ) # (u'DT', u'8', u'8') u'Date'
    CR620 = models.CharField( max_length=8, null=True, blank=True ) # (u'DT', u'8', u'8') u'Date'
    CR621 = models.CharField( max_length=8, null=True, blank=True ) # (u'DT', u'8', u'8') u'Date'
    def unmarshall( self, segmentToken, cs=':' ):
        self.CR601 = segmentToken.elt(1)
        self.CR602 = segmentToken.elt(2)
        self.CR603 = segmentToken.elt(3)
        self.CR604 = segmentToken.elt(4)
        self.CR605 = segmentToken.elt(5)
        self.CR606 = segmentToken.elt(6)
        self.CR607 = segmentToken.elt(7)
        self.CR608 = segmentToken.elt(8)
        self.CR609 = segmentToken.elt(9)
        self.CR610 = segmentToken.elt(10)
        self.CR611 = segmentToken.elt(11)
        self.CR612 = segmentToken.elt(12)
        self.CR613 = segmentToken.elt(13)
        self.CR614 = segmentToken.elt(14)
        self.CR615 = segmentToken.elt(15)
        self.CR616 = segmentToken.elt(16)
        self.CR617 = segmentToken.elt(17)
        self.CR618 = segmentToken.elt(18)
        self.CR619 = segmentToken.elt(19)
        self.CR620 = segmentToken.elt(20)
        self.CR621 = segmentToken.elt(21)

class Segment_QTY(models.Model):
    """Properties(syntax='',req_sit=u'S',repeat=u'4',pos=u'240',desc=u'Claim Quantity')"""
    segment = models.ForeignKey( X12Segment )
    QTY01 = models.CharField( max_length=2 ) # (u'ID', u'2', u'2') u'Quantity Qualifier'
    QTY02 = models.CharField( max_length=15 ) # (u'R', u'1', u'15') u'Quantity'
    # <Composite u'C001', Properties(req_sit=u'R',refdes='',seq=u'03',desc=u'Composite Unit of Measure'), 
    QTY03_01 = models.CharField( max_length=2 ) # (u'ID', u'2', u'2') u'Unit or Basis for Measurement Code'
    QTY03_02 = models.CharField( max_length=15, null=True, blank=True ) # (u'R', u'1', u'15') u'Exponent'
    QTY03_03 = models.CharField( max_length=10, null=True, blank=True ) # (u'R', u'1', u'10') u'Multiplier'
    QTY03_04 = models.CharField( max_length=2, null=True, blank=True ) # (u'ID', u'2', u'2') u'Unit or Basis for Measurement Code'
    QTY03_05 = models.CharField( max_length=15, null=True, blank=True ) # (u'R', u'1', u'15') u'Exponent'
    QTY03_06 = models.CharField( max_length=10, null=True, blank=True ) # (u'R', u'1', u'10') u'Multiplier'
    QTY03_07 = models.CharField( max_length=2, null=True, blank=True ) # (u'ID', u'2', u'2') u'Unit or Basis for Measurement Code'
    QTY03_08 = models.CharField( max_length=15, null=True, blank=True ) # (u'R', u'1', u'15') u'Exponent'
    QTY03_09 = models.CharField( max_length=10, null=True, blank=True ) # (u'R', u'1', u'10') u'Multiplier'
    QTY03_10 = models.CharField( max_length=2, null=True, blank=True ) # (u'ID', u'2', u'2') u'Unit or Basis for Measurement Code'
    QTY03_11 = models.CharField( max_length=15, null=True, blank=True ) # (u'R', u'1', u'15') u'Exponent'
    QTY03_12 = models.CharField( max_length=10, null=True, blank=True ) # (u'R', u'1', u'10') u'Multiplier'
    QTY03_13 = models.CharField( max_length=2, null=True, blank=True ) # (u'ID', u'2', u'2') u'Unit or Basis for Measurement Code'
    QTY03_14 = models.CharField( max_length=15, null=True, blank=True ) # (u'R', u'1', u'15') u'Exponent'
    QTY03_15 = models.CharField( max_length=10, null=True, blank=True ) # (u'R', u'1', u'10') u'Multiplier'
    QTY04 = models.CharField( max_length=30, null=True, blank=True ) # (u'AN', u'1', u'30') u'Free-Form Message'
    def unmarshall( self, segmentToken, cs=':' ):
        self.QTY01 = segmentToken.elt(1)
        self.QTY02 = segmentToken.elt(2)
        # composite= segmentToken[3].split(cs)
        self.QTY03_01 = segmentToken.subElt(3,cs,0)
        self.QTY03_02 = segmentToken.subElt(3,cs,1)
        self.QTY03_03 = segmentToken.subElt(3,cs,2)
        self.QTY03_04 = segmentToken.subElt(3,cs,3)
        self.QTY03_05 = segmentToken.subElt(3,cs,4)
        self.QTY03_06 = segmentToken.subElt(3,cs,5)
        self.QTY03_07 = segmentToken.subElt(3,cs,6)
        self.QTY03_08 = segmentToken.subElt(3,cs,7)
        self.QTY03_09 = segmentToken.subElt(3,cs,8)
        self.QTY03_10 = segmentToken.subElt(3,cs,9)
        self.QTY03_11 = segmentToken.subElt(3,cs,10)
        self.QTY03_12 = segmentToken.subElt(3,cs,11)
        self.QTY03_13 = segmentToken.subElt(3,cs,12)
        self.QTY03_14 = segmentToken.subElt(3,cs,13)
        self.QTY03_15 = segmentToken.subElt(3,cs,14)
        self.QTY04 = segmentToken.elt(4)

class Segment_MIA(models.Model):
    """Properties(syntax='',req_sit=u'S',repeat=u'1',pos=u'315',desc=u'Medicare Inpatient Adjudication Information')"""
    segment = models.ForeignKey( X12Segment )
    MIA01 = models.CharField( max_length=15 ) # (u'R', u'1', u'15') u'Quantity'
    MIA02 = models.CharField( max_length=15, null=True, blank=True ) # (u'R', u'1', u'15') u'Quantity'
    MIA03 = models.CharField( max_length=15, null=True, blank=True ) # (u'R', u'1', u'15') u'Quantity'
    MIA04 = models.CharField( max_length=18, null=True, blank=True ) # (u'R', u'1', u'18') u'Monetary Amount'
    MIA05 = models.CharField( max_length=30, null=True, blank=True ) # (u'AN', u'1', u'30') u'Reference Identification'
    MIA06 = models.CharField( max_length=18, null=True, blank=True ) # (u'R', u'1', u'18') u'Monetary Amount'
    MIA07 = models.CharField( max_length=18, null=True, blank=True ) # (u'R', u'1', u'18') u'Monetary Amount'
    MIA08 = models.CharField( max_length=18, null=True, blank=True ) # (u'R', u'1', u'18') u'Monetary Amount'
    MIA09 = models.CharField( max_length=18, null=True, blank=True ) # (u'R', u'1', u'18') u'Monetary Amount'
    MIA10 = models.CharField( max_length=18, null=True, blank=True ) # (u'R', u'1', u'18') u'Monetary Amount'
    MIA11 = models.CharField( max_length=18, null=True, blank=True ) # (u'R', u'1', u'18') u'Monetary Amount'
    MIA12 = models.CharField( max_length=18, null=True, blank=True ) # (u'R', u'1', u'18') u'Monetary Amount'
    MIA13 = models.CharField( max_length=18, null=True, blank=True ) # (u'R', u'1', u'18') u'Monetary Amount'
    MIA14 = models.CharField( max_length=18, null=True, blank=True ) # (u'R', u'1', u'18') u'Monetary Amount'
    MIA15 = models.CharField( max_length=15, null=True, blank=True ) # (u'R', u'1', u'15') u'Quantity'
    MIA16 = models.CharField( max_length=18, null=True, blank=True ) # (u'R', u'1', u'18') u'Monetary Amount'
    MIA17 = models.CharField( max_length=18, null=True, blank=True ) # (u'R', u'1', u'18') u'Monetary Amount'
    MIA18 = models.CharField( max_length=18, null=True, blank=True ) # (u'R', u'1', u'18') u'Monetary Amount'
    MIA19 = models.CharField( max_length=18, null=True, blank=True ) # (u'R', u'1', u'18') u'Monetary Amount'
    MIA20 = models.CharField( max_length=30, null=True, blank=True ) # (u'AN', u'1', u'30') u'Reference Identification'
    MIA21 = models.CharField( max_length=30, null=True, blank=True ) # (u'AN', u'1', u'30') u'Reference Identification'
    MIA22 = models.CharField( max_length=30, null=True, blank=True ) # (u'AN', u'1', u'30') u'Reference Identification'
    MIA23 = models.CharField( max_length=30, null=True, blank=True ) # (u'AN', u'1', u'30') u'Reference Identification'
    MIA24 = models.CharField( max_length=18, null=True, blank=True ) # (u'R', u'1', u'18') u'Monetary Amount'
    def unmarshall( self, segmentToken, cs=':' ):
        self.MIA01 = segmentToken.elt(1)
        self.MIA02 = segmentToken.elt(2)
        self.MIA03 = segmentToken.elt(3)
        self.MIA04 = segmentToken.elt(4)
        self.MIA05 = segmentToken.elt(5)
        self.MIA06 = segmentToken.elt(6)
        self.MIA07 = segmentToken.elt(7)
        self.MIA08 = segmentToken.elt(8)
        self.MIA09 = segmentToken.elt(9)
        self.MIA10 = segmentToken.elt(10)
        self.MIA11 = segmentToken.elt(11)
        self.MIA12 = segmentToken.elt(12)
        self.MIA13 = segmentToken.elt(13)
        self.MIA14 = segmentToken.elt(14)
        self.MIA15 = segmentToken.elt(15)
        self.MIA16 = segmentToken.elt(16)
        self.MIA17 = segmentToken.elt(17)
        self.MIA18 = segmentToken.elt(18)
        self.MIA19 = segmentToken.elt(19)
        self.MIA20 = segmentToken.elt(20)
        self.MIA21 = segmentToken.elt(21)
        self.MIA22 = segmentToken.elt(22)
        self.MIA23 = segmentToken.elt(23)
        self.MIA24 = segmentToken.elt(24)

class Segment_SV2(models.Model):
    """Properties(syntax='',req_sit=u'R',repeat=u'1',pos=u'375',desc=u'Institutional Service Line')"""
    segment = models.ForeignKey( X12Segment )
    SV201 = models.CharField( max_length=48 ) # (u'AN', u'1', u'48') u'Product/Service ID'
    # <Composite u'C003', Properties(req_sit=u'S',refdes='',seq=u'02',desc=u'Service Line Procedure Code'), 
    SV202_01 = models.CharField( max_length=2 ) # (u'ID', u'2', u'2') u'Product/Service ID Qualifier'
    SV202_02 = models.CharField( max_length=48 ) # (u'AN', u'1', u'48') u'Product/Service ID'
    SV202_03 = models.CharField( max_length=2, null=True, blank=True ) # (u'AN', u'2', u'2') u'Procedure Modifier'
    SV202_04 = models.CharField( max_length=2, null=True, blank=True ) # (u'AN', u'2', u'2') u'Procedure Modifier'
    SV202_05 = models.CharField( max_length=2, null=True, blank=True ) # (u'AN', u'2', u'2') u'Procedure Modifier'
    SV202_06 = models.CharField( max_length=2, null=True, blank=True ) # (u'AN', u'2', u'2') u'Procedure Modifier'
    SV202_07 = models.CharField( max_length=80, null=True, blank=True ) # (u'AN', u'1', u'80') u'Description'
    SV203 = models.CharField( max_length=18 ) # (u'R', u'1', u'18') u'Monetary Amount'
    SV204 = models.CharField( max_length=2 ) # (u'ID', u'2', u'2') u'Unit or Basis for Measurement Code'
    SV205 = models.CharField( max_length=15 ) # (u'R', u'1', u'15') u'Quantity'
    SV206 = models.CharField( max_length=10, null=True, blank=True ) # (u'R', u'1', u'10') u'Unit Rate'
    SV207 = models.CharField( max_length=18, null=True, blank=True ) # (u'R', u'1', u'18') u'Monetary Amount'
    SV208 = models.CharField( max_length=1, null=True, blank=True ) # (u'ID', u'1', u'1') u'Yes/No Condition or Response Code'
    SV209 = models.CharField( max_length=1, null=True, blank=True ) # (u'ID', u'1', u'1') u'Nursing Home Residential Status Code'
    SV210 = models.CharField( max_length=1, null=True, blank=True ) # (u'ID', u'1', u'1') u'Level of Care Code'
    def unmarshall( self, segmentToken, cs=':' ):
        self.SV201 = segmentToken.elt(1)
        # composite= segmentToken[2].split(cs)
        self.SV202_01 = segmentToken.subElt(2,cs,0)
        self.SV202_02 = segmentToken.subElt(2,cs,1)
        self.SV202_03 = segmentToken.subElt(2,cs,2)
        self.SV202_04 = segmentToken.subElt(2,cs,3)
        self.SV202_05 = segmentToken.subElt(2,cs,4)
        self.SV202_06 = segmentToken.subElt(2,cs,5)
        self.SV202_07 = segmentToken.subElt(2,cs,6)
        self.SV203 = segmentToken.elt(3)
        self.SV204 = segmentToken.elt(4)
        self.SV205 = segmentToken.elt(5)
        self.SV206 = segmentToken.elt(6)
        self.SV207 = segmentToken.elt(7)
        self.SV208 = segmentToken.elt(8)
        self.SV209 = segmentToken.elt(9)
        self.SV210 = segmentToken.elt(10)

class Segment_DN1(models.Model):
    """Properties(syntax='',req_sit=u'S',repeat=u'1',pos=u'145',desc=u'Orthodontic Total Months of Treatment')"""
    segment = models.ForeignKey( X12Segment )
    DN101 = models.CharField( max_length=15, null=True, blank=True ) # (u'R', u'1', u'15') u'Quantity'
    DN102 = models.CharField( max_length=15, null=True, blank=True ) # (u'R', u'1', u'15') u'Quantity'
    DN103 = models.CharField( max_length=1, null=True, blank=True ) # (u'ID', u'1', u'1') u'Yes/No Condition or Response Code'
    DN104 = models.CharField( max_length=80, null=True, blank=True ) # (u'AN', u'1', u'80') u'Description'
    def unmarshall( self, segmentToken, cs=':' ):
        self.DN101 = segmentToken.elt(1)
        self.DN102 = segmentToken.elt(2)
        self.DN103 = segmentToken.elt(3)
        self.DN104 = segmentToken.elt(4)

class Segment_DN2(models.Model):
    """Properties(syntax='',req_sit=u'S',repeat=u'35',pos=u'150',desc=u'Tooth Status')"""
    segment = models.ForeignKey( X12Segment )
    DN201 = models.CharField( max_length=30 ) # (u'AN', u'1', u'30') u'Reference Identification'
    DN202 = models.CharField( max_length=2 ) # (u'ID', u'1', u'2') u'Tooth Status Code'
    DN203 = models.CharField( max_length=15, null=True, blank=True ) # (u'R', u'1', u'15') u'Quantity'
    DN204 = models.CharField( max_length=3, null=True, blank=True ) # (u'ID', u'2', u'3') u'Date Time Period Format Qualifier'
    DN205 = models.CharField( max_length=35, null=True, blank=True ) # (u'AN', u'1', u'35') u'Date Time Period'
    def unmarshall( self, segmentToken, cs=':' ):
        self.DN201 = segmentToken.elt(1)
        self.DN202 = segmentToken.elt(2)
        self.DN203 = segmentToken.elt(3)
        self.DN204 = segmentToken.elt(4)
        self.DN205 = segmentToken.elt(5)

class Segment_SV3(models.Model):
    """Properties(syntax='',req_sit=u'R',repeat=u'1',pos=u'380',desc=u'Dental Service')"""
    segment = models.ForeignKey( X12Segment )
    # <Composite u'C003', Properties(req_sit=u'R',refdes='',seq=u'01',desc=u'Composite Medical Procedure Identifier'), 
    SV301_01 = models.CharField( max_length=2 ) # (u'ID', u'2', u'2') u'Product/Service ID Qualifier'
    SV301_02 = models.CharField( max_length=48 ) # (u'AN', u'1', u'48') u'Product/Service ID'
    SV301_03 = models.CharField( max_length=2, null=True, blank=True ) # (u'AN', u'2', u'2') u'Procedure Modifier'
    SV301_04 = models.CharField( max_length=2, null=True, blank=True ) # (u'AN', u'2', u'2') u'Procedure Modifier'
    SV301_05 = models.CharField( max_length=2, null=True, blank=True ) # (u'AN', u'2', u'2') u'Procedure Modifier'
    SV301_06 = models.CharField( max_length=2, null=True, blank=True ) # (u'AN', u'2', u'2') u'Procedure Modifier'
    SV301_07 = models.CharField( max_length=80, null=True, blank=True ) # (u'AN', u'1', u'80') u'Description'
    SV302 = models.CharField( max_length=18 ) # (u'R', u'1', u'18') u'Monetary Amount'
    SV303 = models.CharField( max_length=2, null=True, blank=True ) # (u'AN', u'1', u'2') u'Facility Code Value'
    # <Composite u'C006', Properties(req_sit=u'S',refdes='',seq=u'04',desc=u'Oral Cavity Designation'), 
    SV304_01 = models.CharField( max_length=3 ) # (u'ID', u'1', u'3') u'Oral Cavity Designation Code'
    SV304_02 = models.CharField( max_length=3, null=True, blank=True ) # (u'ID', u'1', u'3') u'Oral Cavity Designation Code'
    SV304_03 = models.CharField( max_length=3, null=True, blank=True ) # (u'ID', u'1', u'3') u'Oral Cavity Designation Code'
    SV304_04 = models.CharField( max_length=3, null=True, blank=True ) # (u'ID', u'1', u'3') u'Oral Cavity Designation Code'
    SV304_05 = models.CharField( max_length=3, null=True, blank=True ) # (u'ID', u'1', u'3') u'Oral Cavity Designation Code'
    SV305 = models.CharField( max_length=1, null=True, blank=True ) # (u'ID', u'1', u'1') u'Prosthesis'
    SV306 = models.CharField( max_length=15 ) # (u'R', u'1', u'15') u'Quantity'
    SV307 = models.CharField( max_length=80, null=True, blank=True ) # (u'AN', u'1', u'80') u'Description'
    SV308 = models.CharField( max_length=1, null=True, blank=True ) # (u'ID', u'1', u'1') u'Copay Status Code'
    SV309 = models.CharField( max_length=1, null=True, blank=True ) # (u'ID', u'1', u'1') u'Provider Agreement Code'
    SV310 = models.CharField( max_length=1, null=True, blank=True ) # (u'ID', u'1', u'1') u'Yes/No Condition or Response Code'
    # <Composite u'C004', Properties(req_sit=u'N',refdes='',seq=u'11',desc=u'Composite Diagnosis Code Pointer'), 
    def unmarshall( self, segmentToken, cs=':' ):
        # composite= segmentToken[1].split(cs)
        self.SV301_01 = segmentToken.subElt(1,cs,0)
        self.SV301_02 = segmentToken.subElt(1,cs,1)
        self.SV301_03 = segmentToken.subElt(1,cs,2)
        self.SV301_04 = segmentToken.subElt(1,cs,3)
        self.SV301_05 = segmentToken.subElt(1,cs,4)
        self.SV301_06 = segmentToken.subElt(1,cs,5)
        self.SV301_07 = segmentToken.subElt(1,cs,6)
        self.SV302 = segmentToken.elt(2)
        self.SV303 = segmentToken.elt(3)
        # composite= segmentToken[4].split(cs)
        self.SV304_01 = segmentToken.subElt(4,cs,0)
        self.SV304_02 = segmentToken.subElt(4,cs,1)
        self.SV304_03 = segmentToken.subElt(4,cs,2)
        self.SV304_04 = segmentToken.subElt(4,cs,3)
        self.SV304_05 = segmentToken.subElt(4,cs,4)
        self.SV305 = segmentToken.elt(5)
        self.SV306 = segmentToken.elt(6)
        self.SV307 = segmentToken.elt(7)
        self.SV308 = segmentToken.elt(8)
        self.SV309 = segmentToken.elt(9)
        self.SV310 = segmentToken.elt(10)
        self.C004 = segmentToken.elt(11)

class Segment_TOO(models.Model):
    """Properties(syntax='',req_sit=u'S',repeat=u'32',pos=u'382',desc=u'Tooth Information')"""
    segment = models.ForeignKey( X12Segment )
    TOO01 = models.CharField( max_length=3 ) # (u'ID', u'1', u'3') u'Code List Qualifier Code'
    TOO02 = models.CharField( max_length=30, null=True, blank=True ) # (u'AN', u'1', u'30') u'Industry Code'
    # <Composite u'C005', Properties(req_sit=u'S',refdes='',seq=u'03',desc=u'Tooth Surface'), 
    TOO03_01 = models.CharField( max_length=2 ) # (u'ID', u'1', u'2') u'Tooth Surface Code'
    TOO03_02 = models.CharField( max_length=2, null=True, blank=True ) # (u'ID', u'1', u'2') u'Tooth Surface Code'
    TOO03_03 = models.CharField( max_length=2, null=True, blank=True ) # (u'ID', u'1', u'2') u'Tooth Surface Code'
    TOO03_04 = models.CharField( max_length=2, null=True, blank=True ) # (u'ID', u'1', u'2') u'Tooth Surface Code'
    TOO03_05 = models.CharField( max_length=2, null=True, blank=True ) # (u'ID', u'1', u'2') u'Tooth Surface Code'
    def unmarshall( self, segmentToken, cs=':' ):
        self.TOO01 = segmentToken.elt(1)
        self.TOO02 = segmentToken.elt(2)
        # composite= segmentToken[3].split(cs)
        self.TOO03_01 = segmentToken.subElt(3,cs,0)
        self.TOO03_02 = segmentToken.subElt(3,cs,1)
        self.TOO03_03 = segmentToken.subElt(3,cs,2)
        self.TOO03_04 = segmentToken.subElt(3,cs,3)
        self.TOO03_05 = segmentToken.subElt(3,cs,4)



<filename>web/claims_837/models.py
#!/usr/bin/env python
"""Generated by make837.py on 2008-02-12 14:41:11.161000"""

import web.claims.models
class Factory( web.claims.models.Factory ):
    """Factory for a generated application."""
    @staticmethod
    def makeSegment( segmentToken, compositeSep, segmentType=None ):
        """Create a Segment from a SegmentToken and an Segment definition.

        :param segmentToken: An :class:`X12.parse.SegmentToken` instance:
        a list-like collection of Element values.  It turns out that a simple
        list of values may also work, if it does NOT have trailing empty
        items omitted.  Real Segment Tokens can have trailing empty items
        omitted.
        :param compositeSep: Composite internal separator from the ISA segment.
        :param segmentType: An :class:`X12.parse.Segment` instance, which
        defines the Elements and Composites of this X12Segment.
        :returns: X12Segment instance
        """
        seg= web.claims.models.Factory.makeSegment( segmentToken, compositeSep, segmentType )
        appSegClass= eval( "Segment_%s" % ( segmentToken[0], ) )
        appSeg= appSegClass( segment= seg )
        appSeg.unmarshall( segmentToken, compositeSep )
        appSeg.save()
        return seg


from web.claims.models import X12Segment
from django.db import models

class Segment_ISA(models.Model):
    """Properties(syntax='',req_sit=u'R',repeat=u'1',pos=u'010',desc=u'Interchange Control Header')"""
    segment = models.ForeignKey( X12Segment )
    ISA01 = models.CharField( max_length=2 ) # (u'ID', u'2', u'2') u'I01'
    ISA02 = models.CharField( max_length=10 ) # (u'AN', u'10', u'10') u'I02'
    ISA03 = models.CharField( max_length=2 ) # (u'ID', u'2', u'2') u'I03'
    ISA04 = models.CharField( max_length=10 ) # (u'AN', u'10', u'10') u'I04'
    ISA05 = models.CharField( max_length=2 ) # (u'ID', u'2', u'2') u'I05'
    ISA06 = models.CharField( max_length=15 ) # (u'AN', u'15', u'15') u'I06'
    ISA07 = models.CharField( max_length=2 ) # (u'ID', u'2', u'2') u'I05'
    ISA08 = models.CharField( max_length=15 ) # (u'AN', u'15', u'15') u'I07'
    ISA09 = models.CharField( max_length=6 ) # (u'DT', u'6', u'6') u'I08'
    ISA10 = models.CharField( max_length=4 ) # (u'TM', u'4', u'4') u'I09'
    ISA11 = models.CharField( max_length=1 ) # (u'ID', u'1', u'1') u'I10'
    ISA12 = models.CharField( max_length=5 ) # (u'ID', u'5', u'5') u'I11'
    ISA13 = models.CharField( max_length=9 ) # (u'N0', u'9', u'9') u'I12'
    ISA14 = models.CharField( max_length=1 ) # (u'ID', u'1', u'1') u'I13'
    ISA15 = models.CharField( max_length=1 ) # (u'ID', u'1', u'1') u'I14'
    ISA16 = models.CharField( max_length=1 ) # (u'AN', u'1', u'1') u'I15'
    def unmarshall( self, segmentToken, cs=':' ):
        self.ISA01 = segmentToken.elt(1)
        self.ISA02 = segmentToken.elt(2)
        self.ISA03 = segmentToken.elt(3)
        self.ISA04 = segmentToken.elt(4)
        self.ISA05 = segmentToken.elt(5)
        self.ISA06 = segmentToken.elt(6)
        self.ISA07 = segmentToken.elt(7)
        self.ISA08 = segmentToken.elt(8)
        self.ISA09 = segmentToken.elt(9)
        self.ISA10 = segmentToken.elt(10)
        self.ISA11 = segmentToken.elt(11)
        self.ISA12 = segmentToken.elt(12)
        self.ISA13 = segmentToken.elt(13)
        self.ISA14 = segmentToken.elt(14)
        self.ISA15 = segmentToken.elt(15)
        self.ISA16 = segmentToken.elt(16)

class Segment_GS(models.Model):
    """Properties(syntax='',req_sit=u'R',repeat=u'1',pos=u'010',desc=u'Functional Group Header')"""
    segment = models.ForeignKey( X12Segment )
    GS01 = models.CharField( max_length=2 ) # (u'ID', u'2', u'2') u'Functional Identifier Code'
    GS02 = models.CharField( max_length=15 ) # (u'AN', u'2', u'15') u'Application Senders Code'
    GS03 = models.CharField( max_length=15 ) # (u'AN', u'2', u'15') u'124'
    GS04 = models.CharField( max_length=8 ) # (u'DT', u'8', u'8') u'Date'
    GS05 = models.CharField( max_length=8 ) # (u'TM', u'4', u'8') u'Time'
    GS06 = models.CharField( max_length=9 ) # (u'N0', u'1', u'9') u'Group Control Number'
    GS07 = models.CharField( max_length=2 ) # (u'ID', u'1', u'2') u'Responsible Agency Code'
    GS08 = models.CharField( max_length=12 ) # (u'AN', u'1', u'12') u'Version / Release / Industry Identifier Code'
    def unmarshall( self, segmentToken, cs=':' ):
        self.GS01 = segmentToken.elt(1)
        self.GS02 = segmentToken.elt(2)
        self.GS03 = segmentToken.elt(3)
        self.GS04 = segmentToken.elt(4)
        self.GS05 = segmentToken.elt(5)
        self.GS06 = segmentToken.elt(6)
        self.GS07 = segmentToken.elt(7)
        self.GS08 = segmentToken.elt(8)

class Segment_ST(models.Model):
    """Properties(syntax='',req_sit=u'R',repeat=u'1',pos=u'005',desc=u'Transaction Set Header')"""
    segment = models.ForeignKey( X12Segment )
    ST01 = models.CharField( max_length=3 ) # (u'ID', u'3', u'3') u'Transaction Set Identifier Code'
    ST02 = models.CharField( max_length=9 ) # (u'AN', u'4', u'9') u'Transaction Set Control Number'
    def unmarshall( self, segmentToken, cs=':' ):
        self.ST01 = segmentToken.elt(1)
        self.ST02 = segmentToken.elt(2)

class Segment_BHT(models.Model):
    """Properties(syntax='',req_sit=u'R',repeat=u'1',pos=u'010',desc=u'Beginning of Hierarchical Transaction')"""
    segment = models.ForeignKey( X12Segment )
    BHT01 = models.CharField( max_length=4 ) # (u'ID', u'4', u'4') u'Hierarchical Structure Code'
    BHT02 = models.CharField( max_length=2 ) # (u'ID', u'2', u'2') u'Transaction Set Purpose Code'
    BHT03 = models.CharField( max_length=30 ) # (u'AN', u'1', u'30') u'Reference Identification'
    BHT04 = models.CharField( max_length=8 ) # (u'DT', u'8', u'8') u'Date'
    BHT05 = models.CharField( max_length=8 ) # (u'TM', u'4', u'8') u'Time'
    BHT06 = models.CharField( max_length=2 ) # (u'ID', u'2', u'2') u'Transaction Type Code'
    def unmarshall( self, segmentToken, cs=':' ):
        self.BHT01 = segmentToken.elt(1)
        self.BHT02 = segmentToken.elt(2)
        self.BHT03 = segmentToken.elt(3)
        self.BHT04 = segmentToken.elt(4)
        self.BHT05 = segmentToken.elt(5)
        self.BHT06 = segmentToken.elt(6)

class Segment_REF(models.Model):
    """Properties(syntax=u'R0203',req_sit=u'R',repeat=u'1',pos=u'015',desc=u'Transmission Type Identification')"""
    segment = models.ForeignKey( X12Segment )
    REF01 = models.CharField( max_length=3 ) # (u'ID', u'2', u'3') u'Reference Identification Qualifier'
    REF02 = models.CharField( max_length=30 ) # (u'AN', u'1', u'30') u'Reference Identification'
    REF03 = models.CharField( max_length=80, null=True, blank=True ) # (u'AN', u'1', u'80') u'Description'
    # <Composite u'C040', Properties(req_sit=u'N',refdes=u'REF04',seq=u'04',desc=u'Reference Identifier'), 
    def unmarshall( self, segmentToken, cs=':' ):
        self.REF01 = segmentToken.elt(1)
        self.REF02 = segmentToken.elt(2)
        self.REF03 = segmentToken.elt(3)
        self.C040 = segmentToken.elt(4)

class Segment_NM1(models.Model):
    """Properties(syntax=u'P0809 C1110',req_sit=u'R',repeat=u'1',pos=u'020',desc=u'Submitter Name')"""
    segment = models.ForeignKey( X12Segment )
    NM101 = models.CharField( max_length=3 ) # (u'ID', u'2', u'3') u'Entity Identifier Code'
    NM102 = models.CharField( max_length=1 ) # (u'ID', u'1', u'1') u'Entity Type Qualifier'
    NM103 = models.CharField( max_length=35 ) # (u'AN', u'1', u'35') u'Name Last or Organization Name'
    NM104 = models.CharField( max_length=25, null=True, blank=True ) # (u'AN', u'1', u'25') u'Name First'
    NM105 = models.CharField( max_length=25, null=True, blank=True ) # (u'AN', u'1', u'25') u'Name Middle'
    NM106 = models.CharField( max_length=10, null=True, blank=True ) # (u'AN', u'1', u'10') u'Name Prefix'
    NM107 = models.CharField( max_length=10, null=True, blank=True ) # (u'AN', u'1', u'10') u'Name Suffix'
    NM108 = models.CharField( max_length=2 ) # (u'ID', u'1', u'2') u'Identification Code Qualifier'
    NM109 = models.CharField( max_length=80 ) # (u'AN', u'2', u'80') u'Identification Code'
    NM110 = models.CharField( max_length=2, null=True, blank=True ) # (u'ID', u'2', u'2') u'Entity Relationship Code'
    NM111 = models.CharField( max_length=3, null=True, blank=True ) # (u'ID', u'2', u'3') u'Entity Identifier Code'
    def unmarshall( self, segmentToken, cs=':' ):
        self.NM101 = segmentToken.elt(1)
        self.NM102 = segmentToken.elt(2)
        self.NM103 = segmentToken.elt(3)
        self.NM104 = segmentToken.elt(4)
        self.NM105 = segmentToken.elt(5)
        self.NM106 = segmentToken.elt(6)
        self.NM107 = segmentToken.elt(7)
        self.NM108 = segmentToken.elt(8)
        self.NM109 = segmentToken.elt(9)
        self.NM110 = segmentToken.elt(10)
        self.NM111 = segmentToken.elt(11)

class Segment_PER(models.Model):
    """Properties(syntax=u'P0304 P0506 P0708',req_sit=u'R',repeat=u'2',pos=u'045',desc=u'Submitter EDI Contact Information')"""
    segment = models.ForeignKey( X12Segment )
    PER01 = models.CharField( max_length=2 ) # (u'ID', u'2', u'2') u'Contact Function Code'
    PER02 = models.CharField( max_length=60 ) # (u'AN', u'1', u'60') u'Name'
    PER03 = models.CharField( max_length=2 ) # (u'ID', u'2', u'2') u'Communication Number Qualifier'
    PER04 = models.CharField( max_length=80 ) # (u'AN', u'1', u'80') u'Communication Number'
    PER05 = models.CharField( max_length=2, null=True, blank=True ) # (u'ID', u'2', u'2') u'Communication Number Qualifier'
    PER06 = models.CharField( max_length=80, null=True, blank=True ) # (u'AN', u'1', u'80') u'Communication Number'
    PER07 = models.CharField( max_length=2, null=True, blank=True ) # (u'ID', u'2', u'2') u'Communication Number Qualifier'
    PER08 = models.CharField( max_length=80, null=True, blank=True ) # (u'AN', u'1', u'80') u'Communication Number'
    PER09 = models.CharField( max_length=20, null=True, blank=True ) # (u'AN', u'1', u'20') u'Contact Inquiry Reference'
    def unmarshall( self, segmentToken, cs=':' ):
        self.PER01 = segmentToken.elt(1)
        self.PER02 = segmentToken.elt(2)
        self.PER03 = segmentToken.elt(3)
        self.PER04 = segmentToken.elt(4)
        self.PER05 = segmentToken.elt(5)
        self.PER06 = segmentToken.elt(6)
        self.PER07 = segmentToken.elt(7)
        self.PER08 = segmentToken.elt(8)
        self.PER09 = segmentToken.elt(9)

class Segment_HL(models.Model):
    """Properties(syntax='',req_sit=u'R',repeat=u'1',pos=u'001',desc=u'Billing/Pay-To Provider Hierarchical Level')"""
    segment = models.ForeignKey( X12Segment )
    HL01 = models.CharField( max_length=12 ) # (u'AN', u'1', u'12') u'Hierarchical ID Number'
    HL02 = models.CharField( max_length=12, null=True, blank=True ) # (u'AN', u'1', u'12') u'Hierarchical Parent ID Number'
    HL03 = models.CharField( max_length=2 ) # (u'ID', u'1', u'2') u'Hierarchical Level Code'
    HL04 = models.CharField( max_length=1 ) # (u'ID', u'1', u'1') u'Hierarchical Child Code'
    def unmarshall( self, segmentToken, cs=':' ):
        self.HL01 = segmentToken.elt(1)
        self.HL02 = segmentToken.elt(2)
        self.HL03 = segmentToken.elt(3)
        self.HL04 = segmentToken.elt(4)

class Segment_PRV(models.Model):
    """Properties(syntax='',req_sit=u'S',repeat=u'1',pos=u'003',desc=u'Billing/Pay-To Provider Specialty Information')"""
    segment = models.ForeignKey( X12Segment )
    PRV01 = models.CharField( max_length=3 ) # (u'ID', u'1', u'3') u'Provider Code'
    PRV02 = models.CharField( max_length=3 ) # (u'ID', u'2', u'3') u'Reference Identification Qualifier'
    PRV03 = models.CharField( max_length=30 ) # (u'AN', u'1', u'30') u'Reference Identification'
    PRV04 = models.CharField( max_length=2, null=True, blank=True ) # (u'ID', u'2', u'2') u'State or Province Code'
    # <Composite u'C035', Properties(req_sit=u'N',refdes='',seq=u'05',desc=u'Provider Specialty Information'), 
    PRV06 = models.CharField( max_length=3, null=True, blank=True ) # (u'ID', u'3', u'3') u'Provider Organization Code'
    def unmarshall( self, segmentToken, cs=':' ):
        self.PRV01 = segmentToken.elt(1)
        self.PRV02 = segmentToken.elt(2)
        self.PRV03 = segmentToken.elt(3)
        self.PRV04 = segmentToken.elt(4)
        self.C035 = segmentToken.elt(5)
        self.PRV06 = segmentToken.elt(6)

class Segment_CUR(models.Model):
    """Properties(syntax=u'C0807 C0907 L101112 C1110 C1210 L131415 C1413 C1513 L161718 C1716 C1816 L192021 C2019 C2119',req_sit=u'S',repeat=u'1',pos=u'010',desc=u'Foreign Currency Information')"""
    segment = models.ForeignKey( X12Segment )
    CUR01 = models.CharField( max_length=3 ) # (u'ID', u'2', u'3') u'Entity Identifier Code'
    CUR02 = models.CharField( max_length=3 ) # (u'ID', u'3', u'3') u'Currency Code'
    CUR03 = models.CharField( max_length=10, null=True, blank=True ) # (u'R', u'4', u'10') u'Exchange Rate'
    CUR04 = models.CharField( max_length=3, null=True, blank=True ) # (u'ID', u'2', u'3') u'Entity Identifier Code'
    CUR05 = models.CharField( max_length=3, null=True, blank=True ) # (u'ID', u'3', u'3') u'Currency Code'
    CUR06 = models.CharField( max_length=3, null=True, blank=True ) # (u'ID', u'3', u'3') u'Currency Market/Exchange Code'
    CUR07 = models.CharField( max_length=3, null=True, blank=True ) # (u'ID', u'3', u'3') u'Date/Time Qualifier'
    CUR08 = models.CharField( max_length=8, null=True, blank=True ) # (u'DT', u'8', u'8') u'Date'
    CUR09 = models.CharField( max_length=8, null=True, blank=True ) # (u'TM', u'4', u'8') u'Time'
    CUR10 = models.CharField( max_length=3, null=True, blank=True ) # (u'ID', u'3', u'3') u'Date/Time Qualifier'
    CUR11 = models.CharField( max_length=8, null=True, blank=True ) # (u'DT', u'8', u'8') u'Date'
    CUR12 = models.CharField( max_length=8, null=True, blank=True ) # (u'TM', u'4', u'8') u'Time'
    CUR13 = models.CharField( max_length=3, null=True, blank=True ) # (u'ID', u'3', u'3') u'Date/Time Qualifier'
    CUR14 = models.CharField( max_length=8, null=True, blank=True ) # (u'DT', u'8', u'8') u'Date'
    CUR15 = models.CharField( max_length=8, null=True, blank=True ) # (u'TM', u'4', u'8') u'Time'
    CUR16 = models.CharField( max_length=3, null=True, blank=True ) # (u'ID', u'3', u'3') u'Date/Time Qualifier'
    CUR17 = models.CharField( max_length=8, null=True, blank=True ) # (u'DT', u'8', u'8') u'Date'
    CUR18 = models.CharField( max_length=8, null=True, blank=True ) # (u'TM', u'4', u'8') u'Time'
    CUR19 = models.CharField( max_length=3, null=True, blank=True ) # (u'ID', u'3', u'3') u'Date/Time Qualifier'
    CUR20 = models.CharField( max_length=8, null=True, blank=True ) # (u'DT', u'8', u'8') u'Date'
    CUR21 = models.CharField( max_length=8, null=True, blank=True ) # (u'TM', u'4', u'8') u'Time'
    def unmarshall( self, segmentToken, cs=':' ):
        self.CUR01 = segmentToken.elt(1)
        self.CUR02 = segmentToken.elt(2)
        self.CUR03 = segmentToken.elt(3)
        self.CUR04 = segmentToken.elt(4)
        self.CUR05 = segmentToken.elt(5)
        self.CUR06 = segmentToken.elt(6)
        self.CUR07 = segmentToken.elt(7)
        self.CUR08 = segmentToken.elt(8)
        self.CUR09 = segmentToken.elt(9)
        self.CUR10 = segmentToken.elt(10)
        self.CUR11 = segmentToken.elt(11)
        self.CUR12 = segmentToken.elt(12)
        self.CUR13 = segmentToken.elt(13)
        self.CUR14 = segmentToken.elt(14)
        self.CUR15 = segmentToken.elt(15)
        self.CUR16 = segmentToken.elt(16)
        self.CUR17 = segmentToken.elt(17)
        self.CUR18 = segmentToken.elt(18)
        self.CUR19 = segmentToken.elt(19)
        self.CUR20 = segmentToken.elt(20)
        self.CUR21 = segmentToken.elt(21)

class Segment_N3(models.Model):
    """Properties(syntax='',req_sit=u'R',repeat=u'1',pos=u'025',desc=u'Billing Provider Address')"""
    segment = models.ForeignKey( X12Segment )
    N301 = models.CharField( max_length=55 ) # (u'AN', u'1', u'55') u'Address Information'
    N302 = models.CharField( max_length=55, null=True, blank=True ) # (u'AN', u'1', u'55') u'Address Information'
    def unmarshall( self, segmentToken, cs=':' ):
        self.N301 = segmentToken.elt(1)
        self.N302 = segmentToken.elt(2)

class Segment_N4(models.Model):
    """Properties(syntax=u'C0605',req_sit=u'R',repeat=u'1',pos=u'030',desc=u'Billing Provider City/State/ZIP Code')"""
    segment = models.ForeignKey( X12Segment )
    N401 = models.CharField( max_length=30 ) # (u'AN', u'2', u'30') u'City Name'
    N402 = models.CharField( max_length=2 ) # (u'ID', u'2', u'2') u'State or Province Code'
    N403 = models.CharField( max_length=15 ) # (u'ID', u'3', u'15') u'Postal Code'
    N404 = models.CharField( max_length=3, null=True, blank=True ) # (u'ID', u'2', u'3') u'Country Code'
    N405 = models.CharField( max_length=2, null=True, blank=True ) # (u'ID', u'1', u'2') u'Location Qualifier'
    N406 = models.CharField( max_length=30, null=True, blank=True ) # (u'AN', u'1', u'30') u'Location Identifier'
    def unmarshall( self, segmentToken, cs=':' ):
        self.N401 = segmentToken.elt(1)
        self.N402 = segmentToken.elt(2)
        self.N403 = segmentToken.elt(3)
        self.N404 = segmentToken.elt(4)
        self.N405 = segmentToken.elt(5)
        self.N406 = segmentToken.elt(6)

class Segment_SBR(models.Model):
    """Properties(syntax='',req_sit=u'R',repeat=u'1',pos=u'005',desc=u'Subscriber Information')"""
    segment = models.ForeignKey( X12Segment )
    SBR01 = models.CharField( max_length=1 ) # (u'ID', u'1', u'1') u'Payer Responsibility Sequence Number Code'
    SBR02 = models.CharField( max_length=2, null=True, blank=True ) # (u'ID', u'2', u'2') u'Individual Relationship Code'
    SBR03 = models.CharField( max_length=30, null=True, blank=True ) # (u'AN', u'1', u'30') u'Reference Identification'
    SBR04 = models.CharField( max_length=60, null=True, blank=True ) # (u'AN', u'1', u'60') u'Name'
    SBR05 = models.CharField( max_length=3, null=True, blank=True ) # (u'ID', u'1', u'3') u'Insurance Type Code'
    SBR06 = models.CharField( max_length=1, null=True, blank=True ) # (u'ID', u'1', u'1') u'Coordination of Benefits Code'
    SBR07 = models.CharField( max_length=1, null=True, blank=True ) # (u'ID', u'1', u'1') u'Yes/No Condition or Response Code'
    SBR08 = models.CharField( max_length=2, null=True, blank=True ) # (u'ID', u'2', u'2') u'Employment Status Code'
    SBR09 = models.CharField( max_length=2, null=True, blank=True ) # (u'ID', u'1', u'2') u'Claim Filing Indicator Code'
    def unmarshall( self, segmentToken, cs=':' ):
        self.SBR01 = segmentToken.elt(1)
        self.SBR02 = segmentToken.elt(2)
        self.SBR03 = segmentToken.elt(3)
        self.SBR04 = segmentToken.elt(4)
        self.SBR05 = segmentToken.elt(5)
        self.SBR06 = segmentToken.elt(6)
        self.SBR07 = segmentToken.elt(7)
        self.SBR08 = segmentToken.elt(8)
        self.SBR09 = segmentToken.elt(9)

class Segment_PAT(models.Model):
    """Properties(syntax=u'P0506 P0708',req_sit=u'S',repeat=u'1',pos=u'007',desc=u'Patient Information')"""
    segment = models.ForeignKey( X12Segment )
    PAT01 = models.CharField( max_length=2, null=True, blank=True ) # (u'ID', u'2', u'2') u'Individual Relationship Code'
    PAT02 = models.CharField( max_length=1, null=True, blank=True ) # (u'ID', u'1', u'1') u'Patient Location Code'
    PAT03 = models.CharField( max_length=2, null=True, blank=True ) # (u'ID', u'2', u'2') u'Employment Status Code'
    PAT04 = models.CharField( max_length=1, null=True, blank=True ) # (u'ID', u'1', u'1') u'Student Status Code'
    PAT05 = models.CharField( max_length=3, null=True, blank=True ) # (u'ID', u'2', u'3') u'Date Time Period Format Qualifier'
    PAT06 = models.CharField( max_length=35, null=True, blank=True ) # (u'AN', u'1', u'35') u'Date Time Period'
    PAT07 = models.CharField( max_length=2, null=True, blank=True ) # (u'ID', u'2', u'2') u'Unit or Basis for Measurement Code'
    PAT08 = models.CharField( max_length=10, null=True, blank=True ) # (u'R', u'1', u'10') u'Weight'
    PAT09 = models.CharField( max_length=1, null=True, blank=True ) # (u'ID', u'1', u'1') u'Yes/No Condition or Response Code'
    def unmarshall( self, segmentToken, cs=':' ):
        self.PAT01 = segmentToken.elt(1)
        self.PAT02 = segmentToken.elt(2)
        self.PAT03 = segmentToken.elt(3)
        self.PAT04 = segmentToken.elt(4)
        self.PAT05 = segmentToken.elt(5)
        self.PAT06 = segmentToken.elt(6)
        self.PAT07 = segmentToken.elt(7)
        self.PAT08 = segmentToken.elt(8)
        self.PAT09 = segmentToken.elt(9)

class Segment_DMG(models.Model):
    """Properties(syntax=u'P0102',req_sit=u'S',repeat=u'1',pos=u'032',desc=u'Subscriber Demographic Information')"""
    segment = models.ForeignKey( X12Segment )
    DMG01 = models.CharField( max_length=3 ) # (u'ID', u'2', u'3') u'Date Time Period Format Qualifier'
    DMG02 = models.CharField( max_length=35 ) # (u'AN', u'1', u'35') u'Date Time Period'
    DMG03 = models.CharField( max_length=1 ) # (u'ID', u'1', u'1') u'Gender Code'
    DMG04 = models.CharField( max_length=1, null=True, blank=True ) # (u'ID', u'1', u'1') u'Marital Status Code'
    DMG05 = models.CharField( max_length=1, null=True, blank=True ) # (u'ID', u'1', u'1') u'Race or Ethnicity Code'
    DMG06 = models.CharField( max_length=2, null=True, blank=True ) # (u'ID', u'1', u'2') u'Citizenship Status Code'
    DMG07 = models.CharField( max_length=3, null=True, blank=True ) # (u'ID', u'2', u'3') u'Country Code'
    DMG08 = models.CharField( max_length=2, null=True, blank=True ) # (u'ID', u'1', u'2') u'Basis of Verification Code'
    DMG09 = models.CharField( max_length=15, null=True, blank=True ) # (u'R', u'1', u'15') u'Quantity'
    def unmarshall( self, segmentToken, cs=':' ):
        self.DMG01 = segmentToken.elt(1)
        self.DMG02 = segmentToken.elt(2)
        self.DMG03 = segmentToken.elt(3)
        self.DMG04 = segmentToken.elt(4)
        self.DMG05 = segmentToken.elt(5)
        self.DMG06 = segmentToken.elt(6)
        self.DMG07 = segmentToken.elt(7)
        self.DMG08 = segmentToken.elt(8)
        self.DMG09 = segmentToken.elt(9)

class Segment_CLM(models.Model):
    """Properties(syntax='',req_sit=u'R',repeat=u'1',pos=u'130',desc=u'Claim Information')"""
    segment = models.ForeignKey( X12Segment )
    CLM01 = models.CharField( max_length=38 ) # (u'AN', u'1', u'38') u'Claim Submitters Identifier'
    CLM02 = models.CharField( max_length=18 ) # (u'R', u'1', u'18') u'Monetary Amount'
    CLM03 = models.CharField( max_length=2, null=True, blank=True ) # (u'ID', u'1', u'2') u'Claim Filing Indicator Code'
    CLM04 = models.CharField( max_length=2, null=True, blank=True ) # (u'ID', u'1', u'2') u'Non-Institutional Claim Type Code'
    # <Composite u'C023', Properties(req_sit=u'R',refdes='',seq=u'05',desc=u'Place of Service Code'), 
    CLM05_01 = models.CharField( max_length=2 ) # (u'AN', u'1', u'2') u'Facility Code Value'
    CLM05_02 = models.CharField( max_length=2, null=True, blank=True ) # (u'ID', u'1', u'2') u'Facility Code Qualifier'
    CLM05_03 = models.CharField( max_length=1 ) # (u'ID', u'1', u'1') u'Claim Frequency Type Code'
    CLM06 = models.CharField( max_length=1 ) # (u'ID', u'1', u'1') u'Yes/No Condition or Response Code'
    CLM07 = models.CharField( max_length=1 ) # (u'ID', u'1', u'1') u'Provider Accept Assignment Code'
    CLM08 = models.CharField( max_length=1 ) # (u'ID', u'1', u'1') u'Yes/No Condition or Response Code'
    CLM09 = models.CharField( max_length=1 ) # (u'ID', u'1', u'1') u'Release of Information Code'
    CLM10 = models.CharField( max_length=1, null=True, blank=True ) # (u'ID', u'1', u'1') u'Patient Signature Source Code'
    # <Composite u'C024', Properties(req_sit=u'S',refdes='',seq=u'11',desc=u'Accident/Employment/Related Causes'), 
    CLM11_01 = models.CharField( max_length=3 ) # (u'ID', u'2', u'3') u'Related-Causes Code'
    CLM11_02 = models.CharField( max_length=3, null=True, blank=True ) # (u'ID', u'2', u'3') u'Related-Causes Code'
    CLM11_03 = models.CharField( max_length=3, null=True, blank=True ) # (u'ID', u'2', u'3') u'Related-Causes Code'
    CLM11_04 = models.CharField( max_length=2, null=True, blank=True ) # (u'ID', u'2', u'2') u'State or Province Code'
    CLM11_05 = models.CharField( max_length=3, null=True, blank=True ) # (u'ID', u'2', u'3') u'Country Code'
    CLM12 = models.CharField( max_length=3, null=True, blank=True ) # (u'ID', u'2', u'3') u'Special Program Code'
    CLM13 = models.CharField( max_length=1, null=True, blank=True ) # (u'ID', u'1', u'1') u'Yes/No Condition or Response Code'
    CLM14 = models.CharField( max_length=3, null=True, blank=True ) # (u'ID', u'1', u'3') u'Level of Service Code'
    CLM15 = models.CharField( max_length=1, null=True, blank=True ) # (u'ID', u'1', u'1') u'Yes/No Condition or Response Code'
    CLM16 = models.CharField( max_length=1, null=True, blank=True ) # (u'ID', u'1', u'1') u'Provider Agreement Code'
    CLM17 = models.CharField( max_length=2, null=True, blank=True ) # (u'ID', u'1', u'2') u'Claim Status Code'
    CLM18 = models.CharField( max_length=1, null=True, blank=True ) # (u'ID', u'1', u'1') u'Yes/No Condition or Response Code'
    CLM19 = models.CharField( max_length=2, null=True, blank=True ) # (u'ID', u'2', u'2') u'Claim Submission Reason Code'
    CLM20 = models.CharField( max_length=2, null=True, blank=True ) # (u'ID', u'1', u'2') u'Delay Reason Code'
    def unmarshall( self, segmentToken, cs=':' ):
        self.CLM01 = segmentToken.elt(1)
        self.CLM02 = segmentToken.elt(2)
        self.CLM03 = segmentToken.elt(3)
        self.CLM04 = segmentToken.elt(4)
        # composite= segmentToken[5].split(cs)
        self.CLM05_01 = segmentToken.subElt(5,cs,0)
        self.CLM05_02 = segmentToken.subElt(5,cs,1)
        self.CLM05_03 = segmentToken.subElt(5,cs,2)
        self.CLM06 = segmentToken.elt(6)
        self.CLM07 = segmentToken.elt(7)
        self.CLM08 = segmentToken.elt(8)
        self.CLM09 = segmentToken.elt(9)
        self.CLM10 = segmentToken.elt(10)
        # composite= segmentToken[11].split(cs)
        self.CLM11_01 = segmentToken.subElt(11,cs,0)
        self.CLM11_02 = segmentToken.subElt(11,cs,1)
        self.CLM11_03 = segmentToken.subElt(11,cs,2)
        self.CLM11_04 = segmentToken.subElt(11,cs,3)
        self.CLM11_05 = segmentToken.subElt(11,cs,4)
        self.CLM12 = segmentToken.elt(12)
        self.CLM13 = segmentToken.elt(13)
        self.CLM14 = segmentToken.elt(14)
        self.CLM15 = segmentToken.elt(15)
        self.CLM16 = segmentToken.elt(16)
        self.CLM17 = segmentToken.elt(17)
        self.CLM18 = segmentToken.elt(18)
        self.CLM19 = segmentToken.elt(19)
        self.CLM20 = segmentToken.elt(20)

class Segment_DTP(models.Model):
    """Properties(syntax='',req_sit=u'S',repeat=u'1',pos=u'135',desc=u'Date - Initial Treatment')"""
    segment = models.ForeignKey( X12Segment )
    DTP01 = models.CharField( max_length=3 ) # (u'ID', u'3', u'3') u'Date/Time Qualifier'
    DTP02 = models.CharField( max_length=3 ) # (u'ID', u'2', u'3') u'Date Time Period Format Qualifier'
    DTP03 = models.CharField( max_length=35 ) # (u'AN', u'1', u'35') u'Date Time Period'
    def unmarshall( self, segmentToken, cs=':' ):
        self.DTP01 = segmentToken.elt(1)
        self.DTP02 = segmentToken.elt(2)
        self.DTP03 = segmentToken.elt(3)

class Segment_PWK(models.Model):
    """Properties(syntax=u'P0506',req_sit=u'S',repeat=u'10',pos=u'155',desc=u'Claim Supplemental Information')"""
    segment = models.ForeignKey( X12Segment )
    PWK01 = models.CharField( max_length=2 ) # (u'ID', u'2', u'2') u'Report Type Code'
    PWK02 = models.CharField( max_length=2 ) # (u'ID', u'1', u'2') u'Report Transmission Code'
    PWK03 = models.CharField( max_length=2, null=True, blank=True ) # (u'N0', u'1', u'2') u'Report Copies Needed'
    PWK04 = models.CharField( max_length=3, null=True, blank=True ) # (u'ID', u'2', u'3') u'Entity Identifier Code'
    PWK05 = models.CharField( max_length=2, null=True, blank=True ) # (u'ID', u'1', u'2') u'Identification Code Qualifier'
    PWK06 = models.CharField( max_length=80, null=True, blank=True ) # (u'AN', u'2', u'80') u'Identification Code'
    PWK07 = models.CharField( max_length=80, null=True, blank=True ) # (u'AN', u'1', u'80') u'Description'
    # <Composite u'C002', Properties(req_sit=u'N',refdes=u'PWK08',seq=u'08',desc=u'Actions Indicated'), 
    PWK09 = models.CharField( max_length=2, null=True, blank=True ) # (u'ID', u'1', u'2') u'Request Category Code'
    def unmarshall( self, segmentToken, cs=':' ):
        self.PWK01 = segmentToken.elt(1)
        self.PWK02 = segmentToken.elt(2)
        self.PWK03 = segmentToken.elt(3)
        self.PWK04 = segmentToken.elt(4)
        self.PWK05 = segmentToken.elt(5)
        self.PWK06 = segmentToken.elt(6)
        self.PWK07 = segmentToken.elt(7)
        self.C002 = segmentToken.elt(8)
        self.PWK09 = segmentToken.elt(9)

class Segment_CN1(models.Model):
    """Properties(syntax='',req_sit=u'S',repeat=u'1',pos=u'160',desc=u'Contract Information')"""
    segment = models.ForeignKey( X12Segment )
    CN101 = models.CharField( max_length=2 ) # (u'ID', u'2', u'2') u'Contract Type Code'
    CN102 = models.CharField( max_length=18, null=True, blank=True ) # (u'R', u'1', u'18') u'Monetary Amount'
    CN103 = models.CharField( max_length=6, null=True, blank=True ) # (u'R', u'1', u'6') u'Percent'
    CN104 = models.CharField( max_length=30, null=True, blank=True ) # (u'AN', u'1', u'30') u'Reference Identification'
    CN105 = models.CharField( max_length=6, null=True, blank=True ) # (u'R', u'1', u'6') u'Terms Discount Percent'
    CN106 = models.CharField( max_length=30, null=True, blank=True ) # (u'AN', u'1', u'30') u'Version Identifier'
    def unmarshall( self, segmentToken, cs=':' ):
        self.CN101 = segmentToken.elt(1)
        self.CN102 = segmentToken.elt(2)
        self.CN103 = segmentToken.elt(3)
        self.CN104 = segmentToken.elt(4)
        self.CN105 = segmentToken.elt(5)
        self.CN106 = segmentToken.elt(6)

class Segment_AMT(models.Model):
    """Properties(syntax='',req_sit=u'S',repeat=u'1',pos=u'175',desc=u'Credit/Debit Card Maximum Amount')"""
    segment = models.ForeignKey( X12Segment )
    AMT01 = models.CharField( max_length=3 ) # (u'ID', u'1', u'3') u'Amount Qualifier Code'
    AMT02 = models.CharField( max_length=18 ) # (u'R', u'1', u'18') u'Monetary Amount'
    AMT03 = models.CharField( max_length=1, null=True, blank=True ) # (u'ID', u'1', u'1') u'Credit/Debit Flag Code'
    def unmarshall( self, segmentToken, cs=':' ):
        self.AMT01 = segmentToken.elt(1)
        self.AMT02 = segmentToken.elt(2)
        self.AMT03 = segmentToken.elt(3)

class Segment_K3(models.Model):
    """Properties(syntax='',req_sit=u'S',repeat=u'10',pos=u'185',desc=u'File Information')"""
    segment = models.ForeignKey( X12Segment )
    K301 = models.CharField( max_length=80 ) # (u'AN', u'1', u'80') u'Fixed Format Information'
    K302 = models.CharField( max_length=2, null=True, blank=True ) # (u'ID', u'1', u'2') u'Record Format Code'
    # <Composite u'C001', Properties(req_sit=u'N',refdes=u'K303',seq=u'03',desc=u'Composite Unit of Measure'), 
    def unmarshall( self, segmentToken, cs=':' ):
        self.K301 = segmentToken.elt(1)
        self.K302 = segmentToken.elt(2)
        self.C001 = segmentToken.elt(3)

class Segment_NTE(models.Model):
    """Properties(syntax='',req_sit=u'S',repeat=u'1',pos=u'190',desc=u'Claim Note')"""
    segment = models.ForeignKey( X12Segment )
    NTE01 = models.CharField( max_length=3 ) # (u'ID', u'3', u'3') u'Note Reference Code'
    NTE02 = models.CharField( max_length=80 ) # (u'AN', u'1', u'80') u'Description'
    def unmarshall( self, segmentToken, cs=':' ):
        self.NTE01 = segmentToken.elt(1)
        self.NTE02 = segmentToken.elt(2)

class Segment_CR1(models.Model):
    """Properties(syntax=u'P0102 P0506',req_sit=u'S',repeat=u'1',pos=u'195',desc=u'Ambulance Transport Information')"""
    segment = models.ForeignKey( X12Segment )
    CR101 = models.CharField( max_length=2, null=True, blank=True ) # (u'ID', u'2', u'2') u'Unit or Basis for Measurement Code'
    CR102 = models.CharField( max_length=10, null=True, blank=True ) # (u'R', u'1', u'10') u'Weight'
    CR103 = models.CharField( max_length=1 ) # (u'ID', u'1', u'1') u'Ambulance Transport Code'
    CR104 = models.CharField( max_length=1 ) # (u'ID', u'1', u'1') u'Ambulance Transport Reason Code'
    CR105 = models.CharField( max_length=2 ) # (u'ID', u'2', u'2') u'Unit or Basis for Measurement Code'
    CR106 = models.CharField( max_length=15 ) # (u'R', u'1', u'15') u'Quantity'
    CR107 = models.CharField( max_length=55, null=True, blank=True ) # (u'AN', u'1', u'55') u'Address Information'
    CR108 = models.CharField( max_length=55, null=True, blank=True ) # (u'AN', u'1', u'55') u'Address Information'
    CR109 = models.CharField( max_length=80, null=True, blank=True ) # (u'AN', u'1', u'80') u'Description'
    CR110 = models.CharField( max_length=80, null=True, blank=True ) # (u'AN', u'1', u'80') u'Description'
    def unmarshall( self, segmentToken, cs=':' ):
        self.CR101 = segmentToken.elt(1)
        self.CR102 = segmentToken.elt(2)
        self.CR103 = segmentToken.elt(3)
        self.CR104 = segmentToken.elt(4)
        self.CR105 = segmentToken.elt(5)
        self.CR106 = segmentToken.elt(6)
        self.CR107 = segmentToken.elt(7)
        self.CR108 = segmentToken.elt(8)
        self.CR109 = segmentToken.elt(9)
        self.CR110 = segmentToken.elt(10)

class Segment_CR2(models.Model):
    """Properties(syntax=u'P0102 C0403 P0506',req_sit=u'S',repeat=u'1',pos=u'200',desc=u'Spinal Manipulation Service Information')"""
    segment = models.ForeignKey( X12Segment )
    CR201 = models.CharField( max_length=9, null=True, blank=True ) # (u'N0', u'1', u'9') u'Count'
    CR202 = models.CharField( max_length=15, null=True, blank=True ) # (u'R', u'1', u'15') u'Quantity'
    CR203 = models.CharField( max_length=3, null=True, blank=True ) # (u'ID', u'2', u'3') u'Subluxation Level Code'
    CR204 = models.CharField( max_length=3, null=True, blank=True ) # (u'ID', u'2', u'3') u'Subluxation Level Code'
    CR205 = models.CharField( max_length=2, null=True, blank=True ) # (u'ID', u'2', u'2') u'Unit or Basis for Measurement Code'
    CR206 = models.CharField( max_length=15, null=True, blank=True ) # (u'R', u'1', u'15') u'Quantity'
    CR207 = models.CharField( max_length=15, null=True, blank=True ) # (u'R', u'1', u'15') u'Quantity'
    CR208 = models.CharField( max_length=1 ) # (u'ID', u'1', u'1') u'Nature of Condition Code'
    CR209 = models.CharField( max_length=1, null=True, blank=True ) # (u'ID', u'1', u'1') u'Yes/No Condition or Response Code'
    CR210 = models.CharField( max_length=80, null=True, blank=True ) # (u'AN', u'1', u'80') u'Description'
    CR211 = models.CharField( max_length=80, null=True, blank=True ) # (u'AN', u'1', u'80') u'Description'
    CR212 = models.CharField( max_length=1, null=True, blank=True ) # (u'ID', u'1', u'1') u'Yes/No Condition or Response Code'
    def unmarshall( self, segmentToken, cs=':' ):
        self.CR201 = segmentToken.elt(1)
        self.CR202 = segmentToken.elt(2)
        self.CR203 = segmentToken.elt(3)
        self.CR204 = segmentToken.elt(4)
        self.CR205 = segmentToken.elt(5)
        self.CR206 = segmentToken.elt(6)
        self.CR207 = segmentToken.elt(7)
        self.CR208 = segmentToken.elt(8)
        self.CR209 = segmentToken.elt(9)
        self.CR210 = segmentToken.elt(10)
        self.CR211 = segmentToken.elt(11)
        self.CR212 = segmentToken.elt(12)

class Segment_CRC(models.Model):
    """Properties(syntax='',req_sit=u'S',repeat=u'3',pos=u'220',desc=u'Ambulance Certification')"""
    segment = models.ForeignKey( X12Segment )
    CRC01 = models.CharField( max_length=2 ) # (u'ID', u'2', u'2') u'Code Category'
    CRC02 = models.CharField( max_length=1 ) # (u'ID', u'1', u'1') u'Yes/No Condition or Response Code'
    CRC03 = models.CharField( max_length=2 ) # (u'ID', u'2', u'2') u'Condition Indicator'
    CRC04 = models.CharField( max_length=2, null=True, blank=True ) # (u'ID', u'2', u'2') u'Condition Indicator'
    CRC05 = models.CharField( max_length=2, null=True, blank=True ) # (u'ID', u'2', u'2') u'Condition Indicator'
    CRC06 = models.CharField( max_length=2, null=True, blank=True ) # (u'ID', u'2', u'2') u'Condition Indicator'
    CRC07 = models.CharField( max_length=2, null=True, blank=True ) # (u'ID', u'2', u'2') u'Condition Indicator'
    def unmarshall( self, segmentToken, cs=':' ):
        self.CRC01 = segmentToken.elt(1)
        self.CRC02 = segmentToken.elt(2)
        self.CRC03 = segmentToken.elt(3)
        self.CRC04 = segmentToken.elt(4)
        self.CRC05 = segmentToken.elt(5)
        self.CRC06 = segmentToken.elt(6)
        self.CRC07 = segmentToken.elt(7)

class Segment_HI(models.Model):
    """Properties(syntax='',req_sit=u'S',repeat=u'1',pos=u'231',desc=u'Health Care Diagnosis Code')"""
    segment = models.ForeignKey( X12Segment )
    # <Composite u'C022', Properties(req_sit=u'R',refdes='',seq=u'01',desc=u'Principal Diagnosis'), 
    HI01_01 = models.CharField( max_length=3 ) # (u'ID', u'1', u'3') u'Code List Qualifier Code'
    HI01_02 = models.CharField( max_length=30 ) # (u'AN', u'1', u'30') u'Industry Code'
    HI01_03 = models.CharField( max_length=3, null=True, blank=True ) # (u'ID', u'2', u'3') u'Date Time Period Format Qualifier'
    HI01_04 = models.CharField( max_length=35, null=True, blank=True ) # (u'AN', u'1', u'35') u'Date Time Period'
    HI01_05 = models.CharField( max_length=18, null=True, blank=True ) # (u'R', u'1', u'18') u'Monetary Amount'
    HI01_06 = models.CharField( max_length=15, null=True, blank=True ) # (u'R', u'1', u'15') u'Quantity'
    HI01_07 = models.CharField( max_length=30, null=True, blank=True ) # (u'AN', u'1', u'30') u'Version Identifier'
    # <Composite u'C022', Properties(req_sit=u'S',refdes='',seq=u'02',desc=u'Diagnosis'), 
    HI02_01 = models.CharField( max_length=3 ) # (u'ID', u'1', u'3') u'Code List Qualifier Code'
    HI02_02 = models.CharField( max_length=30 ) # (u'AN', u'1', u'30') u'Industry Code'
    HI02_03 = models.CharField( max_length=3, null=True, blank=True ) # (u'ID', u'2', u'3') u'Date Time Period Format Qualifier'
    HI02_04 = models.CharField( max_length=35, null=True, blank=True ) # (u'AN', u'1', u'35') u'Date Time Period'
    HI02_05 = models.CharField( max_length=18, null=True, blank=True ) # (u'R', u'1', u'18') u'Monetary Amount'
    HI02_06 = models.CharField( max_length=15, null=True, blank=True ) # (u'R', u'1', u'15') u'Quantity'
    HI02_07 = models.CharField( max_length=30, null=True, blank=True ) # (u'AN', u'1', u'30') u'Version Identifier'
    # <Composite u'C022', Properties(req_sit=u'S',refdes='',seq=u'03',desc=u'Diagnosis'), 
    HI03_01 = models.CharField( max_length=3 ) # (u'ID', u'1', u'3') u'Code List Qualifier Code'
    HI03_02 = models.CharField( max_length=30 ) # (u'AN', u'1', u'30') u'Industry Code'
    HI03_03 = models.CharField( max_length=3, null=True, blank=True ) # (u'ID', u'2', u'3') u'Date Time Period Format Qualifier'
    HI03_04 = models.CharField( max_length=35, null=True, blank=True ) # (u'AN', u'1', u'35') u'Date Time Period'
    HI03_05 = models.CharField( max_length=18, null=True, blank=True ) # (u'R', u'1', u'18') u'Monetary Amount'
    HI03_06 = models.CharField( max_length=15, null=True, blank=True ) # (u'R', u'1', u'15') u'Quantity'
    HI03_07 = models.CharField( max_length=30, null=True, blank=True ) # (u'AN', u'1', u'30') u'Version Identifier'
    # <Composite u'C022', Properties(req_sit=u'S',refdes='',seq=u'04',desc=u'Diagnosis'), 
    HI04_01 = models.CharField( max_length=3 ) # (u'ID', u'1', u'3') u'Code List Qualifier Code'
    HI04_02 = models.CharField( max_length=30 ) # (u'AN', u'1', u'30') u'Industry Code'
    HI04_03 = models.CharField( max_length=3, null=True, blank=True ) # (u'ID', u'2', u'3') u'Date Time Period Format Qualifier'
    HI04_04 = models.CharField( max_length=35, null=True, blank=True ) # (u'AN', u'1', u'35') u'Date Time Period'
    HI04_05 = models.CharField( max_length=18, null=True, blank=True ) # (u'R', u'1', u'18') u'Monetary Amount'
    HI04_06 = models.CharField( max_length=15, null=True, blank=True ) # (u'R', u'1', u'15') u'Quantity'
    HI04_07 = models.CharField( max_length=30, null=True, blank=True ) # (u'AN', u'1', u'30') u'Version Identifier'
    # <Composite u'C022', Properties(req_sit=u'S',refdes='',seq=u'05',desc=u'Diagnosis'), 
    HI05_01 = models.CharField( max_length=3 ) # (u'ID', u'1', u'3') u'Code List Qualifier Code'
    HI05_02 = models.CharField( max_length=30 ) # (u'AN', u'1', u'30') u'Industry Code'
    HI05_03 = models.CharField( max_length=3, null=True, blank=True ) # (u'ID', u'2', u'3') u'Date Time Period Format Qualifier'
    HI05_04 = models.CharField( max_length=35, null=True, blank=True ) # (u'AN', u'1', u'35') u'Date Time Period'
    HI05_05 = models.CharField( max_length=18, null=True, blank=True ) # (u'R', u'1', u'18') u'Monetary Amount'
    HI05_06 = models.CharField( max_length=15, null=True, blank=True ) # (u'R', u'1', u'15') u'Quantity'
    HI05_07 = models.CharField( max_length=30, null=True, blank=True ) # (u'AN', u'1', u'30') u'Version Identifier'
    # <Composite u'C022', Properties(req_sit=u'S',refdes='',seq=u'06',desc=u'Diagnosis'), 
    HI06_01 = models.CharField( max_length=3 ) # (u'ID', u'1', u'3') u'Code List Qualifier Code'
    HI06_02 = models.CharField( max_length=30 ) # (u'AN', u'1', u'30') u'Industry Code'
    HI06_03 = models.CharField( max_length=3, null=True, blank=True ) # (u'ID', u'2', u'3') u'Date Time Period Format Qualifier'
    HI06_04 = models.CharField( max_length=35, null=True, blank=True ) # (u'AN', u'1', u'35') u'Date Time Period'
    HI06_05 = models.CharField( max_length=18, null=True, blank=True ) # (u'R', u'1', u'18') u'Monetary Amount'
    HI06_06 = models.CharField( max_length=15, null=True, blank=True ) # (u'R', u'1', u'15') u'Quantity'
    HI06_07 = models.CharField( max_length=30, null=True, blank=True ) # (u'AN', u'1', u'30') u'Version Identifier'
    # <Composite u'C022', Properties(req_sit=u'S',refdes='',seq=u'07',desc=u'Diagnosis'), 
    HI07_01 = models.CharField( max_length=3 ) # (u'ID', u'1', u'3') u'Code List Qualifier Code'
    HI07_02 = models.CharField( max_length=30 ) # (u'AN', u'1', u'30') u'Industry Code'
    HI07_03 = models.CharField( max_length=3, null=True, blank=True ) # (u'ID', u'2', u'3') u'Date Time Period Format Qualifier'
    HI07_04 = models.CharField( max_length=35, null=True, blank=True ) # (u'AN', u'1', u'35') u'Date Time Period'
    HI07_05 = models.CharField( max_length=18, null=True, blank=True ) # (u'R', u'1', u'18') u'Monetary Amount'
    HI07_06 = models.CharField( max_length=15, null=True, blank=True ) # (u'R', u'1', u'15') u'Quantity'
    HI07_07 = models.CharField( max_length=30, null=True, blank=True ) # (u'AN', u'1', u'30') u'Version Identifier'
    # <Composite u'C022', Properties(req_sit=u'S',refdes='',seq=u'08',desc=u'Diagnosis'), 
    HI08_01 = models.CharField( max_length=3 ) # (u'ID', u'1', u'3') u'Code List Qualifier Code'
    HI08_02 = models.CharField( max_length=30 ) # (u'AN', u'1', u'30') u'Industry Code'
    HI08_03 = models.CharField( max_length=3, null=True, blank=True ) # (u'ID', u'2', u'3') u'Date Time Period Format Qualifier'
    HI08_04 = models.CharField( max_length=35, null=True, blank=True ) # (u'AN', u'1', u'35') u'Date Time Period'
    HI08_05 = models.CharField( max_length=18, null=True, blank=True ) # (u'R', u'1', u'18') u'Monetary Amount'
    HI08_06 = models.CharField( max_length=15, null=True, blank=True ) # (u'R', u'1', u'15') u'Quantity'
    HI08_07 = models.CharField( max_length=30, null=True, blank=True ) # (u'AN', u'1', u'30') u'Version Identifier'
    # <Composite u'C022', Properties(req_sit=u'N',refdes=u'HI09',seq=u'09',desc=u'Health Care Code Information'), 
    # <Composite u'C022', Properties(req_sit=u'N',refdes=u'HI10',seq=u'10',desc=u'Health Care Code Information'), 
    # <Composite u'C022', Properties(req_sit=u'N',refdes=u'HI11',seq=u'11',desc=u'Health Care Code Information'), 
    # <Composite u'C022', Properties(req_sit=u'N',refdes=u'HI12',seq=u'12',desc=u'Health Care Code Information'), 
    def unmarshall( self, segmentToken, cs=':' ):
        # composite= segmentToken[1].split(cs)
        self.HI01_01 = segmentToken.subElt(1,cs,0)
        self.HI01_02 = segmentToken.subElt(1,cs,1)
        self.HI01_03 = segmentToken.subElt(1,cs,2)
        self.HI01_04 = segmentToken.subElt(1,cs,3)
        self.HI01_05 = segmentToken.subElt(1,cs,4)
        self.HI01_06 = segmentToken.subElt(1,cs,5)
        self.HI01_07 = segmentToken.subElt(1,cs,6)
        # composite= segmentToken[2].split(cs)
        self.HI02_01 = segmentToken.subElt(2,cs,0)
        self.HI02_02 = segmentToken.subElt(2,cs,1)
        self.HI02_03 = segmentToken.subElt(2,cs,2)
        self.HI02_04 = segmentToken.subElt(2,cs,3)
        self.HI02_05 = segmentToken.subElt(2,cs,4)
        self.HI02_06 = segmentToken.subElt(2,cs,5)
        self.HI02_07 = segmentToken.subElt(2,cs,6)
        # composite= segmentToken[3].split(cs)
        self.HI03_01 = segmentToken.subElt(3,cs,0)
        self.HI03_02 = segmentToken.subElt(3,cs,1)
        self.HI03_03 = segmentToken.subElt(3,cs,2)
        self.HI03_04 = segmentToken.subElt(3,cs,3)
        self.HI03_05 = segmentToken.subElt(3,cs,4)
        self.HI03_06 = segmentToken.subElt(3,cs,5)
        self.HI03_07 = segmentToken.subElt(3,cs,6)
        # composite= segmentToken[4].split(cs)
        self.HI04_01 = segmentToken.subElt(4,cs,0)
        self.HI04_02 = segmentToken.subElt(4,cs,1)
        self.HI04_03 = segmentToken.subElt(4,cs,2)
        self.HI04_04 = segmentToken.subElt(4,cs,3)
        self.HI04_05 = segmentToken.subElt(4,cs,4)
        self.HI04_06 = segmentToken.subElt(4,cs,5)
        self.HI04_07 = segmentToken.subElt(4,cs,6)
        # composite= segmentToken[5].split(cs)
        self.HI05_01 = segmentToken.subElt(5,cs,0)
        self.HI05_02 = segmentToken.subElt(5,cs,1)
        self.HI05_03 = segmentToken.subElt(5,cs,2)
        self.HI05_04 = segmentToken.subElt(5,cs,3)
        self.HI05_05 = segmentToken.subElt(5,cs,4)
        self.HI05_06 = segmentToken.subElt(5,cs,5)
        self.HI05_07 = segmentToken.subElt(5,cs,6)
        # composite= segmentToken[6].split(cs)
        self.HI06_01 = segmentToken.subElt(6,cs,0)
        self.HI06_02 = segmentToken.subElt(6,cs,1)
        self.HI06_03 = segmentToken.subElt(6,cs,2)
        self.HI06_04 = segmentToken.subElt(6,cs,3)
        self.HI06_05 = segmentToken.subElt(6,cs,4)
        self.HI06_06 = segmentToken.subElt(6,cs,5)
        self.HI06_07 = segmentToken.subElt(6,cs,6)
        # composite= segmentToken[7].split(cs)
        self.HI07_01 = segmentToken.subElt(7,cs,0)
        self.HI07_02 = segmentToken.subElt(7,cs,1)
        self.HI07_03 = segmentToken.subElt(7,cs,2)
        self.HI07_04 = segmentToken.subElt(7,cs,3)
        self.HI07_05 = segmentToken.subElt(7,cs,4)
        self.HI07_06 = segmentToken.subElt(7,cs,5)
        self.HI07_07 = segmentToken.subElt(7,cs,6)
        # composite= segmentToken[8].split(cs)
        self.HI08_01 = segmentToken.subElt(8,cs,0)
        self.HI08_02 = segmentToken.subElt(8,cs,1)
        self.HI08_03 = segmentToken.subElt(8,cs,2)
        self.HI08_04 = segmentToken.subElt(8,cs,3)
        self.HI08_05 = segmentToken.subElt(8,cs,4)
        self.HI08_06 = segmentToken.subElt(8,cs,5)
        self.HI08_07 = segmentToken.subElt(8,cs,6)
        self.C022 = segmentToken.elt(9)
        self.C022 = segmentToken.elt(10)
        self.C022 = segmentToken.elt(11)
        self.C022 = segmentToken.elt(12)

class Segment_HCP(models.Model):
    """Properties(syntax=u'R0113 P0910 P1112',req_sit=u'S',repeat=u'1',pos=u'241',desc=u'Claim Pricing/Repricing Information')"""
    segment = models.ForeignKey( X12Segment )
    HCP01 = models.CharField( max_length=2 ) # (u'ID', u'2', u'2') u'Pricing Methodology'
    HCP02 = models.CharField( max_length=18 ) # (u'R', u'1', u'18') u'Monetary Amount'
    HCP03 = models.CharField( max_length=18, null=True, blank=True ) # (u'R', u'1', u'18') u'Monetary Amount'
    HCP04 = models.CharField( max_length=30, null=True, blank=True ) # (u'AN', u'1', u'30') u'Reference Identification'
    HCP05 = models.CharField( max_length=9, null=True, blank=True ) # (u'R', u'1', u'9') u'Rate'
    HCP06 = models.CharField( max_length=30, null=True, blank=True ) # (u'AN', u'1', u'30') u'Reference Identification'
    HCP07 = models.CharField( max_length=18, null=True, blank=True ) # (u'R', u'1', u'18') u'Monetary Amount'
    HCP08 = models.CharField( max_length=48, null=True, blank=True ) # (u'AN', u'1', u'48') u'Product/Service ID'
    HCP09 = models.CharField( max_length=2, null=True, blank=True ) # (u'ID', u'2', u'2') u'Product/Service ID Qualifier'
    HCP10 = models.CharField( max_length=48, null=True, blank=True ) # (u'AN', u'1', u'48') u'Product/Service ID'
    HCP11 = models.CharField( max_length=2, null=True, blank=True ) # (u'ID', u'2', u'2') u'Unit or Basis for Measurement Code'
    HCP12 = models.CharField( max_length=15, null=True, blank=True ) # (u'R', u'1', u'15') u'Quantity'
    HCP13 = models.CharField( max_length=2, null=True, blank=True ) # (u'ID', u'2', u'2') u'Reject Reason Code'
    HCP14 = models.CharField( max_length=2, null=True, blank=True ) # (u'ID', u'1', u'2') u'Policy Compliance Code'
    HCP15 = models.CharField( max_length=2, null=True, blank=True ) # (u'ID', u'1', u'2') u'Exception Code'
    def unmarshall( self, segmentToken, cs=':' ):
        self.HCP01 = segmentToken.elt(1)
        self.HCP02 = segmentToken.elt(2)
        self.HCP03 = segmentToken.elt(3)
        self.HCP04 = segmentToken.elt(4)
        self.HCP05 = segmentToken.elt(5)
        self.HCP06 = segmentToken.elt(6)
        self.HCP07 = segmentToken.elt(7)
        self.HCP08 = segmentToken.elt(8)
        self.HCP09 = segmentToken.elt(9)
        self.HCP10 = segmentToken.elt(10)
        self.HCP11 = segmentToken.elt(11)
        self.HCP12 = segmentToken.elt(12)
        self.HCP13 = segmentToken.elt(13)
        self.HCP14 = segmentToken.elt(14)
        self.HCP15 = segmentToken.elt(15)

class Segment_CR7(models.Model):
    """Properties(syntax='',req_sit=u'R',repeat=u'1',pos=u'242',desc=u'Home Health Care Plan Information')"""
    segment = models.ForeignKey( X12Segment )
    CR701 = models.CharField( max_length=2 ) # (u'ID', u'2', u'2') u'Discipline Type Code'
    CR702 = models.CharField( max_length=9 ) # (u'N0', u'1', u'9') u'Number'
    CR703 = models.CharField( max_length=9 ) # (u'N0', u'1', u'9') u'Number'
    def unmarshall( self, segmentToken, cs=':' ):
        self.CR701 = segmentToken.elt(1)
        self.CR702 = segmentToken.elt(2)
        self.CR703 = segmentToken.elt(3)

class Segment_HSD(models.Model):
    """Properties(syntax=u'P0102 C0605',req_sit=u'S',repeat=u'3',pos=u'243',desc=u'Health Care Services Delivery')"""
    segment = models.ForeignKey( X12Segment )
    HSD01 = models.CharField( max_length=2, null=True, blank=True ) # (u'ID', u'2', u'2') u'Quantity Qualifier'
    HSD02 = models.CharField( max_length=15, null=True, blank=True ) # (u'R', u'1', u'15') u'Quantity'
    HSD03 = models.CharField( max_length=2, null=True, blank=True ) # (u'ID', u'2', u'2') u'Unit or Basis for Measurement Code'
    HSD04 = models.CharField( max_length=6, null=True, blank=True ) # (u'R', u'1', u'6') u'Sample Selection Modulus'
    HSD05 = models.CharField( max_length=2, null=True, blank=True ) # (u'ID', u'1', u'2') u'Time Period Qualifier'
    HSD06 = models.CharField( max_length=3, null=True, blank=True ) # (u'N0', u'1', u'3') u'Number of Periods'
    HSD07 = models.CharField( max_length=2, null=True, blank=True ) # (u'ID', u'1', u'2') u'Ship/Delivery or Calendar Pattern Code'
    HSD08 = models.CharField( max_length=1, null=True, blank=True ) # (u'ID', u'1', u'1') u'Ship/Delivery Pattern Time Code'
    def unmarshall( self, segmentToken, cs=':' ):
        self.HSD01 = segmentToken.elt(1)
        self.HSD02 = segmentToken.elt(2)
        self.HSD03 = segmentToken.elt(3)
        self.HSD04 = segmentToken.elt(4)
        self.HSD05 = segmentToken.elt(5)
        self.HSD06 = segmentToken.elt(6)
        self.HSD07 = segmentToken.elt(7)
        self.HSD08 = segmentToken.elt(8)

class Segment_CAS(models.Model):
    """Properties(syntax=u'L050607 C0605 C0705 L080910 C0908 C1008 L111213 C1211 C1311 L141516 C1514 C1614 L171819 C1817 C1917',req_sit=u'S',repeat=u'5',pos=u'295',desc=u'Claim Level Adjustments')"""
    segment = models.ForeignKey( X12Segment )
    CAS01 = models.CharField( max_length=2 ) # (u'ID', u'1', u'2') u'Claim Adjustment Group Code'
    CAS02 = models.CharField( max_length=5 ) # (u'ID', u'1', u'5') u'Claim Adjustment Reason Code'
    CAS03 = models.CharField( max_length=18 ) # (u'R', u'1', u'18') u'Monetary Amount'
    CAS04 = models.CharField( max_length=15, null=True, blank=True ) # (u'R', u'1', u'15') u'Quantity'
    CAS05 = models.CharField( max_length=5, null=True, blank=True ) # (u'ID', u'1', u'5') u'Claim Adjustment Reason Code'
    CAS06 = models.CharField( max_length=18, null=True, blank=True ) # (u'R', u'1', u'18') u'Monetary Amount'
    CAS07 = models.CharField( max_length=15, null=True, blank=True ) # (u'R', u'1', u'15') u'Quantity'
    CAS08 = models.CharField( max_length=5, null=True, blank=True ) # (u'ID', u'1', u'5') u'Claim Adjustment Reason Code'
    CAS09 = models.CharField( max_length=18, null=True, blank=True ) # (u'R', u'1', u'18') u'Monetary Amount'
    CAS10 = models.CharField( max_length=15, null=True, blank=True ) # (u'R', u'1', u'15') u'Quantity'
    CAS11 = models.CharField( max_length=5, null=True, blank=True ) # (u'ID', u'1', u'5') u'Claim Adjustment Reason Code'
    CAS12 = models.CharField( max_length=18, null=True, blank=True ) # (u'R', u'1', u'18') u'Monetary Amount'
    CAS13 = models.CharField( max_length=15, null=True, blank=True ) # (u'R', u'1', u'15') u'Quantity'
    CAS14 = models.CharField( max_length=5, null=True, blank=True ) # (u'ID', u'1', u'5') u'Claim Adjustment Reason Code'
    CAS15 = models.CharField( max_length=18, null=True, blank=True ) # (u'R', u'1', u'18') u'Monetary Amount'
    CAS16 = models.CharField( max_length=15, null=True, blank=True ) # (u'R', u'1', u'15') u'Quantity'
    CAS17 = models.CharField( max_length=5, null=True, blank=True ) # (u'ID', u'1', u'5') u'Claim Adjustment Reason Code'
    CAS18 = models.CharField( max_length=18, null=True, blank=True ) # (u'R', u'1', u'18') u'Monetary Amount'
    CAS19 = models.CharField( max_length=15, null=True, blank=True ) # (u'R', u'1', u'15') u'Quantity'
    def unmarshall( self, segmentToken, cs=':' ):
        self.CAS01 = segmentToken.elt(1)
        self.CAS02 = segmentToken.elt(2)
        self.CAS03 = segmentToken.elt(3)
        self.CAS04 = segmentToken.elt(4)
        self.CAS05 = segmentToken.elt(5)
        self.CAS06 = segmentToken.elt(6)
        self.CAS07 = segmentToken.elt(7)
        self.CAS08 = segmentToken.elt(8)
        self.CAS09 = segmentToken.elt(9)
        self.CAS10 = segmentToken.elt(10)
        self.CAS11 = segmentToken.elt(11)
        self.CAS12 = segmentToken.elt(12)
        self.CAS13 = segmentToken.elt(13)
        self.CAS14 = segmentToken.elt(14)
        self.CAS15 = segmentToken.elt(15)
        self.CAS16 = segmentToken.elt(16)
        self.CAS17 = segmentToken.elt(17)
        self.CAS18 = segmentToken.elt(18)
        self.CAS19 = segmentToken.elt(19)

class Segment_OI(models.Model):
    """Properties(syntax='',req_sit=u'R',repeat=u'1',pos=u'310',desc=u'Other Insurance Coverage Information')"""
    segment = models.ForeignKey( X12Segment )
    OI01 = models.CharField( max_length=2, null=True, blank=True ) # (u'ID', u'1', u'2') u'Claim Filing Indicator Code'
    OI02 = models.CharField( max_length=2, null=True, blank=True ) # (u'ID', u'2', u'2') u'Claim Submission Reason Code'
    OI03 = models.CharField( max_length=1 ) # (u'ID', u'1', u'1') u'Yes/No Condition or Response Code'
    OI04 = models.CharField( max_length=1, null=True, blank=True ) # (u'ID', u'1', u'1') u'Patient Signature Source Code'
    OI05 = models.CharField( max_length=1, null=True, blank=True ) # (u'ID', u'1', u'1') u'Provider Agreement Code'
    OI06 = models.CharField( max_length=1 ) # (u'ID', u'1', u'1') u'Release of Information Code'
    def unmarshall( self, segmentToken, cs=':' ):
        self.OI01 = segmentToken.elt(1)
        self.OI02 = segmentToken.elt(2)
        self.OI03 = segmentToken.elt(3)
        self.OI04 = segmentToken.elt(4)
        self.OI05 = segmentToken.elt(5)
        self.OI06 = segmentToken.elt(6)

class Segment_MOA(models.Model):
    """Properties(syntax='',req_sit=u'S',repeat=u'1',pos=u'320',desc=u'Medicare Outpatient Adjudication Information')"""
    segment = models.ForeignKey( X12Segment )
    MOA01 = models.CharField( max_length=10, null=True, blank=True ) # (u'R', u'1', u'10') u'Percent'
    MOA02 = models.CharField( max_length=18, null=True, blank=True ) # (u'R', u'1', u'18') u'Monetary Amount'
    MOA03 = models.CharField( max_length=30, null=True, blank=True ) # (u'AN', u'1', u'30') u'Reference Identification'
    MOA04 = models.CharField( max_length=30, null=True, blank=True ) # (u'AN', u'1', u'30') u'Reference Identification'
    MOA05 = models.CharField( max_length=30, null=True, blank=True ) # (u'AN', u'1', u'30') u'Reference Identification'
    MOA06 = models.CharField( max_length=30, null=True, blank=True ) # (u'AN', u'1', u'30') u'Reference Identification'
    MOA07 = models.CharField( max_length=30, null=True, blank=True ) # (u'AN', u'1', u'30') u'Reference Identification'
    MOA08 = models.CharField( max_length=18, null=True, blank=True ) # (u'R', u'1', u'18') u'Monetary Amount'
    MOA09 = models.CharField( max_length=18, null=True, blank=True ) # (u'R', u'1', u'18') u'Monetary Amount'
    def unmarshall( self, segmentToken, cs=':' ):
        self.MOA01 = segmentToken.elt(1)
        self.MOA02 = segmentToken.elt(2)
        self.MOA03 = segmentToken.elt(3)
        self.MOA04 = segmentToken.elt(4)
        self.MOA05 = segmentToken.elt(5)
        self.MOA06 = segmentToken.elt(6)
        self.MOA07 = segmentToken.elt(7)
        self.MOA08 = segmentToken.elt(8)
        self.MOA09 = segmentToken.elt(9)

class Segment_LX(models.Model):
    """Properties(syntax='',req_sit=u'R',repeat=u'1',pos=u'365',desc=u'Service Line')"""
    segment = models.ForeignKey( X12Segment )
    LX01 = models.CharField( max_length=6 ) # (u'N0', u'1', u'6') u'Assigned Number'
    def unmarshall( self, segmentToken, cs=':' ):
        self.LX01 = segmentToken.elt(1)

class Segment_SV1(models.Model):
    """Properties(syntax=u'P0304',req_sit=u'R',repeat=u'1',pos=u'370',desc=u'Professional Service')"""
    segment = models.ForeignKey( X12Segment )
    # <Composite u'C003', Properties(req_sit=u'R',refdes='',seq=u'01',desc=u'Procedure Identifier'), 
    SV101_01 = models.CharField( max_length=2 ) # (u'ID', u'2', u'2') u'Product/Service ID Qualifier'
    SV101_02 = models.CharField( max_length=48 ) # (u'AN', u'1', u'48') u'Product/Service ID'
    SV101_03 = models.CharField( max_length=2, null=True, blank=True ) # (u'AN', u'2', u'2') u'Procedure Modifier'
    SV101_04 = models.CharField( max_length=2, null=True, blank=True ) # (u'AN', u'2', u'2') u'Procedure Modifier'
    SV101_05 = models.CharField( max_length=2, null=True, blank=True ) # (u'AN', u'2', u'2') u'Procedure Modifier'
    SV101_06 = models.CharField( max_length=2, null=True, blank=True ) # (u'AN', u'2', u'2') u'Procedure Modifier'
    SV101_07 = models.CharField( max_length=80, null=True, blank=True ) # (u'AN', u'1', u'80') u'Description'
    SV102 = models.CharField( max_length=18 ) # (u'R', u'1', u'18') u'Monetary Amount'
    SV103 = models.CharField( max_length=2 ) # (u'ID', u'2', u'2') u'Unit or Basis for Measurement Code'
    SV104 = models.CharField( max_length=15 ) # (u'R', u'1', u'15') u'Quantity'
    SV105 = models.CharField( max_length=2, null=True, blank=True ) # (u'AN', u'1', u'2') u'Facility Code Value'
    SV106 = models.CharField( max_length=2, null=True, blank=True ) # (u'ID', u'1', u'2') u'Service Type Code'
    # <Composite u'C004', Properties(req_sit=u'S',refdes='',seq=u'07',desc=u'Diagnosis Code Pointer'), 
    SV107_01 = models.CharField( max_length=2 ) # (u'N0', u'1', u'2') u'Diagnosis Code Pointer'
    SV107_02 = models.CharField( max_length=2, null=True, blank=True ) # (u'N0', u'1', u'2') u'Diagnosis Code Pointer'
    SV107_03 = models.CharField( max_length=2, null=True, blank=True ) # (u'N0', u'1', u'2') u'Diagnosis Code Pointer'
    SV107_04 = models.CharField( max_length=2, null=True, blank=True ) # (u'N0', u'1', u'2') u'Diagnosis Code Pointer'
    SV108 = models.CharField( max_length=18, null=True, blank=True ) # (u'R', u'1', u'18') u'Monetary Amount'
    SV109 = models.CharField( max_length=1, null=True, blank=True ) # (u'ID', u'1', u'1') u'Yes/No Condition or Response Code'
    SV110 = models.CharField( max_length=2, null=True, blank=True ) # (u'ID', u'1', u'2') u'Multiple Procedure Code'
    SV111 = models.CharField( max_length=1, null=True, blank=True ) # (u'ID', u'1', u'1') u'Yes/No Condition or Response Code'
    SV112 = models.CharField( max_length=1, null=True, blank=True ) # (u'ID', u'1', u'1') u'Yes/No Condition or Response Code'
    SV113 = models.CharField( max_length=2, null=True, blank=True ) # (u'ID', u'1', u'2') u'Review Code'
    SV114 = models.CharField( max_length=2, null=True, blank=True ) # (u'AN', u'1', u'2') u'National or Local Assigned Review Value'
    SV115 = models.CharField( max_length=1, null=True, blank=True ) # (u'ID', u'1', u'1') u'Copay Status Code'
    SV116 = models.CharField( max_length=1, null=True, blank=True ) # (u'ID', u'1', u'1') u'Health Care Professional Shortage Area Code'
    SV117 = models.CharField( max_length=30, null=True, blank=True ) # (u'AN', u'1', u'30') u'Reference Identification'
    SV118 = models.CharField( max_length=15, null=True, blank=True ) # (u'ID', u'3', u'15') u'Postal Code'
    SV119 = models.CharField( max_length=18, null=True, blank=True ) # (u'R', u'1', u'18') u'Monetary Amount'
    SV120 = models.CharField( max_length=1, null=True, blank=True ) # (u'ID', u'1', u'1') u'Level of Care Code'
    SV121 = models.CharField( max_length=1, null=True, blank=True ) # (u'ID', u'1', u'1') u'Provider Agreement Code'
    def unmarshall( self, segmentToken, cs=':' ):
        # composite= segmentToken[1].split(cs)
        self.SV101_01 = segmentToken.subElt(1,cs,0)
        self.SV101_02 = segmentToken.subElt(1,cs,1)
        self.SV101_03 = segmentToken.subElt(1,cs,2)
        self.SV101_04 = segmentToken.subElt(1,cs,3)
        self.SV101_05 = segmentToken.subElt(1,cs,4)
        self.SV101_06 = segmentToken.subElt(1,cs,5)
        self.SV101_07 = segmentToken.subElt(1,cs,6)
        self.SV102 = segmentToken.elt(2)
        self.SV103 = segmentToken.elt(3)
        self.SV104 = segmentToken.elt(4)
        self.SV105 = segmentToken.elt(5)
        self.SV106 = segmentToken.elt(6)
        # composite= segmentToken[7].split(cs)
        self.SV107_01 = segmentToken.subElt(7,cs,0)
        self.SV107_02 = segmentToken.subElt(7,cs,1)
        self.SV107_03 = segmentToken.subElt(7,cs,2)
        self.SV107_04 = segmentToken.subElt(7,cs,3)
        self.SV108 = segmentToken.elt(8)
        self.SV109 = segmentToken.elt(9)
        self.SV110 = segmentToken.elt(10)
        self.SV111 = segmentToken.elt(11)
        self.SV112 = segmentToken.elt(12)
        self.SV113 = segmentToken.elt(13)
        self.SV114 = segmentToken.elt(14)
        self.SV115 = segmentToken.elt(15)
        self.SV116 = segmentToken.elt(16)
        self.SV117 = segmentToken.elt(17)
        self.SV118 = segmentToken.elt(18)
        self.SV119 = segmentToken.elt(19)
        self.SV120 = segmentToken.elt(20)
        self.SV121 = segmentToken.elt(21)

class Segment_SV5(models.Model):
    """Properties(syntax='',req_sit=u'S',repeat=u'1',pos=u'400',desc=u'Durable Medical Equipment Service')"""
    segment = models.ForeignKey( X12Segment )
    # <Composite u'C003', Properties(req_sit=u'R',refdes='',seq=u'01',desc=u'Composite Medical Procedure Identifier'), 
    SV501_01 = models.CharField( max_length=2 ) # (u'ID', u'2', u'2') u'Product/Service ID Qualifier'
    SV501_02 = models.CharField( max_length=48 ) # (u'AN', u'1', u'48') u'Product/Service ID'
    SV501_03 = models.CharField( max_length=2, null=True, blank=True ) # (u'AN', u'2', u'2') u'Procedure Modifier'
    SV501_04 = models.CharField( max_length=2, null=True, blank=True ) # (u'AN', u'2', u'2') u'Procedure Modifier'
    SV501_05 = models.CharField( max_length=2, null=True, blank=True ) # (u'AN', u'2', u'2') u'Procedure Modifier'
    SV501_06 = models.CharField( max_length=2, null=True, blank=True ) # (u'AN', u'2', u'2') u'Procedure Modifier'
    SV501_07 = models.CharField( max_length=80, null=True, blank=True ) # (u'AN', u'1', u'80') u'Description'
    SV502 = models.CharField( max_length=2 ) # (u'ID', u'2', u'2') u'Unit or Basis for Measurement Code'
    SV503 = models.CharField( max_length=15 ) # (u'R', u'1', u'15') u'Quantity'
    SV504 = models.CharField( max_length=18, null=True, blank=True ) # (u'R', u'1', u'18') u'Monetary Amount'
    SV505 = models.CharField( max_length=18, null=True, blank=True ) # (u'R', u'1', u'18') u'Monetary Amount'
    SV506 = models.CharField( max_length=1, null=True, blank=True ) # (u'ID', u'1', u'1') u'Frequency Code'
    SV507 = models.CharField( max_length=1, null=True, blank=True ) # (u'ID', u'1', u'1') u'Prognosis Code'
    def unmarshall( self, segmentToken, cs=':' ):
        # composite= segmentToken[1].split(cs)
        self.SV501_01 = segmentToken.subElt(1,cs,0)
        self.SV501_02 = segmentToken.subElt(1,cs,1)
        self.SV501_03 = segmentToken.subElt(1,cs,2)
        self.SV501_04 = segmentToken.subElt(1,cs,3)
        self.SV501_05 = segmentToken.subElt(1,cs,4)
        self.SV501_06 = segmentToken.subElt(1,cs,5)
        self.SV501_07 = segmentToken.subElt(1,cs,6)
        self.SV502 = segmentToken.elt(2)
        self.SV503 = segmentToken.elt(3)
        self.SV504 = segmentToken.elt(4)
        self.SV505 = segmentToken.elt(5)
        self.SV506 = segmentToken.elt(6)
        self.SV507 = segmentToken.elt(7)

class Segment_CR3(models.Model):
    """Properties(syntax=u'P0203',req_sit=u'S',repeat=u'1',pos=u'435',desc=u'Durable Medical Equipment Certification')"""
    segment = models.ForeignKey( X12Segment )
    CR301 = models.CharField( max_length=1 ) # (u'ID', u'1', u'1') u'Certification Type Code'
    CR302 = models.CharField( max_length=2 ) # (u'ID', u'2', u'2') u'Unit or Basis for Measurement Code'
    CR303 = models.CharField( max_length=15 ) # (u'R', u'1', u'15') u'Quantity'
    CR304 = models.CharField( max_length=1, null=True, blank=True ) # (u'ID', u'1', u'1') u'Insulin Dependent Code'
    CR305 = models.CharField( max_length=80, null=True, blank=True ) # (u'AN', u'1', u'80') u'Description'
    def unmarshall( self, segmentToken, cs=':' ):
        self.CR301 = segmentToken.elt(1)
        self.CR302 = segmentToken.elt(2)
        self.CR303 = segmentToken.elt(3)
        self.CR304 = segmentToken.elt(4)
        self.CR305 = segmentToken.elt(5)

class Segment_CR5(models.Model):
    """Properties(syntax='',req_sit=u'S',repeat=u'1',pos=u'445',desc=u'Home Oxygen Therapy Information')"""
    segment = models.ForeignKey( X12Segment )
    CR501 = models.CharField( max_length=1 ) # (u'ID', u'1', u'1') u'Certification Type Code'
    CR502 = models.CharField( max_length=15 ) # (u'R', u'1', u'15') u'Quantity'
    CR503 = models.CharField( max_length=1, null=True, blank=True ) # (u'ID', u'1', u'1') u'Oxygen Equipment Type Code'
    CR504 = models.CharField( max_length=1, null=True, blank=True ) # (u'ID', u'1', u'1') u'Oxygen Equipment Type Code'
    CR505 = models.CharField( max_length=80, null=True, blank=True ) # (u'AN', u'1', u'80') u'Description'
    CR506 = models.CharField( max_length=15, null=True, blank=True ) # (u'R', u'1', u'15') u'Quantity'
    CR507 = models.CharField( max_length=15, null=True, blank=True ) # (u'R', u'1', u'15') u'Quantity'
    CR508 = models.CharField( max_length=15, null=True, blank=True ) # (u'R', u'1', u'15') u'Quantity'
    CR509 = models.CharField( max_length=80, null=True, blank=True ) # (u'AN', u'1', u'80') u'Description'
    CR510 = models.CharField( max_length=15, null=True, blank=True ) # (u'R', u'1', u'15') u'Quantity'
    CR511 = models.CharField( max_length=15, null=True, blank=True ) # (u'R', u'1', u'15') u'Quantity'
    CR512 = models.CharField( max_length=1 ) # (u'ID', u'1', u'1') u'Oxygen Test Condition Code'
    CR513 = models.CharField( max_length=1, null=True, blank=True ) # (u'ID', u'1', u'1') u'Oxygen Test Findings Code'
    CR514 = models.CharField( max_length=1, null=True, blank=True ) # (u'ID', u'1', u'1') u'Oxygen Test Findings Code'
    CR515 = models.CharField( max_length=1, null=True, blank=True ) # (u'ID', u'1', u'1') u'Oxygen Test Findings Code'
    CR516 = models.CharField( max_length=15, null=True, blank=True ) # (u'R', u'1', u'15') u'Quantity'
    CR517 = models.CharField( max_length=1, null=True, blank=True ) # (u'ID', u'1', u'1') u'Oxygen Delivery System Code'
    CR518 = models.CharField( max_length=1, null=True, blank=True ) # (u'ID', u'1', u'1') u'Oxygen Equipment Type Code'
    def unmarshall( self, segmentToken, cs=':' ):
        self.CR501 = segmentToken.elt(1)
        self.CR502 = segmentToken.elt(2)
        self.CR503 = segmentToken.elt(3)
        self.CR504 = segmentToken.elt(4)
        self.CR505 = segmentToken.elt(5)
        self.CR506 = segmentToken.elt(6)
        self.CR507 = segmentToken.elt(7)
        self.CR508 = segmentToken.elt(8)
        self.CR509 = segmentToken.elt(9)
        self.CR510 = segmentToken.elt(10)
        self.CR511 = segmentToken.elt(11)
        self.CR512 = segmentToken.elt(12)
        self.CR513 = segmentToken.elt(13)
        self.CR514 = segmentToken.elt(14)
        self.CR515 = segmentToken.elt(15)
        self.CR516 = segmentToken.elt(16)
        self.CR517 = segmentToken.elt(17)
        self.CR518 = segmentToken.elt(18)

class Segment_MEA(models.Model):
    """Properties(syntax=u'R03050608 C0504 C0604 L07030506 E0803',req_sit=u'S',repeat=u'20',pos=u'462',desc=u'Test Result')"""
    segment = models.ForeignKey( X12Segment )
    MEA01 = models.CharField( max_length=2 ) # (u'ID', u'2', u'2') u'Measurement Reference ID Code'
    MEA02 = models.CharField( max_length=3 ) # (u'ID', u'1', u'3') u'Measurement Qualifier'
    MEA03 = models.CharField( max_length=20 ) # (u'R', u'1', u'20') u'Measurement Value'
    # <Composite u'C001', Properties(req_sit=u'N',refdes='',seq=u'04',desc=u'Composite Unit of Measure'), 
    MEA05 = models.CharField( max_length=20, null=True, blank=True ) # (u'R', u'1', u'20') u'Range Minimum'
    MEA06 = models.CharField( max_length=20, null=True, blank=True ) # (u'R', u'1', u'20') u'Range Maximum'
    MEA07 = models.CharField( max_length=2, null=True, blank=True ) # (u'ID', u'2', u'2') u'Measurement Significance Code'
    MEA08 = models.CharField( max_length=2, null=True, blank=True ) # (u'ID', u'2', u'2') u'Measurement Attribute Code'
    MEA09 = models.CharField( max_length=2, null=True, blank=True ) # (u'ID', u'2', u'2') u'Surface/Layer/Position Code'
    MEA10 = models.CharField( max_length=4, null=True, blank=True ) # (u'ID', u'2', u'4') u'Measurement Method or Device'
    def unmarshall( self, segmentToken, cs=':' ):
        self.MEA01 = segmentToken.elt(1)
        self.MEA02 = segmentToken.elt(2)
        self.MEA03 = segmentToken.elt(3)
        self.C001 = segmentToken.elt(4)
        self.MEA05 = segmentToken.elt(5)
        self.MEA06 = segmentToken.elt(6)
        self.MEA07 = segmentToken.elt(7)
        self.MEA08 = segmentToken.elt(8)
        self.MEA09 = segmentToken.elt(9)
        self.MEA10 = segmentToken.elt(10)

class Segment_PS1(models.Model):
    """Properties(syntax='',req_sit=u'S',repeat=u'1',pos=u'488',desc=u'Purchased Service Information')"""
    segment = models.ForeignKey( X12Segment )
    PS101 = models.CharField( max_length=30 ) # (u'AN', u'1', u'30') u'Reference Identification'
    PS102 = models.CharField( max_length=18 ) # (u'R', u'1', u'18') u'Monetary Amount'
    PS103 = models.CharField( max_length=2, null=True, blank=True ) # (u'ID', u'2', u'2') u'State or Province Code'
    def unmarshall( self, segmentToken, cs=':' ):
        self.PS101 = segmentToken.elt(1)
        self.PS102 = segmentToken.elt(2)
        self.PS103 = segmentToken.elt(3)

class Segment_LIN(models.Model):
    """Properties(syntax='',req_sit=u'R',repeat=u'1',pos=u'494',desc=u'Drug Identification')"""
    segment = models.ForeignKey( X12Segment )
    LIN01 = models.CharField( max_length=20, null=True, blank=True ) # (u'AN', u'1', u'20') u'Assigned Identification'
    LIN02 = models.CharField( max_length=2 ) # (u'ID', u'2', u'2') u'Product/Service ID Qualifier'
    LIN03 = models.CharField( max_length=48 ) # (u'AN', u'1', u'48') u'Product/Service ID'
    LIN04 = models.CharField( max_length=2, null=True, blank=True ) # (u'ID', u'2', u'2') u'Product/Service ID Qualifier'
    LIN05 = models.CharField( max_length=48, null=True, blank=True ) # (u'AN', u'1', u'48') u'Product/Service ID'
    LIN06 = models.CharField( max_length=2, null=True, blank=True ) # (u'ID', u'2', u'2') u'Product/Service ID Qualifier'
    LIN07 = models.CharField( max_length=48, null=True, blank=True ) # (u'AN', u'1', u'48') u'Product/Service ID'
    LIN08 = models.CharField( max_length=2, null=True, blank=True ) # (u'ID', u'2', u'2') u'Product/Service ID Qualifier'
    LIN09 = models.CharField( max_length=48, null=True, blank=True ) # (u'AN', u'1', u'48') u'Product/Service ID'
    LIN10 = models.CharField( max_length=2, null=True, blank=True ) # (u'ID', u'2', u'2') u'Product/Service ID Qualifier'
    LIN11 = models.CharField( max_length=48, null=True, blank=True ) # (u'AN', u'1', u'48') u'Product/Service ID'
    LIN12 = models.CharField( max_length=2, null=True, blank=True ) # (u'ID', u'2', u'2') u'Product/Service ID Qualifier'
    LIN13 = models.CharField( max_length=48, null=True, blank=True ) # (u'AN', u'1', u'48') u'Product/Service ID'
    LIN14 = models.CharField( max_length=2, null=True, blank=True ) # (u'ID', u'2', u'2') u'Product/Service ID Qualifier'
    LIN15 = models.CharField( max_length=48, null=True, blank=True ) # (u'AN', u'1', u'48') u'Product/Service ID'
    LIN16 = models.CharField( max_length=2, null=True, blank=True ) # (u'ID', u'2', u'2') u'Product/Service ID Qualifier'
    LIN17 = models.CharField( max_length=48, null=True, blank=True ) # (u'AN', u'1', u'48') u'Product/Service ID'
    LIN18 = models.CharField( max_length=2, null=True, blank=True ) # (u'ID', u'2', u'2') u'Product/Service ID Qualifier'
    LIN19 = models.CharField( max_length=48, null=True, blank=True ) # (u'AN', u'1', u'48') u'Product/Service ID'
    LIN20 = models.CharField( max_length=2, null=True, blank=True ) # (u'ID', u'2', u'2') u'Product/Service ID Qualifier'
    LIN21 = models.CharField( max_length=48, null=True, blank=True ) # (u'AN', u'1', u'48') u'Product/Service ID'
    LIN22 = models.CharField( max_length=2, null=True, blank=True ) # (u'ID', u'2', u'2') u'Product/Service ID Qualifier'
    LIN23 = models.CharField( max_length=48, null=True, blank=True ) # (u'AN', u'1', u'48') u'Product/Service ID'
    LIN24 = models.CharField( max_length=2, null=True, blank=True ) # (u'ID', u'2', u'2') u'Product/Service ID Qualifier'
    LIN25 = models.CharField( max_length=48, null=True, blank=True ) # (u'AN', u'1', u'48') u'Product/Service ID'
    LIN26 = models.CharField( max_length=2, null=True, blank=True ) # (u'ID', u'2', u'2') u'Product/Service ID Qualifier'
    LIN27 = models.CharField( max_length=48, null=True, blank=True ) # (u'AN', u'1', u'48') u'Product/Service ID'
    LIN28 = models.CharField( max_length=2, null=True, blank=True ) # (u'ID', u'2', u'2') u'Product/Service ID Qualifier'
    LIN29 = models.CharField( max_length=48, null=True, blank=True ) # (u'AN', u'1', u'48') u'Product/Service ID'
    LIN30 = models.CharField( max_length=2, null=True, blank=True ) # (u'ID', u'2', u'2') u'Product/Service ID Qualifier'
    LIN31 = models.CharField( max_length=48, null=True, blank=True ) # (u'AN', u'1', u'48') u'Product/Service ID'
    def unmarshall( self, segmentToken, cs=':' ):
        self.LIN01 = segmentToken.elt(1)
        self.LIN02 = segmentToken.elt(2)
        self.LIN03 = segmentToken.elt(3)
        self.LIN04 = segmentToken.elt(4)
        self.LIN05 = segmentToken.elt(5)
        self.LIN06 = segmentToken.elt(6)
        self.LIN07 = segmentToken.elt(7)
        self.LIN08 = segmentToken.elt(8)
        self.LIN09 = segmentToken.elt(9)
        self.LIN10 = segmentToken.elt(10)
        self.LIN11 = segmentToken.elt(11)
        self.LIN12 = segmentToken.elt(12)
        self.LIN13 = segmentToken.elt(13)
        self.LIN14 = segmentToken.elt(14)
        self.LIN15 = segmentToken.elt(15)
        self.LIN16 = segmentToken.elt(16)
        self.LIN17 = segmentToken.elt(17)
        self.LIN18 = segmentToken.elt(18)
        self.LIN19 = segmentToken.elt(19)
        self.LIN20 = segmentToken.elt(20)
        self.LIN21 = segmentToken.elt(21)
        self.LIN22 = segmentToken.elt(22)
        self.LIN23 = segmentToken.elt(23)
        self.LIN24 = segmentToken.elt(24)
        self.LIN25 = segmentToken.elt(25)
        self.LIN26 = segmentToken.elt(26)
        self.LIN27 = segmentToken.elt(27)
        self.LIN28 = segmentToken.elt(28)
        self.LIN29 = segmentToken.elt(29)
        self.LIN30 = segmentToken.elt(30)
        self.LIN31 = segmentToken.elt(31)

class Segment_CTP(models.Model):
    """Properties(syntax='',req_sit=u'S',repeat=u'1',pos=u'495',desc=u'Drug Pricing')"""
    segment = models.ForeignKey( X12Segment )
    CTP01 = models.CharField( max_length=2, null=True, blank=True ) # (u'ID', u'2', u'2') u'Class of Trade Code'
    CTP02 = models.CharField( max_length=3, null=True, blank=True ) # (u'ID', u'3', u'3') u'Price Identifier Code'
    CTP03 = models.CharField( max_length=17 ) # (u'R', u'1', u'17') u'Unit Price'
    CTP04 = models.CharField( max_length=15 ) # (u'R', u'1', u'15') u'Quantity'
    # <Composite u'C001', Properties(req_sit=u'R',refdes='',seq=u'05',desc=u'Unit or Basis of Measurement'), 
    CTP05_01 = models.CharField( max_length=2 ) # (u'ID', u'2', u'2') u'Unit or Basis for Measurement Code'
    CTP05_02 = models.CharField( max_length=15, null=True, blank=True ) # (u'R', u'1', u'15') u'Exponent'
    CTP05_03 = models.CharField( max_length=10, null=True, blank=True ) # (u'R', u'1', u'10') u'Multiplier'
    CTP05_04 = models.CharField( max_length=2, null=True, blank=True ) # (u'ID', u'2', u'2') u'Unit or Basis for Measurement Code'
    CTP05_05 = models.CharField( max_length=15, null=True, blank=True ) # (u'R', u'1', u'15') u'Exponent'
    CTP05_06 = models.CharField( max_length=10, null=True, blank=True ) # (u'R', u'1', u'10') u'Multiplier'
    CTP05_07 = models.CharField( max_length=2, null=True, blank=True ) # (u'ID', u'2', u'2') u'Unit or Basis for Measurement Code'
    CTP05_08 = models.CharField( max_length=15, null=True, blank=True ) # (u'R', u'1', u'15') u'Exponent'
    CTP05_09 = models.CharField( max_length=10, null=True, blank=True ) # (u'R', u'1', u'10') u'Multiplier'
    CTP05_10 = models.CharField( max_length=2, null=True, blank=True ) # (u'ID', u'2', u'2') u'Unit or Basis for Measurement Code'
    CTP05_11 = models.CharField( max_length=15, null=True, blank=True ) # (u'R', u'1', u'15') u'Exponent'
    CTP05_12 = models.CharField( max_length=10, null=True, blank=True ) # (u'R', u'1', u'10') u'Multiplier'
    CTP05_13 = models.CharField( max_length=2, null=True, blank=True ) # (u'ID', u'2', u'2') u'Unit or Basis for Measurement Code'
    CTP05_14 = models.CharField( max_length=15, null=True, blank=True ) # (u'R', u'1', u'15') u'Exponent'
    CTP05_15 = models.CharField( max_length=10, null=True, blank=True ) # (u'R', u'1', u'10') u'Multiplier'
    CTP06 = models.CharField( max_length=3, null=True, blank=True ) # (u'ID', u'3', u'3') u'Price Multiplier Qualifier'
    CTP07 = models.CharField( max_length=10, null=True, blank=True ) # (u'R', u'1', u'10') u'Multiplier'
    CTP08 = models.CharField( max_length=18, null=True, blank=True ) # (u'R', u'1', u'18') u'Monetary Amount'
    CTP09 = models.CharField( max_length=2, null=True, blank=True ) # (u'ID', u'2', u'2') u'Basis of Unit Price Code'
    CTP10 = models.CharField( max_length=10, null=True, blank=True ) # (u'AN', u'1', u'10') u'Condition Value'
    CTP11 = models.CharField( max_length=2, null=True, blank=True ) # (u'N0', u'1', u'2') u'Multiple Price Quantity'
    def unmarshall( self, segmentToken, cs=':' ):
        self.CTP01 = segmentToken.elt(1)
        self.CTP02 = segmentToken.elt(2)
        self.CTP03 = segmentToken.elt(3)
        self.CTP04 = segmentToken.elt(4)
        # composite= segmentToken[5].split(cs)
        self.CTP05_01 = segmentToken.subElt(5,cs,0)
        self.CTP05_02 = segmentToken.subElt(5,cs,1)
        self.CTP05_03 = segmentToken.subElt(5,cs,2)
        self.CTP05_04 = segmentToken.subElt(5,cs,3)
        self.CTP05_05 = segmentToken.subElt(5,cs,4)
        self.CTP05_06 = segmentToken.subElt(5,cs,5)
        self.CTP05_07 = segmentToken.subElt(5,cs,6)
        self.CTP05_08 = segmentToken.subElt(5,cs,7)
        self.CTP05_09 = segmentToken.subElt(5,cs,8)
        self.CTP05_10 = segmentToken.subElt(5,cs,9)
        self.CTP05_11 = segmentToken.subElt(5,cs,10)
        self.CTP05_12 = segmentToken.subElt(5,cs,11)
        self.CTP05_13 = segmentToken.subElt(5,cs,12)
        self.CTP05_14 = segmentToken.subElt(5,cs,13)
        self.CTP05_15 = segmentToken.subElt(5,cs,14)
        self.CTP06 = segmentToken.elt(6)
        self.CTP07 = segmentToken.elt(7)
        self.CTP08 = segmentToken.elt(8)
        self.CTP09 = segmentToken.elt(9)
        self.CTP10 = segmentToken.elt(10)
        self.CTP11 = segmentToken.elt(11)

class Segment_SVD(models.Model):
    """Properties(syntax='',req_sit=u'R',repeat=u'1',pos=u'540',desc=u'Line Adjudication Information')"""
    segment = models.ForeignKey( X12Segment )
    SVD01 = models.CharField( max_length=80 ) # (u'AN', u'2', u'80') u'Identification Code'
    SVD02 = models.CharField( max_length=18 ) # (u'R', u'1', u'18') u'Monetary Amount'
    # <Composite u'C003', Properties(req_sit=u'R',refdes='',seq=u'03',desc=u'Procedure Identifier'), 
    SVD03_01 = models.CharField( max_length=2 ) # (u'ID', u'2', u'2') u'Product/Service ID Qualifier'
    SVD03_02 = models.CharField( max_length=48 ) # (u'AN', u'1', u'48') u'Product/Service ID'
    SVD03_03 = models.CharField( max_length=2, null=True, blank=True ) # (u'AN', u'2', u'2') u'Procedure Modifier'
    SVD03_04 = models.CharField( max_length=2, null=True, blank=True ) # (u'AN', u'2', u'2') u'Procedure Modifier'
    SVD03_05 = models.CharField( max_length=2, null=True, blank=True ) # (u'AN', u'2', u'2') u'Procedure Modifier'
    SVD03_06 = models.CharField( max_length=2, null=True, blank=True ) # (u'AN', u'2', u'2') u'Procedure Modifier'
    SVD03_07 = models.CharField( max_length=80, null=True, blank=True ) # (u'AN', u'1', u'80') u'Description'
    SVD04 = models.CharField( max_length=48, null=True, blank=True ) # (u'AN', u'1', u'48') u'Product/Service ID'
    SVD05 = models.CharField( max_length=15 ) # (u'R', u'1', u'15') u'Quantity'
    SVD06 = models.CharField( max_length=6, null=True, blank=True ) # (u'N0', u'1', u'6') u'Assigned Number'
    def unmarshall( self, segmentToken, cs=':' ):
        self.SVD01 = segmentToken.elt(1)
        self.SVD02 = segmentToken.elt(2)
        # composite= segmentToken[3].split(cs)
        self.SVD03_01 = segmentToken.subElt(3,cs,0)
        self.SVD03_02 = segmentToken.subElt(3,cs,1)
        self.SVD03_03 = segmentToken.subElt(3,cs,2)
        self.SVD03_04 = segmentToken.subElt(3,cs,3)
        self.SVD03_05 = segmentToken.subElt(3,cs,4)
        self.SVD03_06 = segmentToken.subElt(3,cs,5)
        self.SVD03_07 = segmentToken.subElt(3,cs,6)
        self.SVD04 = segmentToken.elt(4)
        self.SVD05 = segmentToken.elt(5)
        self.SVD06 = segmentToken.elt(6)

class Segment_LQ(models.Model):
    """Properties(syntax=u'C0102',req_sit=u'R',repeat=u'1',pos=u'551',desc=u'Form Identification Code')"""
    segment = models.ForeignKey( X12Segment )
    LQ01 = models.CharField( max_length=3 ) # (u'ID', u'1', u'3') u'Code List Qualifier Code'
    LQ02 = models.CharField( max_length=30 ) # (u'AN', u'1', u'30') u'Industry Code'
    def unmarshall( self, segmentToken, cs=':' ):
        self.LQ01 = segmentToken.elt(1)
        self.LQ02 = segmentToken.elt(2)

class Segment_FRM(models.Model):
    """Properties(syntax=u'R02030405',req_sit=u'R',repeat=u'99',pos=u'552',desc=u'Supporting Documentation')"""
    segment = models.ForeignKey( X12Segment )
    FRM01 = models.CharField( max_length=20 ) # (u'AN', u'1', u'20') u'Assigned Identification'
    FRM02 = models.CharField( max_length=1, null=True, blank=True ) # (u'ID', u'1', u'1') u'Yes/No Condition or Response Code'
    FRM03 = models.CharField( max_length=30, null=True, blank=True ) # (u'AN', u'1', u'30') u'Reference Identification'
    FRM04 = models.CharField( max_length=8, null=True, blank=True ) # (u'DT', u'8', u'8') u'Date'
    FRM05 = models.CharField( max_length=6, null=True, blank=True ) # (u'R', u'1', u'6') u'Percent'
    def unmarshall( self, segmentToken, cs=':' ):
        self.FRM01 = segmentToken.elt(1)
        self.FRM02 = segmentToken.elt(2)
        self.FRM03 = segmentToken.elt(3)
        self.FRM04 = segmentToken.elt(4)
        self.FRM05 = segmentToken.elt(5)

class Segment_SE(models.Model):
    """Properties(syntax='',req_sit=u'R',repeat=u'1',pos=u'555',desc=u'Transaction Set Trailer')"""
    segment = models.ForeignKey( X12Segment )
    SE01 = models.CharField( max_length=10 ) # (u'N0', u'1', u'10') u'Number of Included Segments'
    SE02 = models.CharField( max_length=9 ) # (u'AN', u'4', u'9') u'Transaction Set Control Number'
    def unmarshall( self, segmentToken, cs=':' ):
        self.SE01 = segmentToken.elt(1)
        self.SE02 = segmentToken.elt(2)

class Segment_GE(models.Model):
    """Properties(syntax='',req_sit=u'R',repeat=u'1',pos=u'030',desc=u'Functional Group Trailer')"""
    segment = models.ForeignKey( X12Segment )
    GE01 = models.CharField( max_length=6 ) # (u'N0', u'1', u'6') u'97'
    GE02 = models.CharField( max_length=9 ) # (u'N0', u'1', u'9') u'Group Control Number'
    def unmarshall( self, segmentToken, cs=':' ):
        self.GE01 = segmentToken.elt(1)
        self.GE02 = segmentToken.elt(2)

class Segment_TA1(models.Model):
    """Properties(syntax='',req_sit=u'S',repeat=u'1',pos=u'020',desc=u'Interchange Acknowledgement')"""
    segment = models.ForeignKey( X12Segment )
    TA101 = models.CharField( max_length=9 ) # (u'N0', u'9', u'9') u'I12'
    TA102 = models.CharField( max_length=6 ) # (u'DT', u'6', u'6') u'I08'
    TA103 = models.CharField( max_length=4 ) # (u'TM', u'4', u'4') u'I09'
    TA104 = models.CharField( max_length=1 ) # (u'ID', u'1', u'1') u'I17'
    TA105 = models.CharField( max_length=3 ) # (u'ID', u'3', u'3') u'I18'
    def unmarshall( self, segmentToken, cs=':' ):
        self.TA101 = segmentToken.elt(1)
        self.TA102 = segmentToken.elt(2)
        self.TA103 = segmentToken.elt(3)
        self.TA104 = segmentToken.elt(4)
        self.TA105 = segmentToken.elt(5)

class Segment_IEA(models.Model):
    """Properties(syntax='',req_sit=u'R',repeat=u'1',pos=u'030',desc=u'Interchange Control Trailer')"""
    segment = models.ForeignKey( X12Segment )
    IEA01 = models.CharField( max_length=5 ) # (u'N0', u'1', u'5') u'I16'
    IEA02 = models.CharField( max_length=9 ) # (u'N0', u'9', u'9') u'I12'
    def unmarshall( self, segmentToken, cs=':' ):
        self.IEA01 = segmentToken.elt(1)
        self.IEA02 = segmentToken.elt(2)

class Segment_CL1(models.Model):
    """Properties(syntax='',req_sit=u'S',repeat=u'1',pos=u'140',desc=u'Institutional Claim Code')"""
    segment = models.ForeignKey( X12Segment )
    CL101 = models.CharField( max_length=1, null=True, blank=True ) # (u'ID', u'1', u'1') u'Admission Type Code'
    CL102 = models.CharField( max_length=1, null=True, blank=True ) # (u'ID', u'1', u'1') u'Admission Source Code'
    CL103 = models.CharField( max_length=2, null=True, blank=True ) # (u'ID', u'1', u'2') u'Patient Status Code'
    CL104 = models.CharField( max_length=1, null=True, blank=True ) # (u'ID', u'1', u'1') u'Nursing Home Residential Status Code'
    def unmarshall( self, segmentToken, cs=':' ):
        self.CL101 = segmentToken.elt(1)
        self.CL102 = segmentToken.elt(2)
        self.CL103 = segmentToken.elt(3)
        self.CL104 = segmentToken.elt(4)

class Segment_CR6(models.Model):
    """Properties(syntax='',req_sit=u'S',repeat=u'1',pos=u'216',desc=u'Home Health Care Information')"""
    segment = models.ForeignKey( X12Segment )
    CR601 = models.CharField( max_length=1 ) # (u'ID', u'1', u'1') u'Prognosis Code'
    CR602 = models.CharField( max_length=8 ) # (u'DT', u'8', u'8') u'Date'
    CR603 = models.CharField( max_length=3, null=True, blank=True ) # (u'ID', u'2', u'3') u'Date Time Period Format Qualifier'
    CR604 = models.CharField( max_length=35, null=True, blank=True ) # (u'AN', u'1', u'35') u'Date Time Period'
    CR605 = models.CharField( max_length=8 ) # (u'DT', u'8', u'8') u'Date'
    CR606 = models.CharField( max_length=1 ) # (u'ID', u'1', u'1') u'Yes/No Condition or Response Code'
    CR607 = models.CharField( max_length=1 ) # (u'ID', u'1', u'1') u'Yes/No Condition or Response Code'
    CR608 = models.CharField( max_length=1 ) # (u'ID', u'1', u'1') u'Certification Type Code'
    CR609 = models.CharField( max_length=8, null=True, blank=True ) # (u'DT', u'8', u'8') u'Date'
    CR610 = models.CharField( max_length=2, null=True, blank=True ) # (u'ID', u'2', u'2') u'Product/Service ID Qualifier'
    CR611 = models.CharField( max_length=15, null=True, blank=True ) # (u'AN', u'1', u'15') u'Medical Code Value'
    CR612 = models.CharField( max_length=8, null=True, blank=True ) # (u'DT', u'8', u'8') u'Date'
    CR613 = models.CharField( max_length=8, null=True, blank=True ) # (u'DT', u'8', u'8') u'Date'
    CR614 = models.CharField( max_length=8, null=True, blank=True ) # (u'DT', u'8', u'8') u'Date'
    CR615 = models.CharField( max_length=3, null=True, blank=True ) # (u'ID', u'2', u'3') u'Date Time Period Format Qualifier'
    CR616 = models.CharField( max_length=35, null=True, blank=True ) # (u'AN', u'1', u'35') u'Date Time Period'
    CR617 = models.CharField( max_length=1 ) # (u'ID', u'1', u'1') u'Patient Location Code'
    CR618 = models.CharField( max_length=8, null=True, blank=True ) # (u'DT', u'8', u'8') u'Date'
    CR619 = models.CharField( max_length=8, null=True, blank=True ) # (u'DT', u'8', u'8') u'Date'
    CR620 = models.CharField( max_length=8, null=True, blank=True ) # (u'DT', u'8', u'8') u'Date'
    CR621 = models.CharField( max_length=8, null=True, blank=True ) # (u'DT', u'8', u'8') u'Date'
    def unmarshall( self, segmentToken, cs=':' ):
        self.CR601 = segmentToken.elt(1)
        self.CR602 = segmentToken.elt(2)
        self.CR603 = segmentToken.elt(3)
        self.CR604 = segmentToken.elt(4)
        self.CR605 = segmentToken.elt(5)
        self.CR606 = segmentToken.elt(6)
        self.CR607 = segmentToken.elt(7)
        self.CR608 = segmentToken.elt(8)
        self.CR609 = segmentToken.elt(9)
        self.CR610 = segmentToken.elt(10)
        self.CR611 = segmentToken.elt(11)
        self.CR612 = segmentToken.elt(12)
        self.CR613 = segmentToken.elt(13)
        self.CR614 = segmentToken.elt(14)
        self.CR615 = segmentToken.elt(15)
        self.CR616 = segmentToken.elt(16)
        self.CR617 = segmentToken.elt(17)
        self.CR618 = segmentToken.elt(18)
        self.CR619 = segmentToken.elt(19)
        self.CR620 = segmentToken.elt(20)
        self.CR621 = segmentToken.elt(21)

class Segment_QTY(models.Model):
    """Properties(syntax='',req_sit=u'S',repeat=u'4',pos=u'240',desc=u'Claim Quantity')"""
    segment = models.ForeignKey( X12Segment )
    QTY01 = models.CharField( max_length=2 ) # (u'ID', u'2', u'2') u'Quantity Qualifier'
    QTY02 = models.CharField( max_length=15 ) # (u'R', u'1', u'15') u'Quantity'
    # <Composite u'C001', Properties(req_sit=u'R',refdes='',seq=u'03',desc=u'Composite Unit of Measure'), 
    QTY03_01 = models.CharField( max_length=2 ) # (u'ID', u'2', u'2') u'Unit or Basis for Measurement Code'
    QTY03_02 = models.CharField( max_length=15, null=True, blank=True ) # (u'R', u'1', u'15') u'Exponent'
    QTY03_03 = models.CharField( max_length=10, null=True, blank=True ) # (u'R', u'1', u'10') u'Multiplier'
    QTY03_04 = models.CharField( max_length=2, null=True, blank=True ) # (u'ID', u'2', u'2') u'Unit or Basis for Measurement Code'
    QTY03_05 = models.CharField( max_length=15, null=True, blank=True ) # (u'R', u'1', u'15') u'Exponent'
    QTY03_06 = models.CharField( max_length=10, null=True, blank=True ) # (u'R', u'1', u'10') u'Multiplier'
    QTY03_07 = models.CharField( max_length=2, null=True, blank=True ) # (u'ID', u'2', u'2') u'Unit or Basis for Measurement Code'
    QTY03_08 = models.CharField( max_length=15, null=True, blank=True ) # (u'R', u'1', u'15') u'Exponent'
    QTY03_09 = models.CharField( max_length=10, null=True, blank=True ) # (u'R', u'1', u'10') u'Multiplier'
    QTY03_10 = models.CharField( max_length=2, null=True, blank=True ) # (u'ID', u'2', u'2') u'Unit or Basis for Measurement Code'
    QTY03_11 = models.CharField( max_length=15, null=True, blank=True ) # (u'R', u'1', u'15') u'Exponent'
    QTY03_12 = models.CharField( max_length=10, null=True, blank=True ) # (u'R', u'1', u'10') u'Multiplier'
    QTY03_13 = models.CharField( max_length=2, null=True, blank=True ) # (u'ID', u'2', u'2') u'Unit or Basis for Measurement Code'
    QTY03_14 = models.CharField( max_length=15, null=True, blank=True ) # (u'R', u'1', u'15') u'Exponent'
    QTY03_15 = models.CharField( max_length=10, null=True, blank=True ) # (u'R', u'1', u'10') u'Multiplier'
    QTY04 = models.CharField( max_length=30, null=True, blank=True ) # (u'AN', u'1', u'30') u'Free-Form Message'
    def unmarshall( self, segmentToken, cs=':' ):
        self.QTY01 = segmentToken.elt(1)
        self.QTY02 = segmentToken.elt(2)
        # composite= segmentToken[3].split(cs)
        self.QTY03_01 = segmentToken.subElt(3,cs,0)
        self.QTY03_02 = segmentToken.subElt(3,cs,1)
        self.QTY03_03 = segmentToken.subElt(3,cs,2)
        self.QTY03_04 = segmentToken.subElt(3,cs,3)
        self.QTY03_05 = segmentToken.subElt(3,cs,4)
        self.QTY03_06 = segmentToken.subElt(3,cs,5)
        self.QTY03_07 = segmentToken.subElt(3,cs,6)
        self.QTY03_08 = segmentToken.subElt(3,cs,7)
        self.QTY03_09 = segmentToken.subElt(3,cs,8)
        self.QTY03_10 = segmentToken.subElt(3,cs,9)
        self.QTY03_11 = segmentToken.subElt(3,cs,10)
        self.QTY03_12 = segmentToken.subElt(3,cs,11)
        self.QTY03_13 = segmentToken.subElt(3,cs,12)
        self.QTY03_14 = segmentToken.subElt(3,cs,13)
        self.QTY03_15 = segmentToken.subElt(3,cs,14)
        self.QTY04 = segmentToken.elt(4)

class Segment_MIA(models.Model):
    """Properties(syntax='',req_sit=u'S',repeat=u'1',pos=u'315',desc=u'Medicare Inpatient Adjudication Information')"""
    segment = models.ForeignKey( X12Segment )
    MIA01 = models.CharField( max_length=15 ) # (u'R', u'1', u'15') u'Quantity'
    MIA02 = models.CharField( max_length=15, null=True, blank=True ) # (u'R', u'1', u'15') u'Quantity'
    MIA03 = models.CharField( max_length=15, null=True, blank=True ) # (u'R', u'1', u'15') u'Quantity'
    MIA04 = models.CharField( max_length=18, null=True, blank=True ) # (u'R', u'1', u'18') u'Monetary Amount'
    MIA05 = models.CharField( max_length=30, null=True, blank=True ) # (u'AN', u'1', u'30') u'Reference Identification'
    MIA06 = models.CharField( max_length=18, null=True, blank=True ) # (u'R', u'1', u'18') u'Monetary Amount'
    MIA07 = models.CharField( max_length=18, null=True, blank=True ) # (u'R', u'1', u'18') u'Monetary Amount'
    MIA08 = models.CharField( max_length=18, null=True, blank=True ) # (u'R', u'1', u'18') u'Monetary Amount'
    MIA09 = models.CharField( max_length=18, null=True, blank=True ) # (u'R', u'1', u'18') u'Monetary Amount'
    MIA10 = models.CharField( max_length=18, null=True, blank=True ) # (u'R', u'1', u'18') u'Monetary Amount'
    MIA11 = models.CharField( max_length=18, null=True, blank=True ) # (u'R', u'1', u'18') u'Monetary Amount'
    MIA12 = models.CharField( max_length=18, null=True, blank=True ) # (u'R', u'1', u'18') u'Monetary Amount'
    MIA13 = models.CharField( max_length=18, null=True, blank=True ) # (u'R', u'1', u'18') u'Monetary Amount'
    MIA14 = models.CharField( max_length=18, null=True, blank=True ) # (u'R', u'1', u'18') u'Monetary Amount'
    MIA15 = models.CharField( max_length=15, null=True, blank=True ) # (u'R', u'1', u'15') u'Quantity'
    MIA16 = models.CharField( max_length=18, null=True, blank=True ) # (u'R', u'1', u'18') u'Monetary Amount'
    MIA17 = models.CharField( max_length=18, null=True, blank=True ) # (u'R', u'1', u'18') u'Monetary Amount'
    MIA18 = models.CharField( max_length=18, null=True, blank=True ) # (u'R', u'1', u'18') u'Monetary Amount'
    MIA19 = models.CharField( max_length=18, null=True, blank=True ) # (u'R', u'1', u'18') u'Monetary Amount'
    MIA20 = models.CharField( max_length=30, null=True, blank=True ) # (u'AN', u'1', u'30') u'Reference Identification'
    MIA21 = models.CharField( max_length=30, null=True, blank=True ) # (u'AN', u'1', u'30') u'Reference Identification'
    MIA22 = models.CharField( max_length=30, null=True, blank=True ) # (u'AN', u'1', u'30') u'Reference Identification'
    MIA23 = models.CharField( max_length=30, null=True, blank=True ) # (u'AN', u'1', u'30') u'Reference Identification'
    MIA24 = models.CharField( max_length=18, null=True, blank=True ) # (u'R', u'1', u'18') u'Monetary Amount'
    def unmarshall( self, segmentToken, cs=':' ):
        self.MIA01 = segmentToken.elt(1)
        self.MIA02 = segmentToken.elt(2)
        self.MIA03 = segmentToken.elt(3)
        self.MIA04 = segmentToken.elt(4)
        self.MIA05 = segmentToken.elt(5)
        self.MIA06 = segmentToken.elt(6)
        self.MIA07 = segmentToken.elt(7)
        self.MIA08 = segmentToken.elt(8)
        self.MIA09 = segmentToken.elt(9)
        self.MIA10 = segmentToken.elt(10)
        self.MIA11 = segmentToken.elt(11)
        self.MIA12 = segmentToken.elt(12)
        self.MIA13 = segmentToken.elt(13)
        self.MIA14 = segmentToken.elt(14)
        self.MIA15 = segmentToken.elt(15)
        self.MIA16 = segmentToken.elt(16)
        self.MIA17 = segmentToken.elt(17)
        self.MIA18 = segmentToken.elt(18)
        self.MIA19 = segmentToken.elt(19)
        self.MIA20 = segmentToken.elt(20)
        self.MIA21 = segmentToken.elt(21)
        self.MIA22 = segmentToken.elt(22)
        self.MIA23 = segmentToken.elt(23)
        self.MIA24 = segmentToken.elt(24)

class Segment_SV2(models.Model):
    """Properties(syntax='',req_sit=u'R',repeat=u'1',pos=u'375',desc=u'Institutional Service Line')"""
    segment = models.ForeignKey( X12Segment )
    SV201 = models.CharField( max_length=48 ) # (u'AN', u'1', u'48') u'Product/Service ID'
    # <Composite u'C003', Properties(req_sit=u'S',refdes='',seq=u'02',desc=u'Service Line Procedure Code'), 
    SV202_01 = models.CharField( max_length=2 ) # (u'ID', u'2', u'2') u'Product/Service ID Qualifier'
    SV202_02 = models.CharField( max_length=48 ) # (u'AN', u'1', u'48') u'Product/Service ID'
    SV202_03 = models.CharField( max_length=2, null=True, blank=True ) # (u'AN', u'2', u'2') u'Procedure Modifier'
    SV202_04 = models.CharField( max_length=2, null=True, blank=True ) # (u'AN', u'2', u'2') u'Procedure Modifier'
    SV202_05 = models.CharField( max_length=2, null=True, blank=True ) # (u'AN', u'2', u'2') u'Procedure Modifier'
    SV202_06 = models.CharField( max_length=2, null=True, blank=True ) # (u'AN', u'2', u'2') u'Procedure Modifier'
    SV202_07 = models.CharField( max_length=80, null=True, blank=True ) # (u'AN', u'1', u'80') u'Description'
    SV203 = models.CharField( max_length=18 ) # (u'R', u'1', u'18') u'Monetary Amount'
    SV204 = models.CharField( max_length=2 ) # (u'ID', u'2', u'2') u'Unit or Basis for Measurement Code'
    SV205 = models.CharField( max_length=15 ) # (u'R', u'1', u'15') u'Quantity'
    SV206 = models.CharField( max_length=10, null=True, blank=True ) # (u'R', u'1', u'10') u'Unit Rate'
    SV207 = models.CharField( max_length=18, null=True, blank=True ) # (u'R', u'1', u'18') u'Monetary Amount'
    SV208 = models.CharField( max_length=1, null=True, blank=True ) # (u'ID', u'1', u'1') u'Yes/No Condition or Response Code'
    SV209 = models.CharField( max_length=1, null=True, blank=True ) # (u'ID', u'1', u'1') u'Nursing Home Residential Status Code'
    SV210 = models.CharField( max_length=1, null=True, blank=True ) # (u'ID', u'1', u'1') u'Level of Care Code'
    def unmarshall( self, segmentToken, cs=':' ):
        self.SV201 = segmentToken.elt(1)
        # composite= segmentToken[2].split(cs)
        self.SV202_01 = segmentToken.subElt(2,cs,0)
        self.SV202_02 = segmentToken.subElt(2,cs,1)
        self.SV202_03 = segmentToken.subElt(2,cs,2)
        self.SV202_04 = segmentToken.subElt(2,cs,3)
        self.SV202_05 = segmentToken.subElt(2,cs,4)
        self.SV202_06 = segmentToken.subElt(2,cs,5)
        self.SV202_07 = segmentToken.subElt(2,cs,6)
        self.SV203 = segmentToken.elt(3)
        self.SV204 = segmentToken.elt(4)
        self.SV205 = segmentToken.elt(5)
        self.SV206 = segmentToken.elt(6)
        self.SV207 = segmentToken.elt(7)
        self.SV208 = segmentToken.elt(8)
        self.SV209 = segmentToken.elt(9)
        self.SV210 = segmentToken.elt(10)

class Segment_DN1(models.Model):
    """Properties(syntax='',req_sit=u'S',repeat=u'1',pos=u'145',desc=u'Orthodontic Total Months of Treatment')"""
    segment = models.ForeignKey( X12Segment )
    DN101 = models.CharField( max_length=15, null=True, blank=True ) # (u'R', u'1', u'15') u'Quantity'
    DN102 = models.CharField( max_length=15, null=True, blank=True ) # (u'R', u'1', u'15') u'Quantity'
    DN103 = models.CharField( max_length=1, null=True, blank=True ) # (u'ID', u'1', u'1') u'Yes/No Condition or Response Code'
    DN104 = models.CharField( max_length=80, null=True, blank=True ) # (u'AN', u'1', u'80') u'Description'
    def unmarshall( self, segmentToken, cs=':' ):
        self.DN101 = segmentToken.elt(1)
        self.DN102 = segmentToken.elt(2)
        self.DN103 = segmentToken.elt(3)
        self.DN104 = segmentToken.elt(4)

class Segment_DN2(models.Model):
    """Properties(syntax='',req_sit=u'S',repeat=u'35',pos=u'150',desc=u'Tooth Status')"""
    segment = models.ForeignKey( X12Segment )
    DN201 = models.CharField( max_length=30 ) # (u'AN', u'1', u'30') u'Reference Identification'
    DN202 = models.CharField( max_length=2 ) # (u'ID', u'1', u'2') u'Tooth Status Code'
    DN203 = models.CharField( max_length=15, null=True, blank=True ) # (u'R', u'1', u'15') u'Quantity'
    DN204 = models.CharField( max_length=3, null=True, blank=True ) # (u'ID', u'2', u'3') u'Date Time Period Format Qualifier'
    DN205 = models.CharField( max_length=35, null=True, blank=True ) # (u'AN', u'1', u'35') u'Date Time Period'
    def unmarshall( self, segmentToken, cs=':' ):
        self.DN201 = segmentToken.elt(1)
        self.DN202 = segmentToken.elt(2)
        self.DN203 = segmentToken.elt(3)
        self.DN204 = segmentToken.elt(4)
        self.DN205 = segmentToken.elt(5)

class Segment_SV3(models.Model):
    """Properties(syntax='',req_sit=u'R',repeat=u'1',pos=u'380',desc=u'Dental Service')"""
    segment = models.ForeignKey( X12Segment )
    # <Composite u'C003', Properties(req_sit=u'R',refdes='',seq=u'01',desc=u'Composite Medical Procedure Identifier'), 
    SV301_01 = models.CharField( max_length=2 ) # (u'ID', u'2', u'2') u'Product/Service ID Qualifier'
    SV301_02 = models.CharField( max_length=48 ) # (u'AN', u'1', u'48') u'Product/Service ID'
    SV301_03 = models.CharField( max_length=2, null=True, blank=True ) # (u'AN', u'2', u'2') u'Procedure Modifier'
    SV301_04 = models.CharField( max_length=2, null=True, blank=True ) # (u'AN', u'2', u'2') u'Procedure Modifier'
    SV301_05 = models.CharField( max_length=2, null=True, blank=True ) # (u'AN', u'2', u'2') u'Procedure Modifier'
    SV301_06 = models.CharField( max_length=2, null=True, blank=True ) # (u'AN', u'2', u'2') u'Procedure Modifier'
    SV301_07 = models.CharField( max_length=80, null=True, blank=True ) # (u'AN', u'1', u'80') u'Description'
    SV302 = models.CharField( max_length=18 ) # (u'R', u'1', u'18') u'Monetary Amount'
    SV303 = models.CharField( max_length=2, null=True, blank=True ) # (u'AN', u'1', u'2') u'Facility Code Value'
    # <Composite u'C006', Properties(req_sit=u'S',refdes='',seq=u'04',desc=u'Oral Cavity Designation'), 
    SV304_01 = models.CharField( max_length=3 ) # (u'ID', u'1', u'3') u'Oral Cavity Designation Code'
    SV304_02 = models.CharField( max_length=3, null=True, blank=True ) # (u'ID', u'1', u'3') u'Oral Cavity Designation Code'
    SV304_03 = models.CharField( max_length=3, null=True, blank=True ) # (u'ID', u'1', u'3') u'Oral Cavity Designation Code'
    SV304_04 = models.CharField( max_length=3, null=True, blank=True ) # (u'ID', u'1', u'3') u'Oral Cavity Designation Code'
    SV304_05 = models.CharField( max_length=3, null=True, blank=True ) # (u'ID', u'1', u'3') u'Oral Cavity Designation Code'
    SV305 = models.CharField( max_length=1, null=True, blank=True ) # (u'ID', u'1', u'1') u'Prosthesis'
    SV306 = models.CharField( max_length=15 ) # (u'R', u'1', u'15') u'Quantity'
    SV307 = models.CharField( max_length=80, null=True, blank=True ) # (u'AN', u'1', u'80') u'Description'
    SV308 = models.CharField( max_length=1, null=True, blank=True ) # (u'ID', u'1', u'1') u'Copay Status Code'
    SV309 = models.CharField( max_length=1, null=True, blank=True ) # (u'ID', u'1', u'1') u'Provider Agreement Code'
    SV310 = models.CharField( max_length=1, null=True, blank=True ) # (u'ID', u'1', u'1') u'Yes/No Condition or Response Code'
    # <Composite u'C004', Properties(req_sit=u'N',refdes='',seq=u'11',desc=u'Composite Diagnosis Code Pointer'), 
    def unmarshall( self, segmentToken, cs=':' ):
        # composite= segmentToken[1].split(cs)
        self.SV301_01 = segmentToken.subElt(1,cs,0)
        self.SV301_02 = segmentToken.subElt(1,cs,1)
        self.SV301_03 = segmentToken.subElt(1,cs,2)
        self.SV301_04 = segmentToken.subElt(1,cs,3)
        self.SV301_05 = segmentToken.subElt(1,cs,4)
        self.SV301_06 = segmentToken.subElt(1,cs,5)
        self.SV301_07 = segmentToken.subElt(1,cs,6)
        self.SV302 = segmentToken.elt(2)
        self.SV303 = segmentToken.elt(3)
        # composite= segmentToken[4].split(cs)
        self.SV304_01 = segmentToken.subElt(4,cs,0)
        self.SV304_02 = segmentToken.subElt(4,cs,1)
        self.SV304_03 = segmentToken.subElt(4,cs,2)
        self.SV304_04 = segmentToken.subElt(4,cs,3)
        self.SV304_05 = segmentToken.subElt(4,cs,4)
        self.SV305 = segmentToken.elt(5)
        self.SV306 = segmentToken.elt(6)
        self.SV307 = segmentToken.elt(7)
        self.SV308 = segmentToken.elt(8)
        self.SV309 = segmentToken.elt(9)
        self.SV310 = segmentToken.elt(10)
        self.C004 = segmentToken.elt(11)

class Segment_TOO(models.Model):
    """Properties(syntax='',req_sit=u'S',repeat=u'32',pos=u'382',desc=u'Tooth Information')"""
    segment = models.ForeignKey( X12Segment )
    TOO01 = models.CharField( max_length=3 ) # (u'ID', u'1', u'3') u'Code List Qualifier Code'
    TOO02 = models.CharField( max_length=30, null=True, blank=True ) # (u'AN', u'1', u'30') u'Industry Code'
    # <Composite u'C005', Properties(req_sit=u'S',refdes='',seq=u'03',desc=u'Tooth Surface'), 
    TOO03_01 = models.CharField( max_length=2 ) # (u'ID', u'1', u'2') u'Tooth Surface Code'
    TOO03_02 = models.CharField( max_length=2, null=True, blank=True ) # (u'ID', u'1', u'2') u'Tooth Surface Code'
    TOO03_03 = models.CharField( max_length=2, null=True, blank=True ) # (u'ID', u'1', u'2') u'Tooth Surface Code'
    TOO03_04 = models.CharField( max_length=2, null=True, blank=True ) # (u'ID', u'1', u'2') u'Tooth Surface Code'
    TOO03_05 = models.CharField( max_length=2, null=True, blank=True ) # (u'ID', u'1', u'2') u'Tooth Surface Code'
    def unmarshall( self, segmentToken, cs=':' ):
        self.TOO01 = segmentToken.elt(1)
        self.TOO02 = segmentToken.elt(2)
        # composite= segmentToken[3].split(cs)
        self.TOO03_01 = segmentToken.subElt(3,cs,0)
        self.TOO03_02 = segmentToken.subElt(3,cs,1)
        self.TOO03_03 = segmentToken.subElt(3,cs,2)
        self.TOO03_04 = segmentToken.subElt(3,cs,3)
        self.TOO03_05 = segmentToken.subElt(3,cs,4)



#!/usr/bin/env python Generated by make837.py on 2008-02-12 14:41:11.161000 Factory for a generated application. Create a Segment from a SegmentToken and an Segment definition.
 
         :param segmentToken: An :class:`X12.parse.SegmentToken` instance:
         a list-like collection of Element values.  It turns out that a simple
         list of values may also work, if it does NOT have trailing empty
         items omitted.  Real Segment Tokens can have trailing empty items
         omitted.
         :param compositeSep: Composite internal separator from the ISA segment.
         :param segmentType: An :class:`X12.parse.Segment` instance, which
         defines the Elements and Composites of this X12Segment.
         :returns: X12Segment instance Properties(syntax='',req_sit=u'R',repeat=u'1',pos=u'010',desc=u'Interchange Control Header') # (u'ID', u'2', u'2') u'I01' # (u'AN', u'10', u'10') u'I02' # (u'ID', u'2', u'2') u'I03' # (u'AN', u'10', u'10') u'I04' # (u'ID', u'2', u'2') u'I05' # (u'AN', u'15', u'15') u'I06' # (u'ID', u'2', u'2') u'I05' # (u'AN', u'15', u'15') u'I07' # (u'DT', u'6', u'6') u'I08' # (u'TM', u'4', u'4') u'I09' # (u'ID', u'1', u'1') u'I10' # (u'ID', u'5', u'5') u'I11' # (u'N0', u'9', u'9') u'I12' # (u'ID', u'1', u'1') u'I13' # (u'ID', u'1', u'1') u'I14' # (u'AN', u'1', u'1') u'I15' Properties(syntax='',req_sit=u'R',repeat=u'1',pos=u'010',desc=u'Functional Group Header') # (u'ID', u'2', u'2') u'Functional Identifier Code' # (u'AN', u'2', u'15') u'Application Senders Code' # (u'AN', u'2', u'15') u'124' # (u'DT', u'8', u'8') u'Date' # (u'TM', u'4', u'8') u'Time' # (u'N0', u'1', u'9') u'Group Control Number' # (u'ID', u'1', u'2') u'Responsible Agency Code' # (u'AN', u'1', u'12') u'Version / Release / Industry Identifier Code' Properties(syntax='',req_sit=u'R',repeat=u'1',pos=u'005',desc=u'Transaction Set Header') # (u'ID', u'3', u'3') u'Transaction Set Identifier Code' # (u'AN', u'4', u'9') u'Transaction Set Control Number' Properties(syntax='',req_sit=u'R',repeat=u'1',pos=u'010',desc=u'Beginning of Hierarchical Transaction') # (u'ID', u'4', u'4') u'Hierarchical Structure Code' # (u'ID', u'2', u'2') u'Transaction Set Purpose Code' # (u'AN', u'1', u'30') u'Reference Identification' # (u'DT', u'8', u'8') u'Date' # (u'TM', u'4', u'8') u'Time' # (u'ID', u'2', u'2') u'Transaction Type Code' Properties(syntax=u'R0203',req_sit=u'R',repeat=u'1',pos=u'015',desc=u'Transmission Type Identification') # (u'ID', u'2', u'3') u'Reference Identification Qualifier' # (u'AN', u'1', u'30') u'Reference Identification' # (u'AN', u'1', u'80') u'Description' # <Composite u'C040', Properties(req_sit=u'N',refdes=u'REF04',seq=u'04',desc=u'Reference Identifier'), Properties(syntax=u'P0809 C1110',req_sit=u'R',repeat=u'1',pos=u'020',desc=u'Submitter Name') # (u'ID', u'2', u'3') u'Entity Identifier Code' # (u'ID', u'1', u'1') u'Entity Type Qualifier' # (u'AN', u'1', u'35') u'Name Last or Organization Name' # (u'AN', u'1', u'25') u'Name First' # (u'AN', u'1', u'25') u'Name Middle' # (u'AN', u'1', u'10') u'Name Prefix' # (u'AN', u'1', u'10') u'Name Suffix' # (u'ID', u'1', u'2') u'Identification Code Qualifier' # (u'AN', u'2', u'80') u'Identification Code' # (u'ID', u'2', u'2') u'Entity Relationship Code' # (u'ID', u'2', u'3') u'Entity Identifier Code' Properties(syntax=u'P0304 P0506 P0708',req_sit=u'R',repeat=u'2',pos=u'045',desc=u'Submitter EDI Contact Information') # (u'ID', u'2', u'2') u'Contact Function Code' # (u'AN', u'1', u'60') u'Name' # (u'ID', u'2', u'2') u'Communication Number Qualifier' # (u'AN', u'1', u'80') u'Communication Number' # (u'ID', u'2', u'2') u'Communication Number Qualifier' # (u'AN', u'1', u'80') u'Communication Number' # (u'ID', u'2', u'2') u'Communication Number Qualifier' # (u'AN', u'1', u'80') u'Communication Number' # (u'AN', u'1', u'20') u'Contact Inquiry Reference' Properties(syntax='',req_sit=u'R',repeat=u'1',pos=u'001',desc=u'Billing/Pay-To Provider Hierarchical Level') # (u'AN', u'1', u'12') u'Hierarchical ID Number' # (u'AN', u'1', u'12') u'Hierarchical Parent ID Number' # (u'ID', u'1', u'2') u'Hierarchical Level Code' # (u'ID', u'1', u'1') u'Hierarchical Child Code' Properties(syntax='',req_sit=u'S',repeat=u'1',pos=u'003',desc=u'Billing/Pay-To Provider Specialty Information') # (u'ID', u'1', u'3') u'Provider Code' # (u'ID', u'2', u'3') u'Reference Identification Qualifier' # (u'AN', u'1', u'30') u'Reference Identification' # (u'ID', u'2', u'2') u'State or Province Code' # <Composite u'C035', Properties(req_sit=u'N',refdes='',seq=u'05',desc=u'Provider Specialty Information'), # (u'ID', u'3', u'3') u'Provider Organization Code' Properties(syntax=u'C0807 C0907 L101112 C1110 C1210 L131415 C1413 C1513 L161718 C1716 C1816 L192021 C2019 C2119',req_sit=u'S',repeat=u'1',pos=u'010',desc=u'Foreign Currency Information') # (u'ID', u'2', u'3') u'Entity Identifier Code' # (u'ID', u'3', u'3') u'Currency Code' # (u'R', u'4', u'10') u'Exchange Rate' # (u'ID', u'2', u'3') u'Entity Identifier Code' # (u'ID', u'3', u'3') u'Currency Code' # (u'ID', u'3', u'3') u'Currency Market/Exchange Code' # (u'ID', u'3', u'3') u'Date/Time Qualifier' # (u'DT', u'8', u'8') u'Date' # (u'TM', u'4', u'8') u'Time' # (u'ID', u'3', u'3') u'Date/Time Qualifier' # (u'DT', u'8', u'8') u'Date' # (u'TM', u'4', u'8') u'Time' # (u'ID', u'3', u'3') u'Date/Time Qualifier' # (u'DT', u'8', u'8') u'Date' # (u'TM', u'4', u'8') u'Time' # (u'ID', u'3', u'3') u'Date/Time Qualifier' # (u'DT', u'8', u'8') u'Date' # (u'TM', u'4', u'8') u'Time' # (u'ID', u'3', u'3') u'Date/Time Qualifier' # (u'DT', u'8', u'8') u'Date' # (u'TM', u'4', u'8') u'Time' Properties(syntax='',req_sit=u'R',repeat=u'1',pos=u'025',desc=u'Billing Provider Address') # (u'AN', u'1', u'55') u'Address Information' # (u'AN', u'1', u'55') u'Address Information' Properties(syntax=u'C0605',req_sit=u'R',repeat=u'1',pos=u'030',desc=u'Billing Provider City/State/ZIP Code') # (u'AN', u'2', u'30') u'City Name' # (u'ID', u'2', u'2') u'State or Province Code' # (u'ID', u'3', u'15') u'Postal Code' # (u'ID', u'2', u'3') u'Country Code' # (u'ID', u'1', u'2') u'Location Qualifier' # (u'AN', u'1', u'30') u'Location Identifier' Properties(syntax='',req_sit=u'R',repeat=u'1',pos=u'005',desc=u'Subscriber Information') # (u'ID', u'1', u'1') u'Payer Responsibility Sequence Number Code' # (u'ID', u'2', u'2') u'Individual Relationship Code' # (u'AN', u'1', u'30') u'Reference Identification' # (u'AN', u'1', u'60') u'Name' # (u'ID', u'1', u'3') u'Insurance Type Code' # (u'ID', u'1', u'1') u'Coordination of Benefits Code' # (u'ID', u'1', u'1') u'Yes/No Condition or Response Code' # (u'ID', u'2', u'2') u'Employment Status Code' # (u'ID', u'1', u'2') u'Claim Filing Indicator Code' Properties(syntax=u'P0506 P0708',req_sit=u'S',repeat=u'1',pos=u'007',desc=u'Patient Information') # (u'ID', u'2', u'2') u'Individual Relationship Code' # (u'ID', u'1', u'1') u'Patient Location Code' # (u'ID', u'2', u'2') u'Employment Status Code' # (u'ID', u'1', u'1') u'Student Status Code' # (u'ID', u'2', u'3') u'Date Time Period Format Qualifier' # (u'AN', u'1', u'35') u'Date Time Period' # (u'ID', u'2', u'2') u'Unit or Basis for Measurement Code' # (u'R', u'1', u'10') u'Weight' # (u'ID', u'1', u'1') u'Yes/No Condition or Response Code' Properties(syntax=u'P0102',req_sit=u'S',repeat=u'1',pos=u'032',desc=u'Subscriber Demographic Information') # (u'ID', u'2', u'3') u'Date Time Period Format Qualifier' # (u'AN', u'1', u'35') u'Date Time Period' # (u'ID', u'1', u'1') u'Gender Code' # (u'ID', u'1', u'1') u'Marital Status Code' # (u'ID', u'1', u'1') u'Race or Ethnicity Code' # (u'ID', u'1', u'2') u'Citizenship Status Code' # (u'ID', u'2', u'3') u'Country Code' # (u'ID', u'1', u'2') u'Basis of Verification Code' # (u'R', u'1', u'15') u'Quantity' Properties(syntax='',req_sit=u'R',repeat=u'1',pos=u'130',desc=u'Claim Information') # (u'AN', u'1', u'38') u'Claim Submitters Identifier' # (u'R', u'1', u'18') u'Monetary Amount' # (u'ID', u'1', u'2') u'Claim Filing Indicator Code' # (u'ID', u'1', u'2') u'Non-Institutional Claim Type Code' # <Composite u'C023', Properties(req_sit=u'R',refdes='',seq=u'05',desc=u'Place of Service Code'), # (u'AN', u'1', u'2') u'Facility Code Value' # (u'ID', u'1', u'2') u'Facility Code Qualifier' # (u'ID', u'1', u'1') u'Claim Frequency Type Code' # (u'ID', u'1', u'1') u'Yes/No Condition or Response Code' # (u'ID', u'1', u'1') u'Provider Accept Assignment Code' # (u'ID', u'1', u'1') u'Yes/No Condition or Response Code' # (u'ID', u'1', u'1') u'Release of Information Code' # (u'ID', u'1', u'1') u'Patient Signature Source Code' # <Composite u'C024', Properties(req_sit=u'S',refdes='',seq=u'11',desc=u'Accident/Employment/Related Causes'), # (u'ID', u'2', u'3') u'Related-Causes Code' # (u'ID', u'2', u'3') u'Related-Causes Code' # (u'ID', u'2', u'3') u'Related-Causes Code' # (u'ID', u'2', u'2') u'State or Province Code' # (u'ID', u'2', u'3') u'Country Code' # (u'ID', u'2', u'3') u'Special Program Code' # (u'ID', u'1', u'1') u'Yes/No Condition or Response Code' # (u'ID', u'1', u'3') u'Level of Service Code' # (u'ID', u'1', u'1') u'Yes/No Condition or Response Code' # (u'ID', u'1', u'1') u'Provider Agreement Code' # (u'ID', u'1', u'2') u'Claim Status Code' # (u'ID', u'1', u'1') u'Yes/No Condition or Response Code' # (u'ID', u'2', u'2') u'Claim Submission Reason Code' # (u'ID', u'1', u'2') u'Delay Reason Code' # composite= segmentToken[5].split(cs) # composite= segmentToken[11].split(cs) Properties(syntax='',req_sit=u'S',repeat=u'1',pos=u'135',desc=u'Date - Initial Treatment') # (u'ID', u'3', u'3') u'Date/Time Qualifier' # (u'ID', u'2', u'3') u'Date Time Period Format Qualifier' # (u'AN', u'1', u'35') u'Date Time Period' Properties(syntax=u'P0506',req_sit=u'S',repeat=u'10',pos=u'155',desc=u'Claim Supplemental Information') # (u'ID', u'2', u'2') u'Report Type Code' # (u'ID', u'1', u'2') u'Report Transmission Code' # (u'N0', u'1', u'2') u'Report Copies Needed' # (u'ID', u'2', u'3') u'Entity Identifier Code' # (u'ID', u'1', u'2') u'Identification Code Qualifier' # (u'AN', u'2', u'80') u'Identification Code' # (u'AN', u'1', u'80') u'Description' # <Composite u'C002', Properties(req_sit=u'N',refdes=u'PWK08',seq=u'08',desc=u'Actions Indicated'), # (u'ID', u'1', u'2') u'Request Category Code' Properties(syntax='',req_sit=u'S',repeat=u'1',pos=u'160',desc=u'Contract Information') # (u'ID', u'2', u'2') u'Contract Type Code' # (u'R', u'1', u'18') u'Monetary Amount' # (u'R', u'1', u'6') u'Percent' # (u'AN', u'1', u'30') u'Reference Identification' # (u'R', u'1', u'6') u'Terms Discount Percent' # (u'AN', u'1', u'30') u'Version Identifier' Properties(syntax='',req_sit=u'S',repeat=u'1',pos=u'175',desc=u'Credit/Debit Card Maximum Amount') # (u'ID', u'1', u'3') u'Amount Qualifier Code' # (u'R', u'1', u'18') u'Monetary Amount' # (u'ID', u'1', u'1') u'Credit/Debit Flag Code' Properties(syntax='',req_sit=u'S',repeat=u'10',pos=u'185',desc=u'File Information') # (u'AN', u'1', u'80') u'Fixed Format Information' # (u'ID', u'1', u'2') u'Record Format Code' # <Composite u'C001', Properties(req_sit=u'N',refdes=u'K303',seq=u'03',desc=u'Composite Unit of Measure'), Properties(syntax='',req_sit=u'S',repeat=u'1',pos=u'190',desc=u'Claim Note') # (u'ID', u'3', u'3') u'Note Reference Code' # (u'AN', u'1', u'80') u'Description' Properties(syntax=u'P0102 P0506',req_sit=u'S',repeat=u'1',pos=u'195',desc=u'Ambulance Transport Information') # (u'ID', u'2', u'2') u'Unit or Basis for Measurement Code' # (u'R', u'1', u'10') u'Weight' # (u'ID', u'1', u'1') u'Ambulance Transport Code' # (u'ID', u'1', u'1') u'Ambulance Transport Reason Code' # (u'ID', u'2', u'2') u'Unit or Basis for Measurement Code' # (u'R', u'1', u'15') u'Quantity' # (u'AN', u'1', u'55') u'Address Information' # (u'AN', u'1', u'55') u'Address Information' # (u'AN', u'1', u'80') u'Description' # (u'AN', u'1', u'80') u'Description' Properties(syntax=u'P0102 C0403 P0506',req_sit=u'S',repeat=u'1',pos=u'200',desc=u'Spinal Manipulation Service Information') # (u'N0', u'1', u'9') u'Count' # (u'R', u'1', u'15') u'Quantity' # (u'ID', u'2', u'3') u'Subluxation Level Code' # (u'ID', u'2', u'3') u'Subluxation Level Code' # (u'ID', u'2', u'2') u'Unit or Basis for Measurement Code' # (u'R', u'1', u'15') u'Quantity' # (u'R', u'1', u'15') u'Quantity' # (u'ID', u'1', u'1') u'Nature of Condition Code' # (u'ID', u'1', u'1') u'Yes/No Condition or Response Code' # (u'AN', u'1', u'80') u'Description' # (u'AN', u'1', u'80') u'Description' # (u'ID', u'1', u'1') u'Yes/No Condition or Response Code' Properties(syntax='',req_sit=u'S',repeat=u'3',pos=u'220',desc=u'Ambulance Certification') # (u'ID', u'2', u'2') u'Code Category' # (u'ID', u'1', u'1') u'Yes/No Condition or Response Code' # (u'ID', u'2', u'2') u'Condition Indicator' # (u'ID', u'2', u'2') u'Condition Indicator' # (u'ID', u'2', u'2') u'Condition Indicator' # (u'ID', u'2', u'2') u'Condition Indicator' # (u'ID', u'2', u'2') u'Condition Indicator' Properties(syntax='',req_sit=u'S',repeat=u'1',pos=u'231',desc=u'Health Care Diagnosis Code') # <Composite u'C022', Properties(req_sit=u'R',refdes='',seq=u'01',desc=u'Principal Diagnosis'), # (u'ID', u'1', u'3') u'Code List Qualifier Code' # (u'AN', u'1', u'30') u'Industry Code' # (u'ID', u'2', u'3') u'Date Time Period Format Qualifier' # (u'AN', u'1', u'35') u'Date Time Period' # (u'R', u'1', u'18') u'Monetary Amount' # (u'R', u'1', u'15') u'Quantity' # (u'AN', u'1', u'30') u'Version Identifier' # <Composite u'C022', Properties(req_sit=u'S',refdes='',seq=u'02',desc=u'Diagnosis'), # (u'ID', u'1', u'3') u'Code List Qualifier Code' # (u'AN', u'1', u'30') u'Industry Code' # (u'ID', u'2', u'3') u'Date Time Period Format Qualifier' # (u'AN', u'1', u'35') u'Date Time Period' # (u'R', u'1', u'18') u'Monetary Amount' # (u'R', u'1', u'15') u'Quantity' # (u'AN', u'1', u'30') u'Version Identifier' # <Composite u'C022', Properties(req_sit=u'S',refdes='',seq=u'03',desc=u'Diagnosis'), # (u'ID', u'1', u'3') u'Code List Qualifier Code' # (u'AN', u'1', u'30') u'Industry Code' # (u'ID', u'2', u'3') u'Date Time Period Format Qualifier' # (u'AN', u'1', u'35') u'Date Time Period' # (u'R', u'1', u'18') u'Monetary Amount' # (u'R', u'1', u'15') u'Quantity' # (u'AN', u'1', u'30') u'Version Identifier' # <Composite u'C022', Properties(req_sit=u'S',refdes='',seq=u'04',desc=u'Diagnosis'), # (u'ID', u'1', u'3') u'Code List Qualifier Code' # (u'AN', u'1', u'30') u'Industry Code' # (u'ID', u'2', u'3') u'Date Time Period Format Qualifier' # (u'AN', u'1', u'35') u'Date Time Period' # (u'R', u'1', u'18') u'Monetary Amount' # (u'R', u'1', u'15') u'Quantity' # (u'AN', u'1', u'30') u'Version Identifier' # <Composite u'C022', Properties(req_sit=u'S',refdes='',seq=u'05',desc=u'Diagnosis'), # (u'ID', u'1', u'3') u'Code List Qualifier Code' # (u'AN', u'1', u'30') u'Industry Code' # (u'ID', u'2', u'3') u'Date Time Period Format Qualifier' # (u'AN', u'1', u'35') u'Date Time Period' # (u'R', u'1', u'18') u'Monetary Amount' # (u'R', u'1', u'15') u'Quantity' # (u'AN', u'1', u'30') u'Version Identifier' # <Composite u'C022', Properties(req_sit=u'S',refdes='',seq=u'06',desc=u'Diagnosis'), # (u'ID', u'1', u'3') u'Code List Qualifier Code' # (u'AN', u'1', u'30') u'Industry Code' # (u'ID', u'2', u'3') u'Date Time Period Format Qualifier' # (u'AN', u'1', u'35') u'Date Time Period' # (u'R', u'1', u'18') u'Monetary Amount' # (u'R', u'1', u'15') u'Quantity' # (u'AN', u'1', u'30') u'Version Identifier' # <Composite u'C022', Properties(req_sit=u'S',refdes='',seq=u'07',desc=u'Diagnosis'), # (u'ID', u'1', u'3') u'Code List Qualifier Code' # (u'AN', u'1', u'30') u'Industry Code' # (u'ID', u'2', u'3') u'Date Time Period Format Qualifier' # (u'AN', u'1', u'35') u'Date Time Period' # (u'R', u'1', u'18') u'Monetary Amount' # (u'R', u'1', u'15') u'Quantity' # (u'AN', u'1', u'30') u'Version Identifier' # <Composite u'C022', Properties(req_sit=u'S',refdes='',seq=u'08',desc=u'Diagnosis'), # (u'ID', u'1', u'3') u'Code List Qualifier Code' # (u'AN', u'1', u'30') u'Industry Code' # (u'ID', u'2', u'3') u'Date Time Period Format Qualifier' # (u'AN', u'1', u'35') u'Date Time Period' # (u'R', u'1', u'18') u'Monetary Amount' # (u'R', u'1', u'15') u'Quantity' # (u'AN', u'1', u'30') u'Version Identifier' # <Composite u'C022', Properties(req_sit=u'N',refdes=u'HI09',seq=u'09',desc=u'Health Care Code Information'), # <Composite u'C022', Properties(req_sit=u'N',refdes=u'HI10',seq=u'10',desc=u'Health Care Code Information'), # <Composite u'C022', Properties(req_sit=u'N',refdes=u'HI11',seq=u'11',desc=u'Health Care Code Information'), # <Composite u'C022', Properties(req_sit=u'N',refdes=u'HI12',seq=u'12',desc=u'Health Care Code Information'), # composite= segmentToken[1].split(cs) # composite= segmentToken[2].split(cs) # composite= segmentToken[3].split(cs) # composite= segmentToken[4].split(cs) # composite= segmentToken[5].split(cs) # composite= segmentToken[6].split(cs) # composite= segmentToken[7].split(cs) # composite= segmentToken[8].split(cs) Properties(syntax=u'R0113 P0910 P1112',req_sit=u'S',repeat=u'1',pos=u'241',desc=u'Claim Pricing/Repricing Information') # (u'ID', u'2', u'2') u'Pricing Methodology' # (u'R', u'1', u'18') u'Monetary Amount' # (u'R', u'1', u'18') u'Monetary Amount' # (u'AN', u'1', u'30') u'Reference Identification' # (u'R', u'1', u'9') u'Rate' # (u'AN', u'1', u'30') u'Reference Identification' # (u'R', u'1', u'18') u'Monetary Amount' # (u'AN', u'1', u'48') u'Product/Service ID' # (u'ID', u'2', u'2') u'Product/Service ID Qualifier' # (u'AN', u'1', u'48') u'Product/Service ID' # (u'ID', u'2', u'2') u'Unit or Basis for Measurement Code' # (u'R', u'1', u'15') u'Quantity' # (u'ID', u'2', u'2') u'Reject Reason Code' # (u'ID', u'1', u'2') u'Policy Compliance Code' # (u'ID', u'1', u'2') u'Exception Code' Properties(syntax='',req_sit=u'R',repeat=u'1',pos=u'242',desc=u'Home Health Care Plan Information') # (u'ID', u'2', u'2') u'Discipline Type Code' # (u'N0', u'1', u'9') u'Number' # (u'N0', u'1', u'9') u'Number' Properties(syntax=u'P0102 C0605',req_sit=u'S',repeat=u'3',pos=u'243',desc=u'Health Care Services Delivery') # (u'ID', u'2', u'2') u'Quantity Qualifier' # (u'R', u'1', u'15') u'Quantity' # (u'ID', u'2', u'2') u'Unit or Basis for Measurement Code' # (u'R', u'1', u'6') u'Sample Selection Modulus' # (u'ID', u'1', u'2') u'Time Period Qualifier' # (u'N0', u'1', u'3') u'Number of Periods' # (u'ID', u'1', u'2') u'Ship/Delivery or Calendar Pattern Code' # (u'ID', u'1', u'1') u'Ship/Delivery Pattern Time Code' Properties(syntax=u'L050607 C0605 C0705 L080910 C0908 C1008 L111213 C1211 C1311 L141516 C1514 C1614 L171819 C1817 C1917',req_sit=u'S',repeat=u'5',pos=u'295',desc=u'Claim Level Adjustments') # (u'ID', u'1', u'2') u'Claim Adjustment Group Code' # (u'ID', u'1', u'5') u'Claim Adjustment Reason Code' # (u'R', u'1', u'18') u'Monetary Amount' # (u'R', u'1', u'15') u'Quantity' # (u'ID', u'1', u'5') u'Claim Adjustment Reason Code' # (u'R', u'1', u'18') u'Monetary Amount' # (u'R', u'1', u'15') u'Quantity' # (u'ID', u'1', u'5') u'Claim Adjustment Reason Code' # (u'R', u'1', u'18') u'Monetary Amount' # (u'R', u'1', u'15') u'Quantity' # (u'ID', u'1', u'5') u'Claim Adjustment Reason Code' # (u'R', u'1', u'18') u'Monetary Amount' # (u'R', u'1', u'15') u'Quantity' # (u'ID', u'1', u'5') u'Claim Adjustment Reason Code' # (u'R', u'1', u'18') u'Monetary Amount' # (u'R', u'1', u'15') u'Quantity' # (u'ID', u'1', u'5') u'Claim Adjustment Reason Code' # (u'R', u'1', u'18') u'Monetary Amount' # (u'R', u'1', u'15') u'Quantity' Properties(syntax='',req_sit=u'R',repeat=u'1',pos=u'310',desc=u'Other Insurance Coverage Information') # (u'ID', u'1', u'2') u'Claim Filing Indicator Code' # (u'ID', u'2', u'2') u'Claim Submission Reason Code' # (u'ID', u'1', u'1') u'Yes/No Condition or Response Code' # (u'ID', u'1', u'1') u'Patient Signature Source Code' # (u'ID', u'1', u'1') u'Provider Agreement Code' # (u'ID', u'1', u'1') u'Release of Information Code' Properties(syntax='',req_sit=u'S',repeat=u'1',pos=u'320',desc=u'Medicare Outpatient Adjudication Information') # (u'R', u'1', u'10') u'Percent' # (u'R', u'1', u'18') u'Monetary Amount' # (u'AN', u'1', u'30') u'Reference Identification' # (u'AN', u'1', u'30') u'Reference Identification' # (u'AN', u'1', u'30') u'Reference Identification' # (u'AN', u'1', u'30') u'Reference Identification' # (u'AN', u'1', u'30') u'Reference Identification' # (u'R', u'1', u'18') u'Monetary Amount' # (u'R', u'1', u'18') u'Monetary Amount' Properties(syntax='',req_sit=u'R',repeat=u'1',pos=u'365',desc=u'Service Line') # (u'N0', u'1', u'6') u'Assigned Number' Properties(syntax=u'P0304',req_sit=u'R',repeat=u'1',pos=u'370',desc=u'Professional Service') # <Composite u'C003', Properties(req_sit=u'R',refdes='',seq=u'01',desc=u'Procedure Identifier'), # (u'ID', u'2', u'2') u'Product/Service ID Qualifier' # (u'AN', u'1', u'48') u'Product/Service ID' # (u'AN', u'2', u'2') u'Procedure Modifier' # (u'AN', u'2', u'2') u'Procedure Modifier' # (u'AN', u'2', u'2') u'Procedure Modifier' # (u'AN', u'2', u'2') u'Procedure Modifier' # (u'AN', u'1', u'80') u'Description' # (u'R', u'1', u'18') u'Monetary Amount' # (u'ID', u'2', u'2') u'Unit or Basis for Measurement Code' # (u'R', u'1', u'15') u'Quantity' # (u'AN', u'1', u'2') u'Facility Code Value' # (u'ID', u'1', u'2') u'Service Type Code' # <Composite u'C004', Properties(req_sit=u'S',refdes='',seq=u'07',desc=u'Diagnosis Code Pointer'), # (u'N0', u'1', u'2') u'Diagnosis Code Pointer' # (u'N0', u'1', u'2') u'Diagnosis Code Pointer' # (u'N0', u'1', u'2') u'Diagnosis Code Pointer' # (u'N0', u'1', u'2') u'Diagnosis Code Pointer' # (u'R', u'1', u'18') u'Monetary Amount' # (u'ID', u'1', u'1') u'Yes/No Condition or Response Code' # (u'ID', u'1', u'2') u'Multiple Procedure Code' # (u'ID', u'1', u'1') u'Yes/No Condition or Response Code' # (u'ID', u'1', u'1') u'Yes/No Condition or Response Code' # (u'ID', u'1', u'2') u'Review Code' # (u'AN', u'1', u'2') u'National or Local Assigned Review Value' # (u'ID', u'1', u'1') u'Copay Status Code' # (u'ID', u'1', u'1') u'Health Care Professional Shortage Area Code' # (u'AN', u'1', u'30') u'Reference Identification' # (u'ID', u'3', u'15') u'Postal Code' # (u'R', u'1', u'18') u'Monetary Amount' # (u'ID', u'1', u'1') u'Level of Care Code' # (u'ID', u'1', u'1') u'Provider Agreement Code' # composite= segmentToken[1].split(cs) # composite= segmentToken[7].split(cs) Properties(syntax='',req_sit=u'S',repeat=u'1',pos=u'400',desc=u'Durable Medical Equipment Service') # <Composite u'C003', Properties(req_sit=u'R',refdes='',seq=u'01',desc=u'Composite Medical Procedure Identifier'), # (u'ID', u'2', u'2') u'Product/Service ID Qualifier' # (u'AN', u'1', u'48') u'Product/Service ID' # (u'AN', u'2', u'2') u'Procedure Modifier' # (u'AN', u'2', u'2') u'Procedure Modifier' # (u'AN', u'2', u'2') u'Procedure Modifier' # (u'AN', u'2', u'2') u'Procedure Modifier' # (u'AN', u'1', u'80') u'Description' # (u'ID', u'2', u'2') u'Unit or Basis for Measurement Code' # (u'R', u'1', u'15') u'Quantity' # (u'R', u'1', u'18') u'Monetary Amount' # (u'R', u'1', u'18') u'Monetary Amount' # (u'ID', u'1', u'1') u'Frequency Code' # (u'ID', u'1', u'1') u'Prognosis Code' # composite= segmentToken[1].split(cs) Properties(syntax=u'P0203',req_sit=u'S',repeat=u'1',pos=u'435',desc=u'Durable Medical Equipment Certification') # (u'ID', u'1', u'1') u'Certification Type Code' # (u'ID', u'2', u'2') u'Unit or Basis for Measurement Code' # (u'R', u'1', u'15') u'Quantity' # (u'ID', u'1', u'1') u'Insulin Dependent Code' # (u'AN', u'1', u'80') u'Description' Properties(syntax='',req_sit=u'S',repeat=u'1',pos=u'445',desc=u'Home Oxygen Therapy Information') # (u'ID', u'1', u'1') u'Certification Type Code' # (u'R', u'1', u'15') u'Quantity' # (u'ID', u'1', u'1') u'Oxygen Equipment Type Code' # (u'ID', u'1', u'1') u'Oxygen Equipment Type Code' # (u'AN', u'1', u'80') u'Description' # (u'R', u'1', u'15') u'Quantity' # (u'R', u'1', u'15') u'Quantity' # (u'R', u'1', u'15') u'Quantity' # (u'AN', u'1', u'80') u'Description' # (u'R', u'1', u'15') u'Quantity' # (u'R', u'1', u'15') u'Quantity' # (u'ID', u'1', u'1') u'Oxygen Test Condition Code' # (u'ID', u'1', u'1') u'Oxygen Test Findings Code' # (u'ID', u'1', u'1') u'Oxygen Test Findings Code' # (u'ID', u'1', u'1') u'Oxygen Test Findings Code' # (u'R', u'1', u'15') u'Quantity' # (u'ID', u'1', u'1') u'Oxygen Delivery System Code' # (u'ID', u'1', u'1') u'Oxygen Equipment Type Code' Properties(syntax=u'R03050608 C0504 C0604 L07030506 E0803',req_sit=u'S',repeat=u'20',pos=u'462',desc=u'Test Result') # (u'ID', u'2', u'2') u'Measurement Reference ID Code' # (u'ID', u'1', u'3') u'Measurement Qualifier' # (u'R', u'1', u'20') u'Measurement Value' # <Composite u'C001', Properties(req_sit=u'N',refdes='',seq=u'04',desc=u'Composite Unit of Measure'), # (u'R', u'1', u'20') u'Range Minimum' # (u'R', u'1', u'20') u'Range Maximum' # (u'ID', u'2', u'2') u'Measurement Significance Code' # (u'ID', u'2', u'2') u'Measurement Attribute Code' # (u'ID', u'2', u'2') u'Surface/Layer/Position Code' # (u'ID', u'2', u'4') u'Measurement Method or Device' Properties(syntax='',req_sit=u'S',repeat=u'1',pos=u'488',desc=u'Purchased Service Information') # (u'AN', u'1', u'30') u'Reference Identification' # (u'R', u'1', u'18') u'Monetary Amount' # (u'ID', u'2', u'2') u'State or Province Code' Properties(syntax='',req_sit=u'R',repeat=u'1',pos=u'494',desc=u'Drug Identification') # (u'AN', u'1', u'20') u'Assigned Identification' # (u'ID', u'2', u'2') u'Product/Service ID Qualifier' # (u'AN', u'1', u'48') u'Product/Service ID' # (u'ID', u'2', u'2') u'Product/Service ID Qualifier' # (u'AN', u'1', u'48') u'Product/Service ID' # (u'ID', u'2', u'2') u'Product/Service ID Qualifier' # (u'AN', u'1', u'48') u'Product/Service ID' # (u'ID', u'2', u'2') u'Product/Service ID Qualifier' # (u'AN', u'1', u'48') u'Product/Service ID' # (u'ID', u'2', u'2') u'Product/Service ID Qualifier' # (u'AN', u'1', u'48') u'Product/Service ID' # (u'ID', u'2', u'2') u'Product/Service ID Qualifier' # (u'AN', u'1', u'48') u'Product/Service ID' # (u'ID', u'2', u'2') u'Product/Service ID Qualifier' # (u'AN', u'1', u'48') u'Product/Service ID' # (u'ID', u'2', u'2') u'Product/Service ID Qualifier' # (u'AN', u'1', u'48') u'Product/Service ID' # (u'ID', u'2', u'2') u'Product/Service ID Qualifier' # (u'AN', u'1', u'48') u'Product/Service ID' # (u'ID', u'2', u'2') u'Product/Service ID Qualifier' # (u'AN', u'1', u'48') u'Product/Service ID' # (u'ID', u'2', u'2') u'Product/Service ID Qualifier' # (u'AN', u'1', u'48') u'Product/Service ID' # (u'ID', u'2', u'2') u'Product/Service ID Qualifier' # (u'AN', u'1', u'48') u'Product/Service ID' # (u'ID', u'2', u'2') u'Product/Service ID Qualifier' # (u'AN', u'1', u'48') u'Product/Service ID' # (u'ID', u'2', u'2') u'Product/Service ID Qualifier' # (u'AN', u'1', u'48') u'Product/Service ID' # (u'ID', u'2', u'2') u'Product/Service ID Qualifier' # (u'AN', u'1', u'48') u'Product/Service ID' Properties(syntax='',req_sit=u'S',repeat=u'1',pos=u'495',desc=u'Drug Pricing') # (u'ID', u'2', u'2') u'Class of Trade Code' # (u'ID', u'3', u'3') u'Price Identifier Code' # (u'R', u'1', u'17') u'Unit Price' # (u'R', u'1', u'15') u'Quantity' # <Composite u'C001', Properties(req_sit=u'R',refdes='',seq=u'05',desc=u'Unit or Basis of Measurement'), # (u'ID', u'2', u'2') u'Unit or Basis for Measurement Code' # (u'R', u'1', u'15') u'Exponent' # (u'R', u'1', u'10') u'Multiplier' # (u'ID', u'2', u'2') u'Unit or Basis for Measurement Code' # (u'R', u'1', u'15') u'Exponent' # (u'R', u'1', u'10') u'Multiplier' # (u'ID', u'2', u'2') u'Unit or Basis for Measurement Code' # (u'R', u'1', u'15') u'Exponent' # (u'R', u'1', u'10') u'Multiplier' # (u'ID', u'2', u'2') u'Unit or Basis for Measurement Code' # (u'R', u'1', u'15') u'Exponent' # (u'R', u'1', u'10') u'Multiplier' # (u'ID', u'2', u'2') u'Unit or Basis for Measurement Code' # (u'R', u'1', u'15') u'Exponent' # (u'R', u'1', u'10') u'Multiplier' # (u'ID', u'3', u'3') u'Price Multiplier Qualifier' # (u'R', u'1', u'10') u'Multiplier' # (u'R', u'1', u'18') u'Monetary Amount' # (u'ID', u'2', u'2') u'Basis of Unit Price Code' # (u'AN', u'1', u'10') u'Condition Value' # (u'N0', u'1', u'2') u'Multiple Price Quantity' # composite= segmentToken[5].split(cs) Properties(syntax='',req_sit=u'R',repeat=u'1',pos=u'540',desc=u'Line Adjudication Information') # (u'AN', u'2', u'80') u'Identification Code' # (u'R', u'1', u'18') u'Monetary Amount' # <Composite u'C003', Properties(req_sit=u'R',refdes='',seq=u'03',desc=u'Procedure Identifier'), # (u'ID', u'2', u'2') u'Product/Service ID Qualifier' # (u'AN', u'1', u'48') u'Product/Service ID' # (u'AN', u'2', u'2') u'Procedure Modifier' # (u'AN', u'2', u'2') u'Procedure Modifier' # (u'AN', u'2', u'2') u'Procedure Modifier' # (u'AN', u'2', u'2') u'Procedure Modifier' # (u'AN', u'1', u'80') u'Description' # (u'AN', u'1', u'48') u'Product/Service ID' # (u'R', u'1', u'15') u'Quantity' # (u'N0', u'1', u'6') u'Assigned Number' # composite= segmentToken[3].split(cs) Properties(syntax=u'C0102',req_sit=u'R',repeat=u'1',pos=u'551',desc=u'Form Identification Code') # (u'ID', u'1', u'3') u'Code List Qualifier Code' # (u'AN', u'1', u'30') u'Industry Code' Properties(syntax=u'R02030405',req_sit=u'R',repeat=u'99',pos=u'552',desc=u'Supporting Documentation') # (u'AN', u'1', u'20') u'Assigned Identification' # (u'ID', u'1', u'1') u'Yes/No Condition or Response Code' # (u'AN', u'1', u'30') u'Reference Identification' # (u'DT', u'8', u'8') u'Date' # (u'R', u'1', u'6') u'Percent' Properties(syntax='',req_sit=u'R',repeat=u'1',pos=u'555',desc=u'Transaction Set Trailer') # (u'N0', u'1', u'10') u'Number of Included Segments' # (u'AN', u'4', u'9') u'Transaction Set Control Number' Properties(syntax='',req_sit=u'R',repeat=u'1',pos=u'030',desc=u'Functional Group Trailer') # (u'N0', u'1', u'6') u'97' # (u'N0', u'1', u'9') u'Group Control Number' Properties(syntax='',req_sit=u'S',repeat=u'1',pos=u'020',desc=u'Interchange Acknowledgement') # (u'N0', u'9', u'9') u'I12' # (u'DT', u'6', u'6') u'I08' # (u'TM', u'4', u'4') u'I09' # (u'ID', u'1', u'1') u'I17' # (u'ID', u'3', u'3') u'I18' Properties(syntax='',req_sit=u'R',repeat=u'1',pos=u'030',desc=u'Interchange Control Trailer') # (u'N0', u'1', u'5') u'I16' # (u'N0', u'9', u'9') u'I12' Properties(syntax='',req_sit=u'S',repeat=u'1',pos=u'140',desc=u'Institutional Claim Code') # (u'ID', u'1', u'1') u'Admission Type Code' # (u'ID', u'1', u'1') u'Admission Source Code' # (u'ID', u'1', u'2') u'Patient Status Code' # (u'ID', u'1', u'1') u'Nursing Home Residential Status Code' Properties(syntax='',req_sit=u'S',repeat=u'1',pos=u'216',desc=u'Home Health Care Information') # (u'ID', u'1', u'1') u'Prognosis Code' # (u'DT', u'8', u'8') u'Date' # (u'ID', u'2', u'3') u'Date Time Period Format Qualifier' # (u'AN', u'1', u'35') u'Date Time Period' # (u'DT', u'8', u'8') u'Date' # (u'ID', u'1', u'1') u'Yes/No Condition or Response Code' # (u'ID', u'1', u'1') u'Yes/No Condition or Response Code' # (u'ID', u'1', u'1') u'Certification Type Code' # (u'DT', u'8', u'8') u'Date' # (u'ID', u'2', u'2') u'Product/Service ID Qualifier' # (u'AN', u'1', u'15') u'Medical Code Value' # (u'DT', u'8', u'8') u'Date' # (u'DT', u'8', u'8') u'Date' # (u'DT', u'8', u'8') u'Date' # (u'ID', u'2', u'3') u'Date Time Period Format Qualifier' # (u'AN', u'1', u'35') u'Date Time Period' # (u'ID', u'1', u'1') u'Patient Location Code' # (u'DT', u'8', u'8') u'Date' # (u'DT', u'8', u'8') u'Date' # (u'DT', u'8', u'8') u'Date' # (u'DT', u'8', u'8') u'Date' Properties(syntax='',req_sit=u'S',repeat=u'4',pos=u'240',desc=u'Claim Quantity') # (u'ID', u'2', u'2') u'Quantity Qualifier' # (u'R', u'1', u'15') u'Quantity' # <Composite u'C001', Properties(req_sit=u'R',refdes='',seq=u'03',desc=u'Composite Unit of Measure'), # (u'ID', u'2', u'2') u'Unit or Basis for Measurement Code' # (u'R', u'1', u'15') u'Exponent' # (u'R', u'1', u'10') u'Multiplier' # (u'ID', u'2', u'2') u'Unit or Basis for Measurement Code' # (u'R', u'1', u'15') u'Exponent' # (u'R', u'1', u'10') u'Multiplier' # (u'ID', u'2', u'2') u'Unit or Basis for Measurement Code' # (u'R', u'1', u'15') u'Exponent' # (u'R', u'1', u'10') u'Multiplier' # (u'ID', u'2', u'2') u'Unit or Basis for Measurement Code' # (u'R', u'1', u'15') u'Exponent' # (u'R', u'1', u'10') u'Multiplier' # (u'ID', u'2', u'2') u'Unit or Basis for Measurement Code' # (u'R', u'1', u'15') u'Exponent' # (u'R', u'1', u'10') u'Multiplier' # (u'AN', u'1', u'30') u'Free-Form Message' # composite= segmentToken[3].split(cs) Properties(syntax='',req_sit=u'S',repeat=u'1',pos=u'315',desc=u'Medicare Inpatient Adjudication Information') # (u'R', u'1', u'15') u'Quantity' # (u'R', u'1', u'15') u'Quantity' # (u'R', u'1', u'15') u'Quantity' # (u'R', u'1', u'18') u'Monetary Amount' # (u'AN', u'1', u'30') u'Reference Identification' # (u'R', u'1', u'18') u'Monetary Amount' # (u'R', u'1', u'18') u'Monetary Amount' # (u'R', u'1', u'18') u'Monetary Amount' # (u'R', u'1', u'18') u'Monetary Amount' # (u'R', u'1', u'18') u'Monetary Amount' # (u'R', u'1', u'18') u'Monetary Amount' # (u'R', u'1', u'18') u'Monetary Amount' # (u'R', u'1', u'18') u'Monetary Amount' # (u'R', u'1', u'18') u'Monetary Amount' # (u'R', u'1', u'15') u'Quantity' # (u'R', u'1', u'18') u'Monetary Amount' # (u'R', u'1', u'18') u'Monetary Amount' # (u'R', u'1', u'18') u'Monetary Amount' # (u'R', u'1', u'18') u'Monetary Amount' # (u'AN', u'1', u'30') u'Reference Identification' # (u'AN', u'1', u'30') u'Reference Identification' # (u'AN', u'1', u'30') u'Reference Identification' # (u'AN', u'1', u'30') u'Reference Identification' # (u'R', u'1', u'18') u'Monetary Amount' Properties(syntax='',req_sit=u'R',repeat=u'1',pos=u'375',desc=u'Institutional Service Line') # (u'AN', u'1', u'48') u'Product/Service ID' # <Composite u'C003', Properties(req_sit=u'S',refdes='',seq=u'02',desc=u'Service Line Procedure Code'), # (u'ID', u'2', u'2') u'Product/Service ID Qualifier' # (u'AN', u'1', u'48') u'Product/Service ID' # (u'AN', u'2', u'2') u'Procedure Modifier' # (u'AN', u'2', u'2') u'Procedure Modifier' # (u'AN', u'2', u'2') u'Procedure Modifier' # (u'AN', u'2', u'2') u'Procedure Modifier' # (u'AN', u'1', u'80') u'Description' # (u'R', u'1', u'18') u'Monetary Amount' # (u'ID', u'2', u'2') u'Unit or Basis for Measurement Code' # (u'R', u'1', u'15') u'Quantity' # (u'R', u'1', u'10') u'Unit Rate' # (u'R', u'1', u'18') u'Monetary Amount' # (u'ID', u'1', u'1') u'Yes/No Condition or Response Code' # (u'ID', u'1', u'1') u'Nursing Home Residential Status Code' # (u'ID', u'1', u'1') u'Level of Care Code' # composite= segmentToken[2].split(cs) Properties(syntax='',req_sit=u'S',repeat=u'1',pos=u'145',desc=u'Orthodontic Total Months of Treatment') # (u'R', u'1', u'15') u'Quantity' # (u'R', u'1', u'15') u'Quantity' # (u'ID', u'1', u'1') u'Yes/No Condition or Response Code' # (u'AN', u'1', u'80') u'Description' Properties(syntax='',req_sit=u'S',repeat=u'35',pos=u'150',desc=u'Tooth Status') # (u'AN', u'1', u'30') u'Reference Identification' # (u'ID', u'1', u'2') u'Tooth Status Code' # (u'R', u'1', u'15') u'Quantity' # (u'ID', u'2', u'3') u'Date Time Period Format Qualifier' # (u'AN', u'1', u'35') u'Date Time Period' Properties(syntax='',req_sit=u'R',repeat=u'1',pos=u'380',desc=u'Dental Service') # <Composite u'C003', Properties(req_sit=u'R',refdes='',seq=u'01',desc=u'Composite Medical Procedure Identifier'), # (u'ID', u'2', u'2') u'Product/Service ID Qualifier' # (u'AN', u'1', u'48') u'Product/Service ID' # (u'AN', u'2', u'2') u'Procedure Modifier' # (u'AN', u'2', u'2') u'Procedure Modifier' # (u'AN', u'2', u'2') u'Procedure Modifier' # (u'AN', u'2', u'2') u'Procedure Modifier' # (u'AN', u'1', u'80') u'Description' # (u'R', u'1', u'18') u'Monetary Amount' # (u'AN', u'1', u'2') u'Facility Code Value' # <Composite u'C006', Properties(req_sit=u'S',refdes='',seq=u'04',desc=u'Oral Cavity Designation'), # (u'ID', u'1', u'3') u'Oral Cavity Designation Code' # (u'ID', u'1', u'3') u'Oral Cavity Designation Code' # (u'ID', u'1', u'3') u'Oral Cavity Designation Code' # (u'ID', u'1', u'3') u'Oral Cavity Designation Code' # (u'ID', u'1', u'3') u'Oral Cavity Designation Code' # (u'ID', u'1', u'1') u'Prosthesis' # (u'R', u'1', u'15') u'Quantity' # (u'AN', u'1', u'80') u'Description' # (u'ID', u'1', u'1') u'Copay Status Code' # (u'ID', u'1', u'1') u'Provider Agreement Code' # (u'ID', u'1', u'1') u'Yes/No Condition or Response Code' # <Composite u'C004', Properties(req_sit=u'N',refdes='',seq=u'11',desc=u'Composite Diagnosis Code Pointer'), # composite= segmentToken[1].split(cs) # composite= segmentToken[4].split(cs) Properties(syntax='',req_sit=u'S',repeat=u'32',pos=u'382',desc=u'Tooth Information') # (u'ID', u'1', u'3') u'Code List Qualifier Code' # (u'AN', u'1', u'30') u'Industry Code' # <Composite u'C005', Properties(req_sit=u'S',refdes='',seq=u'03',desc=u'Tooth Surface'), # (u'ID', u'1', u'2') u'Tooth Surface Code' # (u'ID', u'1', u'2') u'Tooth Surface Code' # (u'ID', u'1', u'2') u'Tooth Surface Code' # (u'ID', u'1', u'2') u'Tooth Surface Code' # (u'ID', u'1', u'2') u'Tooth Surface Code' # composite= segmentToken[3].split(cs)