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

CUSRES = 
         1 UNH-MessageHeader
         1 BGM-BeginningOfMessage
        *9 DTM-DateTimePeriod
       *99 FTX-FreeText
        *9 TDT-TransportInformation
       *99 LOC-PlaceLocationIdentification
       *10 GEI-ProcessingInformation
      *999 EQD-EquipmentDetails
       *99 SegmentGroup1
      *999 SegmentGroup3
       *99 SegmentGroup4
       *99 SegmentGroup5
    *99999 SegmentGroup6
        *5 CNT-ControlTotal
        *9 SegmentGroup15
         1 UNT-MessageTrailer;

SegmentGroup1 =         
         1 NAD-NameAndAddress
        *9 SegmentGroup2;         

SegmentGroup2 =
         1 CTA-ContactInformation
        *9 COM-CommunicationContact;

SegmentGroup3 =
         1 RFF-Reference
        *9 DTM-DateTimePeriod
        *9 LOC-PlaceLocationIdentification; 

SegmentGroup4 =
         1 ERP-ErrorPointDetails
        *9 RFF-Reference
       *99 ERC-ApplicationErrorInformation
       *99 FTX-FreeText;

SegmentGroup5 =
         1 TAX-DutyTaxFeeDetails
       *99 MOA-MonetaryAmount
       *99 GEI-ProcessingInformation;

SegmentGroup6 =
         1 DOC-DocumentMessageDetails
        *9 PAC-Package
        *9 RFF-Reference
        *9 PCI-PackageIdentification
       *99 FTX-FreeText
        *9 TDT-TransportInformation
        *9 LOC-PlaceLocationIdentification
        *9 DTM-DateTimePeriod
       *99 GEI-ProcessingInformation
       *99 MEA-Measurements
      *999 EQD-EquipmentDetails
        *9 SegmentGroup7
       *99 SegmentGroup9
       *99 SegmentGroup11
     *9999 SegmentGroup12
     *9999 SegmentGroup14;
      
SegmentGroup7 =
         1 NAD-NameAndAddress
        *9 SegmentGroup8;
        
SegmentGroup8 =
         1 CTA-ContactInformation
        *9 COM-CommunicationContact;

SegmentGroup9 =
         1 MOA-MonetaryAmount
        *1 SegmentGroup10;

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

SegmentGroup11 =
         1 TAX-DutyTaxFeeDetails
       *99 MOA-MonetaryAmount
       *99 GEI-ProcessingInformation;

SegmentGroup12 =
         1 CST-CustomsStatusOfGoods
        *9 FTX-FreeText
   *999999 SegmentGroup13;
   
SegmentGroup13 =
         1 TAX-DutyTaxFeeDetails
       *99 MOA-MonetaryAmount
       *99 GEI-ProcessingInformation
        *9 MEA-Measurements
        *9 RFF-Reference;

SegmentGroup14 =
         1 ERP-ErrorPointDetails
        *9 RFF-Reference
     *9999 ERC-ApplicationErrorInformation
        *9 FTX-FreeText;

SegmentGroup15 = 
         1 AUT-AuthenticationResult
        *9 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-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-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-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-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-ERC = "ERC";
ERC-ApplicationErrorInformation =
SegmentTag-ERC ES
(
    (
        C901-ApplicationErrorDetail
    )
)
ST;

SegmentTag-ERP = "ERP";
ERP-ErrorPointDetails =
SegmentTag-ERP ES
(
    (
        [C701-ErrorPointDetails] ES
        C853-ErrorSegmentPointDetails
    )
    /
    (
        C701-ErrorPointDetails
    )
)
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-GEI = "GEI";
GEI-ProcessingInformation =
SegmentTag-GEI ES
(
    (
        E9649-ProcessingInformationCodeQualifier ES
        [C012-ProcessingIndicator] ES
        E7187-ProcessTypeDescriptionCode
    )
    /
    (
        E9649-ProcessingInformationCodeQualifier ES
        C012-ProcessingIndicator
    )
    /
    (
        E9649-ProcessingInformationCodeQualifier
    )
)
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-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-RFF = "RFF";
RFF-Reference =
SegmentTag-RFF ES
(
    (
        C506-Reference
    )
)
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;

#------------------------------------------------------------------------
# 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
);

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
);

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
);

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
);

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
);

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
);

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
);

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
);

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
);

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
);

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
);

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
);

C701-ErrorPointDetails =
(
    [E1049-MessageSectionCode] CS
    [E1052-MessageItemIdentifier] CS
    E1054-MessageSubItemIdentifier
)
/
(
    [E1049-MessageSectionCode] CS
    E1052-MessageItemIdentifier
)
/
(
    E1049-MessageSectionCode
);

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
);

C853-ErrorSegmentPointDetails =
(
    [E9166-SegmentTagIdentifier] CS
    [E1050-SequencePositionIdentifier] CS
    E1159-SequenceIdentifierSourceCode
)
/
(
    [E9166-SegmentTagIdentifier] CS
    E1050-SequencePositionIdentifier
)
/
(
    E9166-SegmentTagIdentifier
);

C901-ApplicationErrorDetail =
(
    E9321-ApplicationErrorCode CS
    [E1131-CodeListIdentificationCode] CS
    E3055-CodeListResponsibleAgencyCode
)
/
(
    E9321-ApplicationErrorCode CS
    E1131-CodeListIdentificationCode
)
/
(
    E9321-ApplicationErrorCode
);

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

E1000-DocumentName = 1*35an;
E1001-DocumentNameCode = 1*3an;
E1004-DocumentIdentifier = 1*35an;
E1049-MessageSectionCode = 1*3an;
E1050-SequencePositionIdentifier = 1*10an;
E1052-MessageItemIdentifier = 1*35an;
E1054-MessageSubItemIdentifier = 1*6n;
E1056-VersionIdentifier = 1*9an;
E1060-RevisionIdentifier = 1*6an;
E1131-CodeListIdentificationCode = 1*17an;
E1153-ReferenceCodeQualifier = 1*3an;
E1154-ReferenceIdentifier = 1*70an;
E1156-DocumentLineIdentifier = 1*6an;
E1159-SequenceIdentifierSourceCode = 1*3an;
E1218-DocumentOriginalsRequiredQuantity = 1*2n;
E1220-DocumentCopiesRequiredQuantity = 1*2n;
E1225-MessageFunctionCode = 1*3an;
E1227-CalculationSequenceCode = 1*3an;
E1366-DocumentSourceDescription = 1*70an;
E1373-DocumentStatusCode = 1*3an;
E1496-GoodsItemNumber = 1*5n;
E2005-DateOrTimeOrPeriodFunctionCodeQualifier = 1*3an;
E2379-DateOrTimeOrPeriodFormatCode = 1*3an;
E2380-DateOrTimeOrPeriodText = 1*35an;
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;
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;
E3446-PartyTaxIdentifier = 1*20an;
E3453-LanguageNameCode = 1*3an;
E4233-MarkingInstructionsCode = 1*3an;
E4343-ResponseTypeCode = 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;
E5004-MonetaryAmount = 1*35n;
E5025-MonetaryAmountTypeCodeQualifier = 1*3an;
E5152-DutyOrTaxOrFeeTypeName = 1*35an;
E5153-DutyOrTaxOrFeeTypeNameCode = 1*3an;
E5273-DutyOrTaxOrFeeRateBasisCode = 1*12an;
E5278-DutyOrTaxOrFeeRate = 1*17an;
E5279-DutyOrTaxOrFeeRateCode = 1*7an;
E5283-DutyOrTaxOrFeeFunctionCodeQualifier = 1*3an;
E5286-DutyOrTaxOrFeeAssessmentBasisQuantity = 1*15an;
E5289-DutyOrTaxOrFeeAccountCode = 1*6an;
E5305-DutyOrTaxOrFeeCategoryCode = 1*3an;
E5307-TaxOrDutyOrFeePaymentDueDateCode = 1*3an;
E5402-CurrencyExchangeRate = 1*12n;
E5479-RelationCode = 1*3an;
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;
E7064-TypeOfPackages = 1*35an;
E7065-PackageTypeDescriptionCode = 1*17an;
E7073-PackagingTermsAndConditionsCode = 1*3an;
E7075-PackagingLevelCode = 1*3an;
E7077-DescriptionFormatCode = 1*3an;
E7102-ShippingMarksDescription = 1*35an;
E7130-CustomerShipmentAuthorisationIdentifier = 1*17an;
E7143-ItemTypeIdentificationCode = 1*3an;
E7187-ProcessTypeDescriptionCode = 1*17an;
E7224-PackageQuantity = 1*8n;
E7233-PackagingRelatedDescriptionCode = 1*3an;
E7361-CustomsGoodsIdentifier = 1*18an;
E7364-ProcessingIndicatorDescription = 1*35an;
E7365-ProcessingIndicatorDescriptionCode = 1*3an;
E7383-SurfaceOrLayerCode = 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;
E9166-SegmentTagIdentifier = 1*3an;
E9280-ValidationResultText = 1*35an;
E9282-ValidationKeyIdentifier = 1*35an;
E9321-ApplicationErrorCode = 1*8an;
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
#------------------------------------------------------------------------