#------------------------------------------------------------------------
# CUSDEC (D.07A)
#------------------------------------------------------------------------

CUSDEC = 
         1 UNH-MessageHeader
         1 BGM-BeginningOfMessage
        *1 CST-CustomsStatusOfGoods
       *99 LOC-PlaceLocationIdentification
       *15 DTM-DateTimePeriod
       *25 GEI-ProcessingInformation
        *1 FII-FinancialInstitutionInformation
        *5 MEA-Measurements
      *999 EQD-EquipmentDetails
      *999 SEL-SealNumber
       *99 FTX-FreeText
       *99 SegmentGroup1
        *5 SegmentGroup4
       *99 SegmentGroup5
       *99 SegmentGroup6
        *1 SegmentGroup7
       *25 SegmentGroup8
       *99 SegmentGroup10
         1 UNS-SectionControl
      *999 SegmentGroup11
    *99999 SegmentGroup31
    *99999 SegmentGroup32
         1 UNS-SectionControl
        *5 CNT-ControlTotal
       *50 SegmentGroup51
        *1 SegmentGroup52
         1 UNT-MessageTrailer;
        
SegmentGroup1 =
        *1 DTM-DateTimePeriod
         1 RFF-Reference
       *10 SegmentGroup2;

SegmentGroup2 =
         1 PAC-Package
      *999 SegmentGroup3;

SegmentGroup3 = 
         1 PCI-PackageIdentification
        *1 FTX-FreeText;

SegmentGroup4 =
         1 TDT-TransportInformation
        *1 TPL-TransportPlacement;
    
SegmentGroup5 =
         1 DOC-DocumentMessageDetails
        *2 DTM-DateTimePeriod
        *1 LOC-PlaceLocationIdentification;

SegmentGroup6 =
         1 NAD-NameAndAddress
       *10 RFF-Reference
        *1 CTA-ContactInformation
        *5 COM-CommunicationContact;

SegmentGroup7 =
         1 TOD-TermsOfDeliveryOrTransport
        *1 FTX-FreeText
        *2 LOC-PlaceLocationIdentification;

SegmentGroup8 =
         1 MOA-MonetaryAmount
        *1 SegmentGroup9;
    
SegmentGroup9 =
        *1 DTM-DateTimePeriod
         1 CUX-Currencies;

SegmentGroup10 =
         1 EFI-ExternalFileLinkIdentification
        *9 COM-CommunicationContact
       *99 CED-ComputerEnvironmentDetails
        *9 RFF-Reference
        *9 DTM-DateTimePeriod
        *9 QTY-Quantity;

SegmentGroup11 =
         1 DMS-DocumentMessageSummary
        *1 DTM-DateTimePeriod
        *5 MEA-Measurements
       *25 SegmentGroup12
        *1 SegmentGroup14
       *10 SegmentGroup15
       *10 SegmentGroup17
        *5 SegmentGroup19
       *10 SegmentGroup20
     *9999 SegmentGroup22;

SegmentGroup12 =
         1 MOA-MonetaryAmount
        *1 SegmentGroup13;
    
SegmentGroup13 = 
         1 CUX-Currencies
        *1 DTM-DateTimePeriod;
    
SegmentGroup14 =
         1 TOD-TermsOfDeliveryOrTransport
        *2 LOC-PlaceLocationIdentification
        *1 FTX-FreeText;
    
SegmentGroup15 =
         1 NAD-NameAndAddress
       *10 SegmentGroup16;
    
SegmentGroup16 =
         1 DOC-DocumentMessageDetails
        *2 DTM-DateTimePeriod
        *1 LOC-PlaceLocationIdentification;

SegmentGroup17 =
         1 PAC-Package
      *999 SegmentGroup18;
    
SegmentGroup18 =
        *1 FTX-FreeText
         1 PCI-PackageIdentification
        *1 RFF-Reference;

SegmentGroup19 =
         1 PYT-PaymentTerms
        *1 MOA-MonetaryAmount
        *1 PCD-PercentageDetails
        *1 FTX-FreeText;

SegmentGroup20 =
         1 ALC-AllowanceOrCharge
        *1 RTE-RateDetails
        *1 MOA-MonetaryAmount
        *1 PCD-PercentageDetails
        *1 QTY-Quantity
        *1 SegmentGroup21;

SegmentGroup21 =
         1 CUX-Currencies
        *1 DTM-DateTimePeriod;

SegmentGroup22 =
         1 LIN-LineItem
        *1 PIA-AdditionalProductId
        *1 QTY-Quantity
        *2 PRI-PriceDetails
        *1 PCD-PercentageDetails
       *15 MEA-Measurements
        *5 QVR-QuantityVariances
       *15 MOA-MonetaryAmount
       *10 NAD-NameAndAddress
     *9999 GIR-RelatedIdentificationNumbers
       *99 GEI-ProcessingInformation
        *1 LOC-PlaceLocationIdentification
       *10 SegmentGroup23
       *10 SegmentGroup24
        *1 SegmentGroup26
        *5 SegmentGroup27
        *5 SegmentGroup28
       *10 SegmentGroup29;
    
SegmentGroup23 =
         1 DOC-DocumentMessageDetails
        *2 DTM-DateTimePeriod;

SegmentGroup24 =
         1 ALC-AllowanceOrCharge
        *1 RTE-RateDetails
        *1 MOA-MonetaryAmount
        *1 PCD-PercentageDetails
        *1 QTY-Quantity
        *1 SegmentGroup25;

SegmentGroup25 =
         1 CUX-Currencies
        *1 DTM-DateTimePeriod;

SegmentGroup26 =
         1 TOD-TermsOfDeliveryOrTransport
        *2 LOC-PlaceLocationIdentification;

SegmentGroup27 =
         1 PYT-PaymentTerms
        *1 MOA-MonetaryAmount
        *1 PCD-PercentageDetails
        *1 FTX-FreeText;
    
SegmentGroup28 =
         1 IMD-ItemDescription
        *1 FTX-FreeText;

SegmentGroup29 =
         1 PAC-Package
      *999 SegmentGroup30;
    
SegmentGroup30 =
         1 PCI-PackageIdentification
        *1 FTX-FreeText
        *1 RFF-Reference;

SegmentGroup31 =
         1 EFI-ExternalFileLinkIdentification
       *99 CED-ComputerEnvironmentDetails
        *9 COM-CommunicationContact
        *9 RFF-Reference
        *9 DTM-DateTimePeriod
        *9 QTY-Quantity;

SegmentGroup32 =
         1 CST-CustomsStatusOfGoods
        *9 FTX-FreeText
       *25 LOC-PlaceLocationIdentification
        *5 DTM-DateTimePeriod
       *20 MEA-Measurements
        *5 NAD-NameAndAddress
        *9 TDT-TransportInformation
       *10 SegmentGroup33
       *25 SegmentGroup35
      *999 SegmentGroup37
       *25 SegmentGroup39
        *1 SegmentGroup40
        *1 SegmentGroup41
       *25 SegmentGroup42
       *10 SegmentGroup43
        *1 SegmentGroup44
       *50 SegmentGroup46;

SegmentGroup33 =
         1 PAC-Package
      *999 SegmentGroup34;
    
SegmentGroup34 =
         1 PCI-PackageIdentification
        *1 FTX-FreeText;

SegmentGroup35 =
         1 MOA-MonetaryAmount
        *1 SegmentGroup36;
    
SegmentGroup36 =
         1 CUX-Currencies
        *1 DTM-DateTimePeriod;

SegmentGroup37 =
         1 RFF-Reference
        *1 DTM-DateTimePeriod
       *99 GIN-GoodsIdentityNumber
        *1 MOA-MonetaryAmount
        *1 SegmentGroup38;
    
SegmentGroup38 =
         1 IMD-ItemDescription
        *5 FTX-FreeText;

SegmentGroup39 =
         1 DOC-DocumentMessageDetails
        *2 DTM-DateTimePeriod
        *1 LOC-PlaceLocationIdentification
        *5 NAD-NameAndAddress;

SegmentGroup40 =
         1 TOD-TermsOfDeliveryOrTransport
        *2 LOC-PlaceLocationIdentification
        *1 FTX-FreeText;
    
SegmentGroup41 =
         1 GDS-NatureOfCargo
        *1 FTX-FreeText;

SegmentGroup42 =
         1 GEI-ProcessingInformation
        *1 PCD-PercentageDetails
        *1 DTM-DateTimePeriod
        *1 RFF-Reference;

SegmentGroup43 =
         1 TAX-DutyTaxFeeDetails
        *2 MOA-MonetaryAmount
        *1 GEI-ProcessingInformation;
    
SegmentGroup44 =
         1 QVR-QuantityVariances
        *1 QTY-Quantity
        *1 SegmentGroup45;

SegmentGroup45 =
         1 RFF-Reference
        *1 DTM-DateTimePeriod;

SegmentGroup46 =
         1 GIR-RelatedIdentificationNumbers
       *10 GEI-ProcessingInformation
        *1 NAD-NameAndAddress
        *5 MEA-Measurements
       *10 SegmentGroup47
       *10 SegmentGroup49
        *5 SegmentGroup50;

SegmentGroup47 =
         1 MOA-MonetaryAmount
        *1 SegmentGroup48;

SegmentGroup48 =
         1 CUX-Currencies
        *1 DTM-DateTimePeriod;

SegmentGroup49 = 
         1 TAX-DutyTaxFeeDetails
        *2 MOA-MonetaryAmount
        *1 GEI-ProcessingInformation;
    
SegmentGroup50 = 
         1 DOC-DocumentMessageDetails
        *2 DTM-DateTimePeriod
        *1 LOC-PlaceLocationIdentification;

SegmentGroup51 = 
         1 TAX-DutyTaxFeeDetails
        *2 MOA-MonetaryAmount
        *1 GEI-ProcessingInformation;

SegmentGroup52 = 
         1 AUT-AuthenticationResult
        *1 DTM-DateTimePeriod;

#------------------------------------------------------------------------
# Service Segments
#------------------------------------------------------------------------

SegmentTag-UNH = "UNH";
UNH-MessageHeader =
    SegmentTag-UNH ES
    S0062-MessageReferenceNumber ES
    S009-MessageIdentifier 
    *1(
        (
            ES [S0068-CommonAccessReference]
            ES S010-StatusOfTheTransfer
        )
        /
        (
            ES S0068-CommonAccessReference
        )
    )
    ST;

SegmentTag-UNT = "UNT";
UNT-MessageTrailer =
    SegmentTag-UNT ES
    S0074-NumberOfSegmentsInTheMessage ES
    S0062-MessageReferenceNumber
    ST;

SegmentTag-UNS = "UNS";
UNS-SectionControl =
    SegmentTag-UNS ES
    S0081-SectionIdentification
    ST;

S009-MessageIdentifier =
    S0065-MessageType CS
    S0052-MessageVersionNumber
    *1(
        (
            CS [S0054-MessageReleaseNumber]
            CS [S0051-ControllingAgency]
            CS S0057-AssociationAssignedCode
        )
        /
        (
            CS [S0054-MessageReleaseNumber]
            CS S0051-ControllingAgency
        )
        /
        (
            CS S0054-MessageReleaseNumber
        )
    );

S010-StatusOfTheTransfer =
    S0070-SequenceOfTransfers 
    [CS S0073-FirstAndLastTransfer];

S0051-ControllingAgency = 1*2an;
S0052-MessageVersionNumber = 1*3an;
S0054-MessageReleaseNumber = 1*3an;
S0057-AssociationAssignedCode = 1*6an;
S0062-MessageReferenceNumber = 1*14an;
S0065-MessageType = 1*6an;
S0068-CommonAccessReference = 1*35an;
S0070-SequenceOfTransfers = 1*2n;
S0073-FirstAndLastTransfer = 1a;
S0074-NumberOfSegmentsInTheMessage = 1*6n;
S0081-SectionIdentification = 1a;

#------------------------------------------------------------------------
# Segments
#------------------------------------------------------------------------

SegmentTag-ALC = "ALC";
ALC-AllowanceOrCharge =
SegmentTag-ALC ES
(
    (
        E5463-AllowanceOrChargeCodeQualifier ES
        [C552-AllowanceChargeInformation] ES
        [E4471-SettlementMeansCode] ES
        [E1227-CalculationSequenceCode] ES
        C214-SpecialServicesIdentification
    )
    /
    (
        E5463-AllowanceOrChargeCodeQualifier ES
        [C552-AllowanceChargeInformation] ES
        [E4471-SettlementMeansCode] ES
        E1227-CalculationSequenceCode
    )
    /
    (
        E5463-AllowanceOrChargeCodeQualifier ES
        [C552-AllowanceChargeInformation] ES
        E4471-SettlementMeansCode
    )
    /
    (
        E5463-AllowanceOrChargeCodeQualifier ES
        C552-AllowanceChargeInformation
    )
    /
    (
        E5463-AllowanceOrChargeCodeQualifier
    )
)
ST;

SegmentTag-AUT = "AUT";
AUT-AuthenticationResult =
SegmentTag-AUT ES
(
    (
        E9280-ValidationResultText ES
        E9282-ValidationKeyIdentifier
    )
    /
    (
        E9280-ValidationResultText
    )
)
ST;

SegmentTag-BGM = "BGM";
BGM-BeginningOfMessage =
SegmentTag-BGM ES
(
    (
        [C002-DocumentMessageName] ES
        [C106-DocumentMessageIdentification] ES
        [E1225-MessageFunctionCode] ES
        E4343-ResponseTypeCode
    )
    /
    (
        [C002-DocumentMessageName] ES
        [C106-DocumentMessageIdentification] ES
        E1225-MessageFunctionCode
    )
    /
    (
        [C002-DocumentMessageName] ES
        C106-DocumentMessageIdentification
    )
    /
    (
        C002-DocumentMessageName
    )
)
ST;

SegmentTag-CED = "CED";
CED-ComputerEnvironmentDetails =
SegmentTag-CED ES
(
    (
        E1501-ComputerEnvironmentDetailsCodeQualifier ES
        C079-ComputerEnvironmentIdentification ES
        E9448-FileGenerationCommandName
    )
    /
    (
        E1501-ComputerEnvironmentDetailsCodeQualifier ES
        C079-ComputerEnvironmentIdentification
    )
)
ST;

SegmentTag-CNT = "CNT";
CNT-ControlTotal =
SegmentTag-CNT ES
(
    (
        C270-Control
    )
)
ST;

SegmentTag-COM = "COM";
COM-CommunicationContact =
SegmentTag-COM ES
(
    (
        2(C076-CommunicationContact ES) C076-CommunicationContact
    )
)
ST;

SegmentTag-CST = "CST";
CST-CustomsStatusOfGoods =
SegmentTag-CST ES
(
    (
        [E1496-GoodsItemNumber] ES
        [C246-CustomsIdentityCodes] ES
        [C246-CustomsIdentityCodes] ES
        [C246-CustomsIdentityCodes] ES
        [C246-CustomsIdentityCodes] ES
        C246-CustomsIdentityCodes
    )
    /
    (
        [E1496-GoodsItemNumber] ES
        [C246-CustomsIdentityCodes] ES
        [C246-CustomsIdentityCodes] ES
        [C246-CustomsIdentityCodes] ES
        C246-CustomsIdentityCodes
    )
    /
    (
        [E1496-GoodsItemNumber] ES
        [C246-CustomsIdentityCodes] ES
        [C246-CustomsIdentityCodes] ES
        C246-CustomsIdentityCodes
    )
    /
    (
        [E1496-GoodsItemNumber] ES
        [C246-CustomsIdentityCodes] ES
        C246-CustomsIdentityCodes
    )
    /
    (
        [E1496-GoodsItemNumber] ES
        C246-CustomsIdentityCodes
    )
    /
    (
        E1496-GoodsItemNumber
    )
)
ST;

SegmentTag-CTA = "CTA";
CTA-ContactInformation =
SegmentTag-CTA ES
(
    (
        [E3139-ContactFunctionCode] ES
        C056-ContactDetails
    )
    /
    (
        E3139-ContactFunctionCode
    )
)
ST;

SegmentTag-CUX = "CUX";
CUX-Currencies =
SegmentTag-CUX ES
(
    (
        [C504-CurrencyDetails] ES
        [C504-CurrencyDetails] ES
        [E5402-CurrencyExchangeRate] ES
        E6341-ExchangeRateCurrencyMarketIdentifier
    )
    /
    (
        [C504-CurrencyDetails] ES
        [C504-CurrencyDetails] ES
        E5402-CurrencyExchangeRate
    )
    /
    (
        [C504-CurrencyDetails] ES
        C504-CurrencyDetails
    )
    /
    (
        C504-CurrencyDetails
    )
)
ST;

SegmentTag-DMS = "DMS";
DMS-DocumentMessageSummary =
SegmentTag-DMS ES
(
    (
        [C106-DocumentMessageIdentification] ES
        [C002-DocumentMessageName] ES
        E7240-ItemTotalQuantity
    )
    /
    (
        [C106-DocumentMessageIdentification] ES
        C002-DocumentMessageName
    )
    /
    (
        C106-DocumentMessageIdentification
    )
)
ST;

SegmentTag-DOC = "DOC";
DOC-DocumentMessageDetails =
SegmentTag-DOC ES
(
    (
        C002-DocumentMessageName ES
        [C503-DocumentMessageDetails] ES
        [E3153-CommunicationMediumTypeCode] ES
        [E1220-DocumentCopiesRequiredQuantity] ES
        E1218-DocumentOriginalsRequiredQuantity
    )
    /
    (
        C002-DocumentMessageName ES
        [C503-DocumentMessageDetails] ES
        [E3153-CommunicationMediumTypeCode] ES
        E1220-DocumentCopiesRequiredQuantity
    )
    /
    (
        C002-DocumentMessageName ES
        [C503-DocumentMessageDetails] ES
        E3153-CommunicationMediumTypeCode
    )
    /
    (
        C002-DocumentMessageName ES
        C503-DocumentMessageDetails
    )
    /
    (
        C002-DocumentMessageName
    )
)
ST;

SegmentTag-DTM = "DTM";
DTM-DateTimePeriod =
SegmentTag-DTM ES
(
    (
        C507-DateTimePeriod
    )
)
ST;

SegmentTag-EFI = "EFI";
EFI-ExternalFileLinkIdentification =
SegmentTag-EFI ES
(
    (
        C077-FileIdentification ES
        [C099-FileDetails] ES
        [E1050-SequencePositionIdentifier] ES
        E9450-FileCompressionTechniqueName
    )
    /
    (
        C077-FileIdentification ES
        [C099-FileDetails] ES
        E1050-SequencePositionIdentifier
    )
    /
    (
        C077-FileIdentification ES
        C099-FileDetails
    )
    /
    (
        C077-FileIdentification
    )
)
ST;

SegmentTag-EQD = "EQD";
EQD-EquipmentDetails =
SegmentTag-EQD ES
(
    (
        E8053-EquipmentTypeCodeQualifier ES
        [C237-EquipmentIdentification] ES
        [C224-EquipmentSizeAndType] ES
        [E8077-EquipmentSupplierCode] ES
        [E8249-EquipmentStatusCode] ES
        [E8169-FullOrEmptyIndicatorCode] ES
        E4233-MarkingInstructionsCode
    )
    /
    (
        E8053-EquipmentTypeCodeQualifier ES
        [C237-EquipmentIdentification] ES
        [C224-EquipmentSizeAndType] ES
        [E8077-EquipmentSupplierCode] ES
        [E8249-EquipmentStatusCode] ES
        E8169-FullOrEmptyIndicatorCode
    )
    /
    (
        E8053-EquipmentTypeCodeQualifier ES
        [C237-EquipmentIdentification] ES
        [C224-EquipmentSizeAndType] ES
        [E8077-EquipmentSupplierCode] ES
        E8249-EquipmentStatusCode
    )
    /
    (
        E8053-EquipmentTypeCodeQualifier ES
        [C237-EquipmentIdentification] ES
        [C224-EquipmentSizeAndType] ES
        E8077-EquipmentSupplierCode
    )
    /
    (
        E8053-EquipmentTypeCodeQualifier ES
        [C237-EquipmentIdentification] ES
        C224-EquipmentSizeAndType
    )
    /
    (
        E8053-EquipmentTypeCodeQualifier ES
        C237-EquipmentIdentification
    )
    /
    (
        E8053-EquipmentTypeCodeQualifier
    )
)
ST;

SegmentTag-FII = "FII";
FII-FinancialInstitutionInformation =
SegmentTag-FII ES
(
    (
        E3035-PartyFunctionCodeQualifier ES
        [C078-AccountHolderIdentification] ES
        [C088-InstitutionIdentification] ES
        E3207-CountryIdentifier
    )
    /
    (
        E3035-PartyFunctionCodeQualifier ES
        [C078-AccountHolderIdentification] ES
        C088-InstitutionIdentification
    )
    /
    (
        E3035-PartyFunctionCodeQualifier ES
        C078-AccountHolderIdentification
    )
    /
    (
        E3035-PartyFunctionCodeQualifier
    )
)
ST;

SegmentTag-FTX = "FTX";
FTX-FreeText =
SegmentTag-FTX ES
(
    (
        E4451-TextSubjectCodeQualifier ES
        [E4453-FreeTextFunctionCode] ES
        [C107-TextReference] ES
        [C108-TextLiteral] ES
        [E3453-LanguageNameCode] ES
        E4447-FreeTextFormatCode
    )
    /
    (
        E4451-TextSubjectCodeQualifier ES
        [E4453-FreeTextFunctionCode] ES
        [C107-TextReference] ES
        [C108-TextLiteral] ES
        E3453-LanguageNameCode
    )
    /
    (
        E4451-TextSubjectCodeQualifier ES
        [E4453-FreeTextFunctionCode] ES
        [C107-TextReference] ES
        C108-TextLiteral
    )
    /
    (
        E4451-TextSubjectCodeQualifier ES
        [E4453-FreeTextFunctionCode] ES
        C107-TextReference
    )
    /
    (
        E4451-TextSubjectCodeQualifier ES
        E4453-FreeTextFunctionCode
    )
    /
    (
        E4451-TextSubjectCodeQualifier
    )
)
ST;

SegmentTag-GDS = "GDS";
GDS-NatureOfCargo =
SegmentTag-GDS ES
(
    (
        C703-NatureOfCargo
    )
)
ST;

SegmentTag-GEI = "GEI";
GEI-ProcessingInformation =
SegmentTag-GEI ES
(
    (
        E9649-ProcessingInformationCodeQualifier ES
        [C012-ProcessingIndicator] ES
        E7187-ProcessTypeDescriptionCode
    )
    /
    (
        E9649-ProcessingInformationCodeQualifier ES
        C012-ProcessingIndicator
    )
    /
    (
        E9649-ProcessingInformationCodeQualifier
    )
)
ST;

SegmentTag-GIN = "GIN";
GIN-GoodsIdentityNumber =
SegmentTag-GIN ES
(
    (
        E7405-ObjectIdentificationCodeQualifier ES
        C208-IdentityNumberRange ES
        [C208-IdentityNumberRange] ES
        [C208-IdentityNumberRange] ES
        [C208-IdentityNumberRange] ES
        C208-IdentityNumberRange
    )
    /
    (
        E7405-ObjectIdentificationCodeQualifier ES
        C208-IdentityNumberRange ES
        [C208-IdentityNumberRange] ES
        [C208-IdentityNumberRange] ES
        C208-IdentityNumberRange
    )
    /
    (
        E7405-ObjectIdentificationCodeQualifier ES
        C208-IdentityNumberRange ES
        [C208-IdentityNumberRange] ES
        C208-IdentityNumberRange
    )
    /
    (
        E7405-ObjectIdentificationCodeQualifier ES
        C208-IdentityNumberRange ES
        C208-IdentityNumberRange
    )
    /
    (
        E7405-ObjectIdentificationCodeQualifier ES
        C208-IdentityNumberRange
    )
)
ST;

SegmentTag-GIR = "GIR";
GIR-RelatedIdentificationNumbers =
SegmentTag-GIR ES
(
    (
        E7297-SetTypeCodeQualifier ES
        C206-IdentificationNumber ES
        [C206-IdentificationNumber] ES
        [C206-IdentificationNumber] ES
        [C206-IdentificationNumber] ES
        C206-IdentificationNumber
    )
    /
    (
        E7297-SetTypeCodeQualifier ES
        C206-IdentificationNumber ES
        [C206-IdentificationNumber] ES
        [C206-IdentificationNumber] ES
        C206-IdentificationNumber
    )
    /
    (
        E7297-SetTypeCodeQualifier ES
        C206-IdentificationNumber ES
        [C206-IdentificationNumber] ES
        C206-IdentificationNumber
    )
    /
    (
        E7297-SetTypeCodeQualifier ES
        C206-IdentificationNumber ES
        C206-IdentificationNumber
    )
    /
    (
        E7297-SetTypeCodeQualifier ES
        C206-IdentificationNumber
    )
)
ST;

SegmentTag-IMD = "IMD";
IMD-ItemDescription =
SegmentTag-IMD ES
(
    (
        [E7077-DescriptionFormatCode] ES
        [C272-ItemCharacteristic] ES
        [C273-ItemDescription] ES
        E7383-SurfaceOrLayerCode
    )
    /
    (
        [E7077-DescriptionFormatCode] ES
        [C272-ItemCharacteristic] ES
        C273-ItemDescription
    )
    /
    (
        [E7077-DescriptionFormatCode] ES
        C272-ItemCharacteristic
    )
    /
    (
        E7077-DescriptionFormatCode
    )
)
ST;

SegmentTag-LIN = "LIN";
LIN-LineItem =
SegmentTag-LIN ES
(
    (
        [E1082-LineItemIdentifier] ES
        [E1229-ActionCode] ES
        [C212-ItemNumberIdentification] ES
        [C829-SubLineInformation] ES
        [E1222-ConfigurationLevelNumber] ES
        E7083-ConfigurationOperationCode
    )
    /
    (
        [E1082-LineItemIdentifier] ES
        [E1229-ActionCode] ES
        [C212-ItemNumberIdentification] ES
        [C829-SubLineInformation] ES
        E1222-ConfigurationLevelNumber
    )
    /
    (
        [E1082-LineItemIdentifier] ES
        [E1229-ActionCode] ES
        [C212-ItemNumberIdentification] ES
        C829-SubLineInformation
    )
    /
    (
        [E1082-LineItemIdentifier] ES
        [E1229-ActionCode] ES
        C212-ItemNumberIdentification
    )
    /
    (
        [E1082-LineItemIdentifier] ES
        E1229-ActionCode
    )
    /
    (
        E1082-LineItemIdentifier
    )
)
ST;

SegmentTag-LOC = "LOC";
LOC-PlaceLocationIdentification =
SegmentTag-LOC ES
(
    (
        E3227-LocationFunctionCodeQualifier ES
        [C517-LocationIdentification] ES
        [C519-RelatedLocationOneIdentification] ES
        [C553-RelatedLocationTwoIdentification] ES
        E5479-RelationCode
    )
    /
    (
        E3227-LocationFunctionCodeQualifier ES
        [C517-LocationIdentification] ES
        [C519-RelatedLocationOneIdentification] ES
        C553-RelatedLocationTwoIdentification
    )
    /
    (
        E3227-LocationFunctionCodeQualifier ES
        [C517-LocationIdentification] ES
        C519-RelatedLocationOneIdentification
    )
    /
    (
        E3227-LocationFunctionCodeQualifier ES
        C517-LocationIdentification
    )
    /
    (
        E3227-LocationFunctionCodeQualifier
    )
)
ST;

SegmentTag-MEA = "MEA";
MEA-Measurements =
SegmentTag-MEA ES
(
    (
        E6311-MeasurementPurposeCodeQualifier ES
        [C502-MeasurementDetails] ES
        [C174-ValueRange] ES
        E7383-SurfaceOrLayerCode
    )
    /
    (
        E6311-MeasurementPurposeCodeQualifier ES
        [C502-MeasurementDetails] ES
        C174-ValueRange
    )
    /
    (
        E6311-MeasurementPurposeCodeQualifier ES
        C502-MeasurementDetails
    )
    /
    (
        E6311-MeasurementPurposeCodeQualifier
    )
)
ST;

SegmentTag-MOA = "MOA";
MOA-MonetaryAmount =
SegmentTag-MOA ES
(
    (
        C516-MonetaryAmount
    )
)
ST;

SegmentTag-NAD = "NAD";
NAD-NameAndAddress =
SegmentTag-NAD ES
(
    (
        E3035-PartyFunctionCodeQualifier ES
        [C082-PartyIdentificationDetails] ES
        [C058-NameAndAddress] ES
        [C080-PartyName] ES
        [C059-Street] ES
        [E3164-CityName] ES
        [C819-CountrySubdivisionDetails] ES
        [E3251-PostalIdentificationCode] ES
        E3207-CountryIdentifier
    )
    /
    (
        E3035-PartyFunctionCodeQualifier ES
        [C082-PartyIdentificationDetails] ES
        [C058-NameAndAddress] ES
        [C080-PartyName] ES
        [C059-Street] ES
        [E3164-CityName] ES
        [C819-CountrySubdivisionDetails] ES
        E3251-PostalIdentificationCode
    )
    /
    (
        E3035-PartyFunctionCodeQualifier ES
        [C082-PartyIdentificationDetails] ES
        [C058-NameAndAddress] ES
        [C080-PartyName] ES
        [C059-Street] ES
        [E3164-CityName] ES
        C819-CountrySubdivisionDetails
    )
    /
    (
        E3035-PartyFunctionCodeQualifier ES
        [C082-PartyIdentificationDetails] ES
        [C058-NameAndAddress] ES
        [C080-PartyName] ES
        [C059-Street] ES
        E3164-CityName
    )
    /
    (
        E3035-PartyFunctionCodeQualifier ES
        [C082-PartyIdentificationDetails] ES
        [C058-NameAndAddress] ES
        [C080-PartyName] ES
        C059-Street
    )
    /
    (
        E3035-PartyFunctionCodeQualifier ES
        [C082-PartyIdentificationDetails] ES
        [C058-NameAndAddress] ES
        C080-PartyName
    )
    /
    (
        E3035-PartyFunctionCodeQualifier ES
        [C082-PartyIdentificationDetails] ES
        C058-NameAndAddress
    )
    /
    (
        E3035-PartyFunctionCodeQualifier ES
        C082-PartyIdentificationDetails
    )
    /
    (
        E3035-PartyFunctionCodeQualifier
    )
)
ST;

SegmentTag-PAC = "PAC";
PAC-Package =
SegmentTag-PAC ES
(
    (
        [E7224-PackageQuantity] ES
        [C531-PackagingDetails] ES
        [C202-PackageType] ES
        [C402-PackageTypeIdentification] ES
        C532-ReturnablePackageDetails
    )
    /
    (
        [E7224-PackageQuantity] ES
        [C531-PackagingDetails] ES
        [C202-PackageType] ES
        C402-PackageTypeIdentification
    )
    /
    (
        [E7224-PackageQuantity] ES
        [C531-PackagingDetails] ES
        C202-PackageType
    )
    /
    (
        [E7224-PackageQuantity] ES
        C531-PackagingDetails
    )
    /
    (
        E7224-PackageQuantity
    )
)
ST;

SegmentTag-PCD = "PCD";
PCD-PercentageDetails =
SegmentTag-PCD ES
(
    (
        C501-PercentageDetails ES
        E4405-StatusDescriptionCode
    )
    /
    (
        C501-PercentageDetails
    )
)
ST;

SegmentTag-PCI = "PCI";
PCI-PackageIdentification =
SegmentTag-PCI ES
(
    (
        [E4233-MarkingInstructionsCode] ES
        [C210-MarksLabels] ES
        [E8169-FullOrEmptyIndicatorCode] ES
        C827-TypeOfMarking
    )
    /
    (
        [E4233-MarkingInstructionsCode] ES
        [C210-MarksLabels] ES
        E8169-FullOrEmptyIndicatorCode
    )
    /
    (
        [E4233-MarkingInstructionsCode] ES
        C210-MarksLabels
    )
    /
    (
        E4233-MarkingInstructionsCode
    )
)
ST;

SegmentTag-PIA = "PIA";
PIA-AdditionalProductId =
SegmentTag-PIA ES
(
    (
        E4347-ProductIdentifierCodeQualifier ES
        C212-ItemNumberIdentification ES
        [C212-ItemNumberIdentification] ES
        [C212-ItemNumberIdentification] ES
        [C212-ItemNumberIdentification] ES
        C212-ItemNumberIdentification
    )
    /
    (
        E4347-ProductIdentifierCodeQualifier ES
        C212-ItemNumberIdentification ES
        [C212-ItemNumberIdentification] ES
        [C212-ItemNumberIdentification] ES
        C212-ItemNumberIdentification
    )
    /
    (
        E4347-ProductIdentifierCodeQualifier ES
        C212-ItemNumberIdentification ES
        [C212-ItemNumberIdentification] ES
        C212-ItemNumberIdentification
    )
    /
    (
        E4347-ProductIdentifierCodeQualifier ES
        C212-ItemNumberIdentification ES
        C212-ItemNumberIdentification
    )
    /
    (
        E4347-ProductIdentifierCodeQualifier ES
        C212-ItemNumberIdentification
    )
)
ST;

SegmentTag-PRI = "PRI";
PRI-PriceDetails =
SegmentTag-PRI ES
(
    (
        [C509-PriceInformation] ES
        E5213-SubLineItemPriceChangeOperationCode
    )
    /
    (
        C509-PriceInformation
    )
)
ST;

SegmentTag-PYT = "PYT";
PYT-PaymentTerms =
SegmentTag-PYT ES
(
    (
        E4279-PaymentTermsTypeCodeQualifier ES
        [C019-PaymentTerms] ES
        [E2475-EventTimeReferenceCode] ES
        [E2009-TermsTimeRelationCode] ES
        [E2151-PeriodTypeCode] ES
        E2152-PeriodCountQuantity
    )
    /
    (
        E4279-PaymentTermsTypeCodeQualifier ES
        [C019-PaymentTerms] ES
        [E2475-EventTimeReferenceCode] ES
        [E2009-TermsTimeRelationCode] ES
        E2151-PeriodTypeCode
    )
    /
    (
        E4279-PaymentTermsTypeCodeQualifier ES
        [C019-PaymentTerms] ES
        [E2475-EventTimeReferenceCode] ES
        E2009-TermsTimeRelationCode
    )
    /
    (
        E4279-PaymentTermsTypeCodeQualifier ES
        [C019-PaymentTerms] ES
        E2475-EventTimeReferenceCode
    )
    /
    (
        E4279-PaymentTermsTypeCodeQualifier ES
        C019-PaymentTerms
    )
    /
    (
        E4279-PaymentTermsTypeCodeQualifier
    )
)
ST;

SegmentTag-QTY = "QTY";
QTY-Quantity =
SegmentTag-QTY ES
(
    (
        C186-QuantityDetails
    )
)
ST;

SegmentTag-QVR = "QVR";
QVR-QuantityVariances =
SegmentTag-QVR ES
(
    (
        [C279-QuantityDifferenceInformation] ES
        [E4221-DiscrepancyNatureIdentificationCode] ES
        C960-ReasonForChange
    )
    /
    (
        [C279-QuantityDifferenceInformation] ES
        E4221-DiscrepancyNatureIdentificationCode
    )
    /
    (
        C279-QuantityDifferenceInformation
    )
)
ST;

SegmentTag-RFF = "RFF";
RFF-Reference =
SegmentTag-RFF ES
(
    (
        C506-Reference
    )
)
ST;

SegmentTag-RTE = "RTE";
RTE-RateDetails =
SegmentTag-RTE ES
(
    (
        C128-RateDetails ES
        E4405-StatusDescriptionCode
    )
    /
    (
        C128-RateDetails
    )
)
ST;

SegmentTag-SEL = "SEL";
SEL-SealNumber =
SegmentTag-SEL ES
(
    (
        [E9308-TransportUnitSealIdentifier] ES
        [C215-SealIssuer] ES
        [E4517-SealConditionCode] ES
        [C208-IdentityNumberRange] ES
        E4525-SealTypeCode
    )
    /
    (
        [E9308-TransportUnitSealIdentifier] ES
        [C215-SealIssuer] ES
        [E4517-SealConditionCode] ES
        C208-IdentityNumberRange
    )
    /
    (
        [E9308-TransportUnitSealIdentifier] ES
        [C215-SealIssuer] ES
        E4517-SealConditionCode
    )
    /
    (
        [E9308-TransportUnitSealIdentifier] ES
        C215-SealIssuer
    )
    /
    (
        E9308-TransportUnitSealIdentifier
    )
)
ST;

SegmentTag-TAX = "TAX";
TAX-DutyTaxFeeDetails =
SegmentTag-TAX ES
(
    (
        E5283-DutyOrTaxOrFeeFunctionCodeQualifier ES
        [C241-DutyTaxFeeType] ES
        [C533-DutyTaxFeeAccountDetail] ES
        [E5286-DutyOrTaxOrFeeAssessmentBasisQuantity] ES
        [C243-DutyTaxFeeDetail] ES
        [E5305-DutyOrTaxOrFeeCategoryCode] ES
        [E3446-PartyTaxIdentifier] ES
        [E1227-CalculationSequenceCode] ES
        E5307-TaxOrDutyOrFeePaymentDueDateCode
    )
    /
    (
        E5283-DutyOrTaxOrFeeFunctionCodeQualifier ES
        [C241-DutyTaxFeeType] ES
        [C533-DutyTaxFeeAccountDetail] ES
        [E5286-DutyOrTaxOrFeeAssessmentBasisQuantity] ES
        [C243-DutyTaxFeeDetail] ES
        [E5305-DutyOrTaxOrFeeCategoryCode] ES
        [E3446-PartyTaxIdentifier] ES
        E1227-CalculationSequenceCode
    )
    /
    (
        E5283-DutyOrTaxOrFeeFunctionCodeQualifier ES
        [C241-DutyTaxFeeType] ES
        [C533-DutyTaxFeeAccountDetail] ES
        [E5286-DutyOrTaxOrFeeAssessmentBasisQuantity] ES
        [C243-DutyTaxFeeDetail] ES
        [E5305-DutyOrTaxOrFeeCategoryCode] ES
        E3446-PartyTaxIdentifier
    )
    /
    (
        E5283-DutyOrTaxOrFeeFunctionCodeQualifier ES
        [C241-DutyTaxFeeType] ES
        [C533-DutyTaxFeeAccountDetail] ES
        [E5286-DutyOrTaxOrFeeAssessmentBasisQuantity] ES
        [C243-DutyTaxFeeDetail] ES
        E5305-DutyOrTaxOrFeeCategoryCode
    )
    /
    (
        E5283-DutyOrTaxOrFeeFunctionCodeQualifier ES
        [C241-DutyTaxFeeType] ES
        [C533-DutyTaxFeeAccountDetail] ES
        [E5286-DutyOrTaxOrFeeAssessmentBasisQuantity] ES
        C243-DutyTaxFeeDetail
    )
    /
    (
        E5283-DutyOrTaxOrFeeFunctionCodeQualifier ES
        [C241-DutyTaxFeeType] ES
        [C533-DutyTaxFeeAccountDetail] ES
        E5286-DutyOrTaxOrFeeAssessmentBasisQuantity
    )
    /
    (
        E5283-DutyOrTaxOrFeeFunctionCodeQualifier ES
        [C241-DutyTaxFeeType] ES
        C533-DutyTaxFeeAccountDetail
    )
    /
    (
        E5283-DutyOrTaxOrFeeFunctionCodeQualifier ES
        C241-DutyTaxFeeType
    )
    /
    (
        E5283-DutyOrTaxOrFeeFunctionCodeQualifier
    )
)
ST;

SegmentTag-TDT = "TDT";
TDT-TransportInformation =
SegmentTag-TDT ES
(
    (
        E8051-TransportStageCodeQualifier ES
        [E8028-MeansOfTransportJourneyIdentifier] ES
        [C220-ModeOfTransport] ES
        [C001-TransportMeans] ES
        [C040-Carrier] ES
        [E8101-TransitDirectionIndicatorCode] ES
        [C401-ExcessTransportationInformation] ES
        [C222-TransportIdentification] ES
        E8281-TransportMeansOwnershipIndicatorCode
    )
    /
    (
        E8051-TransportStageCodeQualifier ES
        [E8028-MeansOfTransportJourneyIdentifier] ES
        [C220-ModeOfTransport] ES
        [C001-TransportMeans] ES
        [C040-Carrier] ES
        [E8101-TransitDirectionIndicatorCode] ES
        [C401-ExcessTransportationInformation] ES
        C222-TransportIdentification
    )
    /
    (
        E8051-TransportStageCodeQualifier ES
        [E8028-MeansOfTransportJourneyIdentifier] ES
        [C220-ModeOfTransport] ES
        [C001-TransportMeans] ES
        [C040-Carrier] ES
        [E8101-TransitDirectionIndicatorCode] ES
        C401-ExcessTransportationInformation
    )
    /
    (
        E8051-TransportStageCodeQualifier ES
        [E8028-MeansOfTransportJourneyIdentifier] ES
        [C220-ModeOfTransport] ES
        [C001-TransportMeans] ES
        [C040-Carrier] ES
        E8101-TransitDirectionIndicatorCode
    )
    /
    (
        E8051-TransportStageCodeQualifier ES
        [E8028-MeansOfTransportJourneyIdentifier] ES
        [C220-ModeOfTransport] ES
        [C001-TransportMeans] ES
        C040-Carrier
    )
    /
    (
        E8051-TransportStageCodeQualifier ES
        [E8028-MeansOfTransportJourneyIdentifier] ES
        [C220-ModeOfTransport] ES
        C001-TransportMeans
    )
    /
    (
        E8051-TransportStageCodeQualifier ES
        [E8028-MeansOfTransportJourneyIdentifier] ES
        C220-ModeOfTransport
    )
    /
    (
        E8051-TransportStageCodeQualifier ES
        E8028-MeansOfTransportJourneyIdentifier
    )
    /
    (
        E8051-TransportStageCodeQualifier
    )
)
ST;

SegmentTag-TOD = "TOD";
TOD-TermsOfDeliveryOrTransport =
SegmentTag-TOD ES
(
    (
        [E4055-DeliveryOrTransportTermsFunctionCode] ES
        [E4215-TransportChargesPaymentMethodCode] ES
        C100-TermsOfDeliveryOrTransport
    )
    /
    (
        [E4055-DeliveryOrTransportTermsFunctionCode] ES
        E4215-TransportChargesPaymentMethodCode
    )
    /
    (
        E4055-DeliveryOrTransportTermsFunctionCode
    )
)
ST;

SegmentTag-TPL = "TPL";
TPL-TransportPlacement =
SegmentTag-TPL ES
(
    (
        C222-TransportIdentification
    )
)
ST;

#------------------------------------------------------------------------
# Composite Data Elements
#------------------------------------------------------------------------

C001-TransportMeans =
(
    [E8179-TransportMeansDescriptionCode] CS
    [E1131-CodeListIdentificationCode] CS
    [E3055-CodeListResponsibleAgencyCode] CS
    E8178-TransportMeansDescription
)
/
(
    [E8179-TransportMeansDescriptionCode] CS
    [E1131-CodeListIdentificationCode] CS
    E3055-CodeListResponsibleAgencyCode
)
/
(
    [E8179-TransportMeansDescriptionCode] CS
    E1131-CodeListIdentificationCode
)
/
(
    E8179-TransportMeansDescriptionCode
);

C002-DocumentMessageName =
(
    [E1001-DocumentNameCode] CS
    [E1131-CodeListIdentificationCode] CS
    [E3055-CodeListResponsibleAgencyCode] CS
    E1000-DocumentName
)
/
(
    [E1001-DocumentNameCode] CS
    [E1131-CodeListIdentificationCode] CS
    E3055-CodeListResponsibleAgencyCode
)
/
(
    [E1001-DocumentNameCode] CS
    E1131-CodeListIdentificationCode
)
/
(
    E1001-DocumentNameCode
);

C012-ProcessingIndicator =
(
    [E7365-ProcessingIndicatorDescriptionCode] CS
    [E1131-CodeListIdentificationCode] CS
    [E3055-CodeListResponsibleAgencyCode] CS
    E7364-ProcessingIndicatorDescription
)
/
(
    [E7365-ProcessingIndicatorDescriptionCode] CS
    [E1131-CodeListIdentificationCode] CS
    E3055-CodeListResponsibleAgencyCode
)
/
(
    [E7365-ProcessingIndicatorDescriptionCode] CS
    E1131-CodeListIdentificationCode
)
/
(
    E7365-ProcessingIndicatorDescriptionCode
);

C019-PaymentTerms =
(
    [E4277-PaymentTermsDescriptionIdentifier] CS
    [E1131-CodeListIdentificationCode] CS
    [E3055-CodeListResponsibleAgencyCode] CS
    E4276-PaymentTermsDescription
)
/
(
    [E4277-PaymentTermsDescriptionIdentifier] CS
    [E1131-CodeListIdentificationCode] CS
    E3055-CodeListResponsibleAgencyCode
)
/
(
    [E4277-PaymentTermsDescriptionIdentifier] CS
    E1131-CodeListIdentificationCode
)
/
(
    E4277-PaymentTermsDescriptionIdentifier
);

C040-Carrier =
(
    [E3127-CarrierIdentifier] CS
    [E1131-CodeListIdentificationCode] CS
    [E3055-CodeListResponsibleAgencyCode] CS
    E3126-CarrierName
)
/
(
    [E3127-CarrierIdentifier] CS
    [E1131-CodeListIdentificationCode] CS
    E3055-CodeListResponsibleAgencyCode
)
/
(
    [E3127-CarrierIdentifier] CS
    E1131-CodeListIdentificationCode
)
/
(
    E3127-CarrierIdentifier
);

C056-ContactDetails =
(
    [E3413-ContactIdentifier] CS
    E3412-ContactName
)
/
(
    E3413-ContactIdentifier
);

C058-NameAndAddress =
(
    E3124-NameAndAddressDescription CS
    [E3124-NameAndAddressDescription] CS
    [E3124-NameAndAddressDescription] CS
    [E3124-NameAndAddressDescription] CS
    E3124-NameAndAddressDescription
)
/
(
    E3124-NameAndAddressDescription CS
    [E3124-NameAndAddressDescription] CS
    [E3124-NameAndAddressDescription] CS
    E3124-NameAndAddressDescription
)
/
(
    E3124-NameAndAddressDescription CS
    [E3124-NameAndAddressDescription] CS
    E3124-NameAndAddressDescription
)
/
(
    E3124-NameAndAddressDescription CS
    E3124-NameAndAddressDescription
)
/
(
    E3124-NameAndAddressDescription
);

C059-Street =
(
    E3042-StreetAndNumberOrPostOfficeBoxIdentifier CS
    [E3042-StreetAndNumberOrPostOfficeBoxIdentifier] CS
    [E3042-StreetAndNumberOrPostOfficeBoxIdentifier] CS
    E3042-StreetAndNumberOrPostOfficeBoxIdentifier
)
/
(
    E3042-StreetAndNumberOrPostOfficeBoxIdentifier CS
    [E3042-StreetAndNumberOrPostOfficeBoxIdentifier] CS
    E3042-StreetAndNumberOrPostOfficeBoxIdentifier
)
/
(
    E3042-StreetAndNumberOrPostOfficeBoxIdentifier CS
    E3042-StreetAndNumberOrPostOfficeBoxIdentifier
)
/
(
    E3042-StreetAndNumberOrPostOfficeBoxIdentifier
);

C076-CommunicationContact =
(
    E3148-CommunicationAddressIdentifier CS
    E3155-CommunicationMeansTypeCode
);

C077-FileIdentification =
(
    [E1508-FileName] CS
    E7008-ItemDescription
)
/
(
    E1508-FileName
);

C078-AccountHolderIdentification =
(
    [E3194-AccountHolderIdentifier] CS
    [E3192-AccountHolderName] CS
    [E3192-AccountHolderName] CS
    E6345-CurrencyIdentificationCode
)
/
(
    [E3194-AccountHolderIdentifier] CS
    [E3192-AccountHolderName] CS
    E3192-AccountHolderName
)
/
(
    [E3194-AccountHolderIdentifier] CS
    E3192-AccountHolderName
)
/
(
    E3194-AccountHolderIdentifier
);

C079-ComputerEnvironmentIdentification =
(
    [E1511-ComputerEnvironmentNameCode] CS
    [E1131-CodeListIdentificationCode] CS
    [E3055-CodeListResponsibleAgencyCode] CS
    [E1510-ComputerEnvironmentName] CS
    [E1056-VersionIdentifier] CS
    [E1058-ReleaseIdentifier] CS
    E7402-ObjectIdentifier
)
/
(
    [E1511-ComputerEnvironmentNameCode] CS
    [E1131-CodeListIdentificationCode] CS
    [E3055-CodeListResponsibleAgencyCode] CS
    [E1510-ComputerEnvironmentName] CS
    [E1056-VersionIdentifier] CS
    E1058-ReleaseIdentifier
)
/
(
    [E1511-ComputerEnvironmentNameCode] CS
    [E1131-CodeListIdentificationCode] CS
    [E3055-CodeListResponsibleAgencyCode] CS
    [E1510-ComputerEnvironmentName] CS
    E1056-VersionIdentifier
)
/
(
    [E1511-ComputerEnvironmentNameCode] CS
    [E1131-CodeListIdentificationCode] CS
    [E3055-CodeListResponsibleAgencyCode] CS
    E1510-ComputerEnvironmentName
)
/
(
    [E1511-ComputerEnvironmentNameCode] CS
    [E1131-CodeListIdentificationCode] CS
    E3055-CodeListResponsibleAgencyCode
)
/
(
    [E1511-ComputerEnvironmentNameCode] CS
    E1131-CodeListIdentificationCode
)
/
(
    E1511-ComputerEnvironmentNameCode
);

C080-PartyName =
(
    E3036-PartyName CS
    [E3036-PartyName] CS
    [E3036-PartyName] CS
    [E3036-PartyName] CS
    [E3036-PartyName] CS
    E3045-PartyNameFormatCode
)
/
(
    E3036-PartyName CS
    [E3036-PartyName] CS
    [E3036-PartyName] CS
    [E3036-PartyName] CS
    E3036-PartyName
)
/
(
    E3036-PartyName CS
    [E3036-PartyName] CS
    [E3036-PartyName] CS
    E3036-PartyName
)
/
(
    E3036-PartyName CS
    [E3036-PartyName] CS
    E3036-PartyName
)
/
(
    E3036-PartyName CS
    E3036-PartyName
)
/
(
    E3036-PartyName
);

C082-PartyIdentificationDetails =
(
    E3039-PartyIdentifier CS
    [E1131-CodeListIdentificationCode] CS
    E3055-CodeListResponsibleAgencyCode
)
/
(
    E3039-PartyIdentifier CS
    E1131-CodeListIdentificationCode
)
/
(
    E3039-PartyIdentifier
);

C088-InstitutionIdentification =
(
    [E3433-InstitutionNameCode] CS
    [E1131-CodeListIdentificationCode] CS
    [E3055-CodeListResponsibleAgencyCode] CS
    [E3434-InstitutionBranchIdentifier] CS
    [E1131-CodeListIdentificationCode] CS
    [E3055-CodeListResponsibleAgencyCode] CS
    [E3432-InstitutionName] CS
    E3436-InstitutionBranchLocationName
)
/
(
    [E3433-InstitutionNameCode] CS
    [E1131-CodeListIdentificationCode] CS
    [E3055-CodeListResponsibleAgencyCode] CS
    [E3434-InstitutionBranchIdentifier] CS
    [E1131-CodeListIdentificationCode] CS
    [E3055-CodeListResponsibleAgencyCode] CS
    E3432-InstitutionName
)
/
(
    [E3433-InstitutionNameCode] CS
    [E1131-CodeListIdentificationCode] CS
    [E3055-CodeListResponsibleAgencyCode] CS
    [E3434-InstitutionBranchIdentifier] CS
    [E1131-CodeListIdentificationCode] CS
    E3055-CodeListResponsibleAgencyCode
)
/
(
    [E3433-InstitutionNameCode] CS
    [E1131-CodeListIdentificationCode] CS
    [E3055-CodeListResponsibleAgencyCode] CS
    [E3434-InstitutionBranchIdentifier] CS
    E1131-CodeListIdentificationCode
)
/
(
    [E3433-InstitutionNameCode] CS
    [E1131-CodeListIdentificationCode] CS
    [E3055-CodeListResponsibleAgencyCode] CS
    E3434-InstitutionBranchIdentifier
)
/
(
    [E3433-InstitutionNameCode] CS
    [E1131-CodeListIdentificationCode] CS
    E3055-CodeListResponsibleAgencyCode
)
/
(
    [E3433-InstitutionNameCode] CS
    E1131-CodeListIdentificationCode
)
/
(
    E3433-InstitutionNameCode
);

C099-FileDetails =
(
    E1516-FileFormatName CS
    [E1056-VersionIdentifier] CS
    [E1503-DataFormatDescriptionCode] CS
    E1502-DataFormatDescription
)
/
(
    E1516-FileFormatName CS
    [E1056-VersionIdentifier] CS
    E1503-DataFormatDescriptionCode
)
/
(
    E1516-FileFormatName CS
    E1056-VersionIdentifier
)
/
(
    E1516-FileFormatName
);

C100-TermsOfDeliveryOrTransport =
(
    [E4053-DeliveryOrTransportTermsDescriptionCode] CS
    [E1131-CodeListIdentificationCode] CS
    [E3055-CodeListResponsibleAgencyCode] CS
    [E4052-DeliveryOrTransportTermsDescription] CS
    E4052-DeliveryOrTransportTermsDescription
)
/
(
    [E4053-DeliveryOrTransportTermsDescriptionCode] CS
    [E1131-CodeListIdentificationCode] CS
    [E3055-CodeListResponsibleAgencyCode] CS
    E4052-DeliveryOrTransportTermsDescription
)
/
(
    [E4053-DeliveryOrTransportTermsDescriptionCode] CS
    [E1131-CodeListIdentificationCode] CS
    E3055-CodeListResponsibleAgencyCode
)
/
(
    [E4053-DeliveryOrTransportTermsDescriptionCode] CS
    E1131-CodeListIdentificationCode
)
/
(
    E4053-DeliveryOrTransportTermsDescriptionCode
);

C106-DocumentMessageIdentification =
(
    [E1004-DocumentIdentifier] CS
    [E1056-VersionIdentifier] CS
    E1060-RevisionIdentifier
)
/
(
    [E1004-DocumentIdentifier] CS
    E1056-VersionIdentifier
)
/
(
    E1004-DocumentIdentifier
);

C107-TextReference =
(
    E4441-FreeTextDescriptionCode CS
    [E1131-CodeListIdentificationCode] CS
    E3055-CodeListResponsibleAgencyCode
)
/
(
    E4441-FreeTextDescriptionCode CS
    E1131-CodeListIdentificationCode
)
/
(
    E4441-FreeTextDescriptionCode
);

C108-TextLiteral =
(
    E4440-FreeText CS
    [E4440-FreeText] CS
    [E4440-FreeText] CS
    [E4440-FreeText] CS
    E4440-FreeText
)
/
(
    E4440-FreeText CS
    [E4440-FreeText] CS
    [E4440-FreeText] CS
    E4440-FreeText
)
/
(
    E4440-FreeText CS
    [E4440-FreeText] CS
    E4440-FreeText
)
/
(
    E4440-FreeText CS
    E4440-FreeText
)
/
(
    E4440-FreeText
);

C128-RateDetails =
(
    E5419-RateTypeCodeQualifier CS
    E5420-UnitPriceBasisRate CS
    [E5284-UnitPriceBasisQuantity] CS
    E6411-MeasurementUnitCode
)
/
(
    E5419-RateTypeCodeQualifier CS
    E5420-UnitPriceBasisRate CS
    E5284-UnitPriceBasisQuantity
)
/
(
    E5419-RateTypeCodeQualifier CS
    E5420-UnitPriceBasisRate
);

C174-ValueRange =
(
    E6411-MeasurementUnitCode CS
    [E6314-Measure] CS
    [E6162-RangeMinimumQuantity] CS
    [E6152-RangeMaximumQuantity] CS
    E6432-SignificantDigitsQuantity
)
/
(
    E6411-MeasurementUnitCode CS
    [E6314-Measure] CS
    [E6162-RangeMinimumQuantity] CS
    E6152-RangeMaximumQuantity
)
/
(
    E6411-MeasurementUnitCode CS
    [E6314-Measure] CS
    E6162-RangeMinimumQuantity
)
/
(
    E6411-MeasurementUnitCode CS
    E6314-Measure
)
/
(
    E6411-MeasurementUnitCode
);

C186-QuantityDetails =
(
    E6063-QuantityTypeCodeQualifier CS
    E6060-Quantity CS
    E6411-MeasurementUnitCode
)
/
(
    E6063-QuantityTypeCodeQualifier CS
    E6060-Quantity
);

C202-PackageType =
(
    [E7065-PackageTypeDescriptionCode] CS
    [E1131-CodeListIdentificationCode] CS
    [E3055-CodeListResponsibleAgencyCode] CS
    E7064-TypeOfPackages
)
/
(
    [E7065-PackageTypeDescriptionCode] CS
    [E1131-CodeListIdentificationCode] CS
    E3055-CodeListResponsibleAgencyCode
)
/
(
    [E7065-PackageTypeDescriptionCode] CS
    E1131-CodeListIdentificationCode
)
/
(
    E7065-PackageTypeDescriptionCode
);

C206-IdentificationNumber =
(
    E7402-ObjectIdentifier CS
    [E7405-ObjectIdentificationCodeQualifier] CS
    E4405-StatusDescriptionCode
)
/
(
    E7402-ObjectIdentifier CS
    E7405-ObjectIdentificationCodeQualifier
)
/
(
    E7402-ObjectIdentifier
);

C208-IdentityNumberRange =
(
    E7402-ObjectIdentifier CS
    E7402-ObjectIdentifier
)
/
(
    E7402-ObjectIdentifier
);

C210-MarksLabels =
(
    E7102-ShippingMarksDescription CS
    [E7102-ShippingMarksDescription] CS
    [E7102-ShippingMarksDescription] CS
    [E7102-ShippingMarksDescription] CS
    [E7102-ShippingMarksDescription] CS
    [E7102-ShippingMarksDescription] CS
    [E7102-ShippingMarksDescription] CS
    [E7102-ShippingMarksDescription] CS
    [E7102-ShippingMarksDescription] CS
    E7102-ShippingMarksDescription
)
/
(
    E7102-ShippingMarksDescription CS
    [E7102-ShippingMarksDescription] CS
    [E7102-ShippingMarksDescription] CS
    [E7102-ShippingMarksDescription] CS
    [E7102-ShippingMarksDescription] CS
    [E7102-ShippingMarksDescription] CS
    [E7102-ShippingMarksDescription] CS
    [E7102-ShippingMarksDescription] CS
    E7102-ShippingMarksDescription
)
/
(
    E7102-ShippingMarksDescription CS
    [E7102-ShippingMarksDescription] CS
    [E7102-ShippingMarksDescription] CS
    [E7102-ShippingMarksDescription] CS
    [E7102-ShippingMarksDescription] CS
    [E7102-ShippingMarksDescription] CS
    [E7102-ShippingMarksDescription] CS
    E7102-ShippingMarksDescription
)
/
(
    E7102-ShippingMarksDescription CS
    [E7102-ShippingMarksDescription] CS
    [E7102-ShippingMarksDescription] CS
    [E7102-ShippingMarksDescription] CS
    [E7102-ShippingMarksDescription] CS
    [E7102-ShippingMarksDescription] CS
    E7102-ShippingMarksDescription
)
/
(
    E7102-ShippingMarksDescription CS
    [E7102-ShippingMarksDescription] CS
    [E7102-ShippingMarksDescription] CS
    [E7102-ShippingMarksDescription] CS
    [E7102-ShippingMarksDescription] CS
    E7102-ShippingMarksDescription
)
/
(
    E7102-ShippingMarksDescription CS
    [E7102-ShippingMarksDescription] CS
    [E7102-ShippingMarksDescription] CS
    [E7102-ShippingMarksDescription] CS
    E7102-ShippingMarksDescription
)
/
(
    E7102-ShippingMarksDescription CS
    [E7102-ShippingMarksDescription] CS
    [E7102-ShippingMarksDescription] CS
    E7102-ShippingMarksDescription
)
/
(
    E7102-ShippingMarksDescription CS
    [E7102-ShippingMarksDescription] CS
    E7102-ShippingMarksDescription
)
/
(
    E7102-ShippingMarksDescription CS
    E7102-ShippingMarksDescription
)
/
(
    E7102-ShippingMarksDescription
);

C212-ItemNumberIdentification =
(
    [E7140-ItemIdentifier] CS
    [E7143-ItemTypeIdentificationCode] CS
    [E1131-CodeListIdentificationCode] CS
    E3055-CodeListResponsibleAgencyCode
)
/
(
    [E7140-ItemIdentifier] CS
    [E7143-ItemTypeIdentificationCode] CS
    E1131-CodeListIdentificationCode
)
/
(
    [E7140-ItemIdentifier] CS
    E7143-ItemTypeIdentificationCode
)
/
(
    E7140-ItemIdentifier
);

C214-SpecialServicesIdentification =
(
    [E7161-SpecialServiceDescriptionCode] CS
    [E1131-CodeListIdentificationCode] CS
    [E3055-CodeListResponsibleAgencyCode] CS
    [E7160-SpecialServiceDescription] CS
    E7160-SpecialServiceDescription
)
/
(
    [E7161-SpecialServiceDescriptionCode] CS
    [E1131-CodeListIdentificationCode] CS
    [E3055-CodeListResponsibleAgencyCode] CS
    E7160-SpecialServiceDescription
)
/
(
    [E7161-SpecialServiceDescriptionCode] CS
    [E1131-CodeListIdentificationCode] CS
    E3055-CodeListResponsibleAgencyCode
)
/
(
    [E7161-SpecialServiceDescriptionCode] CS
    E1131-CodeListIdentificationCode
)
/
(
    E7161-SpecialServiceDescriptionCode
);

C215-SealIssuer =
(
    [E9303-SealingPartyNameCode] CS
    [E1131-CodeListIdentificationCode] CS
    [E3055-CodeListResponsibleAgencyCode] CS
    E9302-SealingPartyName
)
/
(
    [E9303-SealingPartyNameCode] CS
    [E1131-CodeListIdentificationCode] CS
    E3055-CodeListResponsibleAgencyCode
)
/
(
    [E9303-SealingPartyNameCode] CS
    E1131-CodeListIdentificationCode
)
/
(
    E9303-SealingPartyNameCode
);

C220-ModeOfTransport =
(
    [E8067-TransportModeNameCode] CS
    E8066-TransportModeName
)
/
(
    E8067-TransportModeNameCode
);

C222-TransportIdentification =
(
    [E8213-TransportMeansIdentificationNameIdentifier] CS
    [E1131-CodeListIdentificationCode] CS
    [E3055-CodeListResponsibleAgencyCode] CS
    [E8212-TransportMeansIdentificationName] CS
    E8453-TransportMeansNationalityCode
)
/
(
    [E8213-TransportMeansIdentificationNameIdentifier] CS
    [E1131-CodeListIdentificationCode] CS
    [E3055-CodeListResponsibleAgencyCode] CS
    E8212-TransportMeansIdentificationName
)
/
(
    [E8213-TransportMeansIdentificationNameIdentifier] CS
    [E1131-CodeListIdentificationCode] CS
    E3055-CodeListResponsibleAgencyCode
)
/
(
    [E8213-TransportMeansIdentificationNameIdentifier] CS
    E1131-CodeListIdentificationCode
)
/
(
    E8213-TransportMeansIdentificationNameIdentifier
);

C224-EquipmentSizeAndType =
(
    [E8155-EquipmentSizeAndTypeDescriptionCode] CS
    [E1131-CodeListIdentificationCode] CS
    [E3055-CodeListResponsibleAgencyCode] CS
    E8154-EquipmentSizeAndTypeDescription
)
/
(
    [E8155-EquipmentSizeAndTypeDescriptionCode] CS
    [E1131-CodeListIdentificationCode] CS
    E3055-CodeListResponsibleAgencyCode
)
/
(
    [E8155-EquipmentSizeAndTypeDescriptionCode] CS
    E1131-CodeListIdentificationCode
)
/
(
    E8155-EquipmentSizeAndTypeDescriptionCode
);

C237-EquipmentIdentification =
(
    [E8260-EquipmentIdentifier] CS
    [E1131-CodeListIdentificationCode] CS
    [E3055-CodeListResponsibleAgencyCode] CS
    E3207-CountryIdentifier
)
/
(
    [E8260-EquipmentIdentifier] CS
    [E1131-CodeListIdentificationCode] CS
    E3055-CodeListResponsibleAgencyCode
)
/
(
    [E8260-EquipmentIdentifier] CS
    E1131-CodeListIdentificationCode
)
/
(
    E8260-EquipmentIdentifier
);

C241-DutyTaxFeeType =
(
    [E5153-DutyOrTaxOrFeeTypeNameCode] CS
    [E1131-CodeListIdentificationCode] CS
    [E3055-CodeListResponsibleAgencyCode] CS
    E5152-DutyOrTaxOrFeeTypeName
)
/
(
    [E5153-DutyOrTaxOrFeeTypeNameCode] CS
    [E1131-CodeListIdentificationCode] CS
    E3055-CodeListResponsibleAgencyCode
)
/
(
    [E5153-DutyOrTaxOrFeeTypeNameCode] CS
    E1131-CodeListIdentificationCode
)
/
(
    E5153-DutyOrTaxOrFeeTypeNameCode
);

C243-DutyTaxFeeDetail =
(
    [E5279-DutyOrTaxOrFeeRateCode] CS
    [E1131-CodeListIdentificationCode] CS
    [E3055-CodeListResponsibleAgencyCode] CS
    [E5278-DutyOrTaxOrFeeRate] CS
    [E5273-DutyOrTaxOrFeeRateBasisCode] CS
    [E1131-CodeListIdentificationCode] CS
    E3055-CodeListResponsibleAgencyCode
)
/
(
    [E5279-DutyOrTaxOrFeeRateCode] CS
    [E1131-CodeListIdentificationCode] CS
    [E3055-CodeListResponsibleAgencyCode] CS
    [E5278-DutyOrTaxOrFeeRate] CS
    [E5273-DutyOrTaxOrFeeRateBasisCode] CS
    E1131-CodeListIdentificationCode
)
/
(
    [E5279-DutyOrTaxOrFeeRateCode] CS
    [E1131-CodeListIdentificationCode] CS
    [E3055-CodeListResponsibleAgencyCode] CS
    [E5278-DutyOrTaxOrFeeRate] CS
    E5273-DutyOrTaxOrFeeRateBasisCode
)
/
(
    [E5279-DutyOrTaxOrFeeRateCode] CS
    [E1131-CodeListIdentificationCode] CS
    [E3055-CodeListResponsibleAgencyCode] CS
    E5278-DutyOrTaxOrFeeRate
)
/
(
    [E5279-DutyOrTaxOrFeeRateCode] CS
    [E1131-CodeListIdentificationCode] CS
    E3055-CodeListResponsibleAgencyCode
)
/
(
    [E5279-DutyOrTaxOrFeeRateCode] CS
    E1131-CodeListIdentificationCode
)
/
(
    E5279-DutyOrTaxOrFeeRateCode
);

C246-CustomsIdentityCodes =
(
    E7361-CustomsGoodsIdentifier CS
    [E1131-CodeListIdentificationCode] CS
    E3055-CodeListResponsibleAgencyCode
)
/
(
    E7361-CustomsGoodsIdentifier CS
    E1131-CodeListIdentificationCode
)
/
(
    E7361-CustomsGoodsIdentifier
);

C270-Control =
(
    E6069-ControlTotalTypeCodeQualifier CS
    E6066-ControlTotalQuantity CS
    E6411-MeasurementUnitCode
)
/
(
    E6069-ControlTotalTypeCodeQualifier CS
    E6066-ControlTotalQuantity
);

C272-ItemCharacteristic =
(
    [E7081-ItemCharacteristicCode] CS
    [E1131-CodeListIdentificationCode] CS
    E3055-CodeListResponsibleAgencyCode
)
/
(
    [E7081-ItemCharacteristicCode] CS
    E1131-CodeListIdentificationCode
)
/
(
    E7081-ItemCharacteristicCode
);

C273-ItemDescription =
(
    [E7009-ItemDescriptionCode] CS
    [E1131-CodeListIdentificationCode] CS
    [E3055-CodeListResponsibleAgencyCode] CS
    [E7008-ItemDescription] CS
    [E7008-ItemDescription] CS
    E3453-LanguageNameCode
)
/
(
    [E7009-ItemDescriptionCode] CS
    [E1131-CodeListIdentificationCode] CS
    [E3055-CodeListResponsibleAgencyCode] CS
    [E7008-ItemDescription] CS
    E7008-ItemDescription
)
/
(
    [E7009-ItemDescriptionCode] CS
    [E1131-CodeListIdentificationCode] CS
    [E3055-CodeListResponsibleAgencyCode] CS
    E7008-ItemDescription
)
/
(
    [E7009-ItemDescriptionCode] CS
    [E1131-CodeListIdentificationCode] CS
    E3055-CodeListResponsibleAgencyCode
)
/
(
    [E7009-ItemDescriptionCode] CS
    E1131-CodeListIdentificationCode
)
/
(
    E7009-ItemDescriptionCode
);

C279-QuantityDifferenceInformation =
(
    E6064-VarianceQuantity CS
    E6063-QuantityTypeCodeQualifier
)
/
(
    E6064-VarianceQuantity
);

C401-ExcessTransportationInformation =
(
    E8457-ExcessTransportationReasonCode CS
    E8459-ExcessTransportationResponsibilityCode CS
    E7130-CustomerShipmentAuthorisationIdentifier
)
/
(
    E8457-ExcessTransportationReasonCode CS
    E8459-ExcessTransportationResponsibilityCode
);

C402-PackageTypeIdentification =
(
    E7077-DescriptionFormatCode CS
    E7064-TypeOfPackages CS
    [E7143-ItemTypeIdentificationCode] CS
    [E7064-TypeOfPackages] CS
    E7143-ItemTypeIdentificationCode
)
/
(
    E7077-DescriptionFormatCode CS
    E7064-TypeOfPackages CS
    [E7143-ItemTypeIdentificationCode] CS
    E7064-TypeOfPackages
)
/
(
    E7077-DescriptionFormatCode CS
    E7064-TypeOfPackages CS
    E7143-ItemTypeIdentificationCode
)
/
(
    E7077-DescriptionFormatCode CS
    E7064-TypeOfPackages
);

C501-PercentageDetails =
(
    E5245-PercentageTypeCodeQualifier CS
    [E5482-Percentage] CS
    [E5249-PercentageBasisIdentificationCode] CS
    [E1131-CodeListIdentificationCode] CS
    E3055-CodeListResponsibleAgencyCode
)
/
(
    E5245-PercentageTypeCodeQualifier CS
    [E5482-Percentage] CS
    [E5249-PercentageBasisIdentificationCode] CS
    E1131-CodeListIdentificationCode
)
/
(
    E5245-PercentageTypeCodeQualifier CS
    [E5482-Percentage] CS
    E5249-PercentageBasisIdentificationCode
)
/
(
    E5245-PercentageTypeCodeQualifier CS
    E5482-Percentage
)
/
(
    E5245-PercentageTypeCodeQualifier
);

C502-MeasurementDetails =
(
    [E6313-MeasuredAttributeCode] CS
    [E6321-MeasurementSignificanceCode] CS
    [E6155-NonDiscreteMeasurementNameCode] CS
    E6154-NonDiscreteMeasurementName
)
/
(
    [E6313-MeasuredAttributeCode] CS
    [E6321-MeasurementSignificanceCode] CS
    E6155-NonDiscreteMeasurementNameCode
)
/
(
    [E6313-MeasuredAttributeCode] CS
    E6321-MeasurementSignificanceCode
)
/
(
    E6313-MeasuredAttributeCode
);

C503-DocumentMessageDetails =
(
    [E1004-DocumentIdentifier] CS
    [E1373-DocumentStatusCode] CS
    [E1366-DocumentSourceDescription] CS
    [E3453-LanguageNameCode] CS
    [E1056-VersionIdentifier] CS
    E1060-RevisionIdentifier
)
/
(
    [E1004-DocumentIdentifier] CS
    [E1373-DocumentStatusCode] CS
    [E1366-DocumentSourceDescription] CS
    [E3453-LanguageNameCode] CS
    E1056-VersionIdentifier
)
/
(
    [E1004-DocumentIdentifier] CS
    [E1373-DocumentStatusCode] CS
    [E1366-DocumentSourceDescription] CS
    E3453-LanguageNameCode
)
/
(
    [E1004-DocumentIdentifier] CS
    [E1373-DocumentStatusCode] CS
    E1366-DocumentSourceDescription
)
/
(
    [E1004-DocumentIdentifier] CS
    E1373-DocumentStatusCode
)
/
(
    E1004-DocumentIdentifier
);

C504-CurrencyDetails =
(
    E6347-CurrencyUsageCodeQualifier CS
    [E6345-CurrencyIdentificationCode] CS
    [E6343-CurrencyTypeCodeQualifier] CS
    E6348-CurrencyRate
)
/
(
    E6347-CurrencyUsageCodeQualifier CS
    [E6345-CurrencyIdentificationCode] CS
    E6343-CurrencyTypeCodeQualifier
)
/
(
    E6347-CurrencyUsageCodeQualifier CS
    E6345-CurrencyIdentificationCode
)
/
(
    E6347-CurrencyUsageCodeQualifier
);

C506-Reference =
(
    E1153-ReferenceCodeQualifier CS
    [E1154-ReferenceIdentifier] CS
    [E1156-DocumentLineIdentifier] CS
    [E1056-VersionIdentifier] CS
    E1060-RevisionIdentifier
)
/
(
    E1153-ReferenceCodeQualifier CS
    [E1154-ReferenceIdentifier] CS
    [E1156-DocumentLineIdentifier] CS
    E1056-VersionIdentifier
)
/
(
    E1153-ReferenceCodeQualifier CS
    [E1154-ReferenceIdentifier] CS
    E1156-DocumentLineIdentifier
)
/
(
    E1153-ReferenceCodeQualifier CS
    E1154-ReferenceIdentifier
)
/
(
    E1153-ReferenceCodeQualifier
);

C507-DateTimePeriod =
(
    E2005-DateOrTimeOrPeriodFunctionCodeQualifier CS
    [E2380-DateOrTimeOrPeriodText] CS
    E2379-DateOrTimeOrPeriodFormatCode
)
/
(
    E2005-DateOrTimeOrPeriodFunctionCodeQualifier CS
    E2380-DateOrTimeOrPeriodText
)
/
(
    E2005-DateOrTimeOrPeriodFunctionCodeQualifier
);

C509-PriceInformation =
(
    E5125-PriceCodeQualifier CS
    [E5118-PriceAmount] CS
    [E5375-PriceTypeCode] CS
    [E5387-PriceSpecificationCode] CS
    [E5284-UnitPriceBasisQuantity] CS
    E6411-MeasurementUnitCode
)
/
(
    E5125-PriceCodeQualifier CS
    [E5118-PriceAmount] CS
    [E5375-PriceTypeCode] CS
    [E5387-PriceSpecificationCode] CS
    E5284-UnitPriceBasisQuantity
)
/
(
    E5125-PriceCodeQualifier CS
    [E5118-PriceAmount] CS
    [E5375-PriceTypeCode] CS
    E5387-PriceSpecificationCode
)
/
(
    E5125-PriceCodeQualifier CS
    [E5118-PriceAmount] CS
    E5375-PriceTypeCode
)
/
(
    E5125-PriceCodeQualifier CS
    E5118-PriceAmount
)
/
(
    E5125-PriceCodeQualifier
);

C516-MonetaryAmount =
(
    E5025-MonetaryAmountTypeCodeQualifier CS
    [E5004-MonetaryAmount] CS
    [E6345-CurrencyIdentificationCode] CS
    [E6343-CurrencyTypeCodeQualifier] CS
    E4405-StatusDescriptionCode
)
/
(
    E5025-MonetaryAmountTypeCodeQualifier CS
    [E5004-MonetaryAmount] CS
    [E6345-CurrencyIdentificationCode] CS
    E6343-CurrencyTypeCodeQualifier
)
/
(
    E5025-MonetaryAmountTypeCodeQualifier CS
    [E5004-MonetaryAmount] CS
    E6345-CurrencyIdentificationCode
)
/
(
    E5025-MonetaryAmountTypeCodeQualifier CS
    E5004-MonetaryAmount
)
/
(
    E5025-MonetaryAmountTypeCodeQualifier
);

C517-LocationIdentification =
(
    [E3225-LocationIdentifier] CS
    [E1131-CodeListIdentificationCode] CS
    [E3055-CodeListResponsibleAgencyCode] CS
    E3224-LocationName
)
/
(
    [E3225-LocationIdentifier] CS
    [E1131-CodeListIdentificationCode] CS
    E3055-CodeListResponsibleAgencyCode
)
/
(
    [E3225-LocationIdentifier] CS
    E1131-CodeListIdentificationCode
)
/
(
    E3225-LocationIdentifier
);

C519-RelatedLocationOneIdentification =
(
    [E3223-FirstRelatedLocationIdentifier] CS
    [E1131-CodeListIdentificationCode] CS
    [E3055-CodeListResponsibleAgencyCode] CS
    E3222-FirstRelatedLocationName
)
/
(
    [E3223-FirstRelatedLocationIdentifier] CS
    [E1131-CodeListIdentificationCode] CS
    E3055-CodeListResponsibleAgencyCode
)
/
(
    [E3223-FirstRelatedLocationIdentifier] CS
    E1131-CodeListIdentificationCode
)
/
(
    E3223-FirstRelatedLocationIdentifier
);

C531-PackagingDetails =
(
    [E7075-PackagingLevelCode] CS
    [E7233-PackagingRelatedDescriptionCode] CS
    E7073-PackagingTermsAndConditionsCode
)
/
(
    [E7075-PackagingLevelCode] CS
    E7233-PackagingRelatedDescriptionCode
)
/
(
    E7075-PackagingLevelCode
);

C532-ReturnablePackageDetails =
(
    [E8395-ReturnablePackageFreightPaymentResponsibilityCode] CS
    E8393-ReturnablePackageLoadContentsCode
)
/
(
    E8395-ReturnablePackageFreightPaymentResponsibilityCode
);

C533-DutyTaxFeeAccountDetail =
(
    E5289-DutyOrTaxOrFeeAccountCode CS
    [E1131-CodeListIdentificationCode] CS
    E3055-CodeListResponsibleAgencyCode
)
/
(
    E5289-DutyOrTaxOrFeeAccountCode CS
    E1131-CodeListIdentificationCode
)
/
(
    E5289-DutyOrTaxOrFeeAccountCode
);

C552-AllowanceChargeInformation =
(
    [E1230-AllowanceOrChargeIdentifier] CS
    E5189-AllowanceOrChargeIdentificationCode
)
/
(
    E1230-AllowanceOrChargeIdentifier
);

C553-RelatedLocationTwoIdentification =
(
    [E3233-SecondRelatedLocationIdentifier] CS
    [E1131-CodeListIdentificationCode] CS
    [E3055-CodeListResponsibleAgencyCode] CS
    E3232-SecondRelatedLocationName
)
/
(
    [E3233-SecondRelatedLocationIdentifier] CS
    [E1131-CodeListIdentificationCode] CS
    E3055-CodeListResponsibleAgencyCode
)
/
(
    [E3233-SecondRelatedLocationIdentifier] CS
    E1131-CodeListIdentificationCode
)
/
(
    E3233-SecondRelatedLocationIdentifier
);

C703-NatureOfCargo =
(
    E7085-CargoTypeClassificationCode CS
    [E1131-CodeListIdentificationCode] CS
    E3055-CodeListResponsibleAgencyCode
)
/
(
    E7085-CargoTypeClassificationCode CS
    E1131-CodeListIdentificationCode
)
/
(
    E7085-CargoTypeClassificationCode
);

C819-CountrySubdivisionDetails =
(
    [E3229-CountrySubdivisionIdentifier] CS
    [E1131-CodeListIdentificationCode] CS
    [E3055-CodeListResponsibleAgencyCode] CS
    E3228-CountrySubdivisionName
)
/
(
    [E3229-CountrySubdivisionIdentifier] CS
    [E1131-CodeListIdentificationCode] CS
    E3055-CodeListResponsibleAgencyCode
)
/
(
    [E3229-CountrySubdivisionIdentifier] CS
    E1131-CodeListIdentificationCode
)
/
(
    E3229-CountrySubdivisionIdentifier
);

C827-TypeOfMarking =
(
    E7511-MarkingTypeCode CS
    [E1131-CodeListIdentificationCode] CS
    E3055-CodeListResponsibleAgencyCode
)
/
(
    E7511-MarkingTypeCode CS
    E1131-CodeListIdentificationCode
)
/
(
    E7511-MarkingTypeCode
);

C829-SubLineInformation =
(
    [E5495-SubLineIndicatorCode] CS
    E1082-LineItemIdentifier
)
/
(
    E5495-SubLineIndicatorCode
);

C960-ReasonForChange =
(
    [E4295-ChangeReasonDescriptionCode] CS
    [E1131-CodeListIdentificationCode] CS
    [E3055-CodeListResponsibleAgencyCode] CS
    E4294-ChangeReasonDescription
)
/
(
    [E4295-ChangeReasonDescriptionCode] CS
    [E1131-CodeListIdentificationCode] CS
    E3055-CodeListResponsibleAgencyCode
)
/
(
    [E4295-ChangeReasonDescriptionCode] CS
    E1131-CodeListIdentificationCode
)
/
(
    E4295-ChangeReasonDescriptionCode
);

#------------------------------------------------------------------------
# Simple Data Elements
#------------------------------------------------------------------------

E1000-DocumentName = 1*35an;
E1001-DocumentNameCode = 1*3an;
E1004-DocumentIdentifier = 1*35an;
E1050-SequencePositionIdentifier = 1*10an;
E1056-VersionIdentifier = 1*9an;
E1058-ReleaseIdentifier = 1*9an;
E1060-RevisionIdentifier = 1*6an;
E1082-LineItemIdentifier = 1*6an;
E1131-CodeListIdentificationCode = 1*17an;
E1153-ReferenceCodeQualifier = 1*3an;
E1154-ReferenceIdentifier = 1*70an;
E1156-DocumentLineIdentifier = 1*6an;
E1218-DocumentOriginalsRequiredQuantity = 1*2n;
E1220-DocumentCopiesRequiredQuantity = 1*2n;
E1222-ConfigurationLevelNumber = 1*2n;
E1225-MessageFunctionCode = 1*3an;
E1227-CalculationSequenceCode = 1*3an;
E1229-ActionCode = 1*3an;
E1230-AllowanceOrChargeIdentifier = 1*35an;
E1366-DocumentSourceDescription = 1*70an;
E1373-DocumentStatusCode = 1*3an;
E1496-GoodsItemNumber = 1*5n;
E1501-ComputerEnvironmentDetailsCodeQualifier = 1*3an;
E1502-DataFormatDescription = 1*35an;
E1503-DataFormatDescriptionCode = 1*3an;
E1508-FileName = 1*35an;
E1510-ComputerEnvironmentName = 1*35an;
E1511-ComputerEnvironmentNameCode = 1*3an;
E1516-FileFormatName = 1*17an;
E2005-DateOrTimeOrPeriodFunctionCodeQualifier = 1*3an;
E2009-TermsTimeRelationCode = 1*3an;
E2151-PeriodTypeCode = 1*3an;
E2152-PeriodCountQuantity = 1*3n;
E2379-DateOrTimeOrPeriodFormatCode = 1*3an;
E2380-DateOrTimeOrPeriodText = 1*35an;
E2475-EventTimeReferenceCode = 1*3an;
E3035-PartyFunctionCodeQualifier = 1*3an;
E3036-PartyName = 1*35an;
E3039-PartyIdentifier = 1*35an;
E3042-StreetAndNumberOrPostOfficeBoxIdentifier = 1*35an;
E3045-PartyNameFormatCode = 1*3an;
E3055-CodeListResponsibleAgencyCode = 1*3an;
E3124-NameAndAddressDescription = 1*35an;
E3126-CarrierName = 1*35an;
E3127-CarrierIdentifier = 1*17an;
E3139-ContactFunctionCode = 1*3an;
E3148-CommunicationAddressIdentifier = 1*512an;
E3153-CommunicationMediumTypeCode = 1*3an;
E3155-CommunicationMeansTypeCode = 1*3an;
E3164-CityName = 1*35an;
E3192-AccountHolderName = 1*35an;
E3194-AccountHolderIdentifier = 1*35an;
E3207-CountryIdentifier = 1*3an;
E3222-FirstRelatedLocationName = 1*70an;
E3223-FirstRelatedLocationIdentifier = 1*35an;
E3224-LocationName = 1*256an;
E3225-LocationIdentifier = 1*35an;
E3227-LocationFunctionCodeQualifier = 1*3an;
E3228-CountrySubdivisionName = 1*70an;
E3229-CountrySubdivisionIdentifier = 1*9an;
E3232-SecondRelatedLocationName = 1*70an;
E3233-SecondRelatedLocationIdentifier = 1*35an;
E3251-PostalIdentificationCode = 1*17an;
E3412-ContactName = 1*256an;
E3413-ContactIdentifier = 1*17an;
E3432-InstitutionName = 1*70an;
E3433-InstitutionNameCode = 1*11an;
E3434-InstitutionBranchIdentifier = 1*17an;
E3436-InstitutionBranchLocationName = 1*70an;
E3446-PartyTaxIdentifier = 1*20an;
E3453-LanguageNameCode = 1*3an;
E4052-DeliveryOrTransportTermsDescription = 1*70an;
E4053-DeliveryOrTransportTermsDescriptionCode = 1*3an;
E4055-DeliveryOrTransportTermsFunctionCode = 1*3an;
E4215-TransportChargesPaymentMethodCode = 1*3an;
E4221-DiscrepancyNatureIdentificationCode = 1*3an;
E4233-MarkingInstructionsCode = 1*3an;
E4276-PaymentTermsDescription = 1*35an;
E4277-PaymentTermsDescriptionIdentifier = 1*17an;
E4279-PaymentTermsTypeCodeQualifier = 1*3an;
E4294-ChangeReasonDescription = 1*35an;
E4295-ChangeReasonDescriptionCode = 1*3an;
E4343-ResponseTypeCode = 1*3an;
E4347-ProductIdentifierCodeQualifier = 1*3an;
E4405-StatusDescriptionCode = 1*3an;
E4440-FreeText = 1*512an;
E4441-FreeTextDescriptionCode = 1*17an;
E4447-FreeTextFormatCode = 1*3an;
E4451-TextSubjectCodeQualifier = 1*3an;
E4453-FreeTextFunctionCode = 1*3an;
E4471-SettlementMeansCode = 1*3an;
E4517-SealConditionCode = 1*3an;
E4525-SealTypeCode = 1*3an;
E5004-MonetaryAmount = 1*35n;
E5025-MonetaryAmountTypeCodeQualifier = 1*3an;
E5118-PriceAmount = 1*15n;
E5125-PriceCodeQualifier = 1*3an;
E5152-DutyOrTaxOrFeeTypeName = 1*35an;
E5153-DutyOrTaxOrFeeTypeNameCode = 1*3an;
E5189-AllowanceOrChargeIdentificationCode = 1*3an;
E5213-SubLineItemPriceChangeOperationCode = 1*3an;
E5245-PercentageTypeCodeQualifier = 1*3an;
E5249-PercentageBasisIdentificationCode = 1*3an;
E5273-DutyOrTaxOrFeeRateBasisCode = 1*12an;
E5278-DutyOrTaxOrFeeRate = 1*17an;
E5279-DutyOrTaxOrFeeRateCode = 1*7an;
E5283-DutyOrTaxOrFeeFunctionCodeQualifier = 1*3an;
E5284-UnitPriceBasisQuantity = 1*9n;
E5286-DutyOrTaxOrFeeAssessmentBasisQuantity = 1*15an;
E5289-DutyOrTaxOrFeeAccountCode = 1*6an;
E5305-DutyOrTaxOrFeeCategoryCode = 1*3an;
E5307-TaxOrDutyOrFeePaymentDueDateCode = 1*3an;
E5375-PriceTypeCode = 1*3an;
E5387-PriceSpecificationCode = 1*3an;
E5402-CurrencyExchangeRate = 1*12n;
E5419-RateTypeCodeQualifier = 1*3an;
E5420-UnitPriceBasisRate = 1*15n;
E5463-AllowanceOrChargeCodeQualifier = 1*3an;
E5479-RelationCode = 1*3an;
E5482-Percentage = 1*10n;
E5495-SubLineIndicatorCode = 1*3an;
E6060-Quantity = 1*35an;
E6063-QuantityTypeCodeQualifier = 1*3an;
E6064-VarianceQuantity = 1*15n;
E6066-ControlTotalQuantity = 1*18n;
E6069-ControlTotalTypeCodeQualifier = 1*3an;
E6152-RangeMaximumQuantity = 1*18n;
E6154-NonDiscreteMeasurementName = 1*70an;
E6155-NonDiscreteMeasurementNameCode = 1*17an;
E6162-RangeMinimumQuantity = 1*18n;
E6311-MeasurementPurposeCodeQualifier = 1*3an;
E6313-MeasuredAttributeCode = 1*3an;
E6314-Measure = 1*18an;
E6321-MeasurementSignificanceCode = 1*3an;
E6341-ExchangeRateCurrencyMarketIdentifier = 1*3an;
E6343-CurrencyTypeCodeQualifier = 1*3an;
E6345-CurrencyIdentificationCode = 1*3an;
E6347-CurrencyUsageCodeQualifier = 1*3an;
E6348-CurrencyRate = 1*4n;
E6411-MeasurementUnitCode = 1*8an;
E6432-SignificantDigitsQuantity = 1*2n;
E7008-ItemDescription = 1*256an;
E7009-ItemDescriptionCode = 1*17an;
E7064-TypeOfPackages = 1*35an;
E7065-PackageTypeDescriptionCode = 1*17an;
E7073-PackagingTermsAndConditionsCode = 1*3an;
E7075-PackagingLevelCode = 1*3an;
E7077-DescriptionFormatCode = 1*3an;
E7081-ItemCharacteristicCode = 1*3an;
E7083-ConfigurationOperationCode = 1*3an;
E7085-CargoTypeClassificationCode = 1*3an;
E7102-ShippingMarksDescription = 1*35an;
E7130-CustomerShipmentAuthorisationIdentifier = 1*17an;
E7140-ItemIdentifier = 1*35an;
E7143-ItemTypeIdentificationCode = 1*3an;
E7160-SpecialServiceDescription = 1*35an;
E7161-SpecialServiceDescriptionCode = 1*3an;
E7187-ProcessTypeDescriptionCode = 1*17an;
E7224-PackageQuantity = 1*8n;
E7233-PackagingRelatedDescriptionCode = 1*3an;
E7240-ItemTotalQuantity = 1*15n;
E7297-SetTypeCodeQualifier = 1*3an;
E7361-CustomsGoodsIdentifier = 1*18an;
E7364-ProcessingIndicatorDescription = 1*35an;
E7365-ProcessingIndicatorDescriptionCode = 1*3an;
E7383-SurfaceOrLayerCode = 1*3an;
E7402-ObjectIdentifier = 1*35an;
E7405-ObjectIdentificationCodeQualifier = 1*3an;
E7511-MarkingTypeCode = 1*3an;
E8028-MeansOfTransportJourneyIdentifier = 1*17an;
E8051-TransportStageCodeQualifier = 1*3an;
E8053-EquipmentTypeCodeQualifier = 1*3an;
E8066-TransportModeName = 1*17an;
E8067-TransportModeNameCode = 1*3an;
E8077-EquipmentSupplierCode = 1*3an;
E8101-TransitDirectionIndicatorCode = 1*3an;
E8154-EquipmentSizeAndTypeDescription = 1*35an;
E8155-EquipmentSizeAndTypeDescriptionCode = 1*10an;
E8169-FullOrEmptyIndicatorCode = 1*3an;
E8178-TransportMeansDescription = 1*17an;
E8179-TransportMeansDescriptionCode = 1*8an;
E8212-TransportMeansIdentificationName = 1*70an;
E8213-TransportMeansIdentificationNameIdentifier = 1*35an;
E8249-EquipmentStatusCode = 1*3an;
E8260-EquipmentIdentifier = 1*17an;
E8281-TransportMeansOwnershipIndicatorCode = 1*3an;
E8393-ReturnablePackageLoadContentsCode = 1*3an;
E8395-ReturnablePackageFreightPaymentResponsibilityCode = 1*3an;
E8453-TransportMeansNationalityCode = 1*3an;
E8457-ExcessTransportationReasonCode = 1*3an;
E8459-ExcessTransportationResponsibilityCode = 1*3an;
E9280-ValidationResultText = 1*35an;
E9282-ValidationKeyIdentifier = 1*35an;
E9302-SealingPartyName = 1*35an;
E9303-SealingPartyNameCode = 1*3an;
E9308-TransportUnitSealIdentifier = 1*35an;
E9448-FileGenerationCommandName = 1*35an;
E9450-FileCompressionTechniqueName = 1*35an;
E9649-ProcessingInformationCodeQualifier = 1*3an;

#------------------------------------------------------------------------
# Separators
#------------------------------------------------------------------------

ST = "'"; # segment terminator
ES = "+"; # element separator
CS = ":"; # component separator

#------------------------------------------------------------------------
# Basic Types
#------------------------------------------------------------------------

an = a / n;
a  = uppercase / 
     " " / "." / "," / "-" / "(" / ")" / "/" / "=" /
     "!" / dquote / "%" / "&" / "*" / ";" / "<" / ">";
n  = numerals / "." / "," / "-";

uppercase = %x41-5A;
numerals  = %x30-39;
dquote    = %x22;

#------------------------------------------------------------------------
# end
#------------------------------------------------------------------------