Module: Stupidedi::Versions::FunctionalGroups::ThirtyForty::SegmentDefs

Defined in:
lib/stupidedi/versions/functional_groups/003040/segment_defs.rb,
lib/stupidedi/versions/functional_groups/003040/segment_defs/B1.rb,
lib/stupidedi/versions/functional_groups/003040/segment_defs/B2.rb,
lib/stupidedi/versions/functional_groups/003040/segment_defs/GE.rb,
lib/stupidedi/versions/functional_groups/003040/segment_defs/GS.rb,
lib/stupidedi/versions/functional_groups/003040/segment_defs/HL.rb,
lib/stupidedi/versions/functional_groups/003040/segment_defs/K1.rb,
lib/stupidedi/versions/functional_groups/003040/segment_defs/L3.rb,
lib/stupidedi/versions/functional_groups/003040/segment_defs/L5.rb,
lib/stupidedi/versions/functional_groups/003040/segment_defs/LE.rb,
lib/stupidedi/versions/functional_groups/003040/segment_defs/LS.rb,
lib/stupidedi/versions/functional_groups/003040/segment_defs/LX.rb,
lib/stupidedi/versions/functional_groups/003040/segment_defs/M7.rb,
lib/stupidedi/versions/functional_groups/003040/segment_defs/N1.rb,
lib/stupidedi/versions/functional_groups/003040/segment_defs/N2.rb,
lib/stupidedi/versions/functional_groups/003040/segment_defs/N3.rb,
lib/stupidedi/versions/functional_groups/003040/segment_defs/N4.rb,
lib/stupidedi/versions/functional_groups/003040/segment_defs/N7.rb,
lib/stupidedi/versions/functional_groups/003040/segment_defs/N9.rb,
lib/stupidedi/versions/functional_groups/003040/segment_defs/S5.rb,
lib/stupidedi/versions/functional_groups/003040/segment_defs/SE.rb,
lib/stupidedi/versions/functional_groups/003040/segment_defs/ST.rb,
lib/stupidedi/versions/functional_groups/003040/segment_defs/AK1.rb,
lib/stupidedi/versions/functional_groups/003040/segment_defs/AK2.rb,
lib/stupidedi/versions/functional_groups/003040/segment_defs/AK3.rb,
lib/stupidedi/versions/functional_groups/003040/segment_defs/AK9.rb,
lib/stupidedi/versions/functional_groups/003040/segment_defs/AMT.rb,
lib/stupidedi/versions/functional_groups/003040/segment_defs/AT7.rb,
lib/stupidedi/versions/functional_groups/003040/segment_defs/AT8.rb,
lib/stupidedi/versions/functional_groups/003040/segment_defs/B10.rb,
lib/stupidedi/versions/functional_groups/003040/segment_defs/B2A.rb,
lib/stupidedi/versions/functional_groups/003040/segment_defs/BEG.rb,
lib/stupidedi/versions/functional_groups/003040/segment_defs/BGN.rb,
lib/stupidedi/versions/functional_groups/003040/segment_defs/BPS.rb,
lib/stupidedi/versions/functional_groups/003040/segment_defs/BSN.rb,
lib/stupidedi/versions/functional_groups/003040/segment_defs/CTT.rb,
lib/stupidedi/versions/functional_groups/003040/segment_defs/CUR.rb,
lib/stupidedi/versions/functional_groups/003040/segment_defs/DTM.rb,
lib/stupidedi/versions/functional_groups/003040/segment_defs/FOB.rb,
lib/stupidedi/versions/functional_groups/003040/segment_defs/G61.rb,
lib/stupidedi/versions/functional_groups/003040/segment_defs/G62.rb,
lib/stupidedi/versions/functional_groups/003040/segment_defs/G69.rb,
lib/stupidedi/versions/functional_groups/003040/segment_defs/IT1.rb,
lib/stupidedi/versions/functional_groups/003040/segment_defs/ITD.rb,
lib/stupidedi/versions/functional_groups/003040/segment_defs/L11.rb,
lib/stupidedi/versions/functional_groups/003040/segment_defs/LFH.rb,
lib/stupidedi/versions/functional_groups/003040/segment_defs/LH1.rb,
lib/stupidedi/versions/functional_groups/003040/segment_defs/LH2.rb,
lib/stupidedi/versions/functional_groups/003040/segment_defs/LH3.rb,
lib/stupidedi/versions/functional_groups/003040/segment_defs/LIN.rb,
lib/stupidedi/versions/functional_groups/003040/segment_defs/MAN.rb,
lib/stupidedi/versions/functional_groups/003040/segment_defs/MEA.rb,
lib/stupidedi/versions/functional_groups/003040/segment_defs/MS1.rb,
lib/stupidedi/versions/functional_groups/003040/segment_defs/MS2.rb,
lib/stupidedi/versions/functional_groups/003040/segment_defs/MS3.rb,
lib/stupidedi/versions/functional_groups/003040/segment_defs/MSG.rb,
lib/stupidedi/versions/functional_groups/003040/segment_defs/NTE.rb,
lib/stupidedi/versions/functional_groups/003040/segment_defs/PER.rb,
lib/stupidedi/versions/functional_groups/003040/segment_defs/PID.rb,
lib/stupidedi/versions/functional_groups/003040/segment_defs/PLD.rb,
lib/stupidedi/versions/functional_groups/003040/segment_defs/PO1.rb,
lib/stupidedi/versions/functional_groups/003040/segment_defs/PO4.rb,
lib/stupidedi/versions/functional_groups/003040/segment_defs/PRR.rb,
lib/stupidedi/versions/functional_groups/003040/segment_defs/QTY.rb,
lib/stupidedi/versions/functional_groups/003040/segment_defs/REF.rb,
lib/stupidedi/versions/functional_groups/003040/segment_defs/REP.rb,
lib/stupidedi/versions/functional_groups/003040/segment_defs/RMT.rb,
lib/stupidedi/versions/functional_groups/003040/segment_defs/SN1.rb,
lib/stupidedi/versions/functional_groups/003040/segment_defs/SSS.rb,
lib/stupidedi/versions/functional_groups/003040/segment_defs/TD1.rb,
lib/stupidedi/versions/functional_groups/003040/segment_defs/TD3.rb,
lib/stupidedi/versions/functional_groups/003040/segment_defs/TD5.rb,
lib/stupidedi/versions/functional_groups/003040/segment_defs/TDS.rb,
lib/stupidedi/versions/functional_groups/003040/segment_defs/W01.rb,
lib/stupidedi/versions/functional_groups/003040/segment_defs/W03.rb,
lib/stupidedi/versions/functional_groups/003040/segment_defs/W04.rb,
lib/stupidedi/versions/functional_groups/003040/segment_defs/W05.rb,
lib/stupidedi/versions/functional_groups/003040/segment_defs/W06.rb,
lib/stupidedi/versions/functional_groups/003040/segment_defs/W07.rb,
lib/stupidedi/versions/functional_groups/003040/segment_defs/W08.rb,
lib/stupidedi/versions/functional_groups/003040/segment_defs/W12.rb,
lib/stupidedi/versions/functional_groups/003040/segment_defs/W14.rb,
lib/stupidedi/versions/functional_groups/003040/segment_defs/W17.rb,
lib/stupidedi/versions/functional_groups/003040/segment_defs/W20.rb,
lib/stupidedi/versions/functional_groups/003040/segment_defs/W27.rb,
lib/stupidedi/versions/functional_groups/003040/segment_defs/W66.rb,
lib/stupidedi/versions/functional_groups/003040/segment_defs/W76.rb

Constant Summary collapse

B1 =
s::SegmentDef.build(:B1, "Beginning Segment for Booking or Pick-up/Delivery",
"To transmit identifying numbers, dates, and other basic data relating to the transaction set",
e::E140 .simple_use(r::Optional,   s::RepeatCount.bounded(1)),
e::E145 .simple_use(r::Mandatory,  s::RepeatCount.bounded(1)),
e::E373 .simple_use(r::Optional,   s::RepeatCount.bounded(1)),
e::E558 .simple_use(r::Optional,   s::RepeatCount.bounded(1)))
B2 =
s::SegmentDef.build(:B2, "Beginning Segment for Shipment Information Transaction",
"To transmit basic data relating to shipment information",
e::E375 .simple_use(r::Optional,   s::RepeatCount.bounded(1)),
e::E140 .simple_use(r::Mandatory,  s::RepeatCount.bounded(1)),
e::E154 .simple_use(r::Optional,   s::RepeatCount.bounded(1)),
e::E145 .simple_use(r::Optional,   s::RepeatCount.bounded(1)),
e::E188 .simple_use(r::Optional,   s::RepeatCount.bounded(1)),
e::E146 .simple_use(r::Mandatory,  s::RepeatCount.bounded(1)),
e::E147 .simple_use(r::Optional,   s::RepeatCount.bounded(1)),
e::E86  .simple_use(r::Optional,   s::RepeatCount.bounded(1)),
e::E460 .simple_use(r::Optional,   s::RepeatCount.bounded(1)),
e::E501 .simple_use(r::Optional,   s::RepeatCount.bounded(1)),
e::E335 .simple_use(r::Optional,   s::RepeatCount.bounded(1)),
e::E591 .simple_use(r::Optional,   s::RepeatCount.bounded(1)))
GE =
s::SegmentDef.build(:GE, "Functional Group Trailer",
"To indicate the end of a functional group and provider control information",
e::E97  .simple_use(r::Mandatory,  s::RepeatCount.bounded(1)),
e::E28  .simple_use(r::Mandatory,  s::RepeatCount.bounded(1)))
GS =
s::SegmentDef.build(:GS, "Functional Group Header",
"To indicate the beginning of a functional group and to provider control information",
e::E479 .simple_use(r::Mandatory,  s::RepeatCount.bounded(1)),
e::E142 .simple_use(r::Mandatory,  s::RepeatCount.bounded(1)),
e::E124 .simple_use(r::Mandatory,  s::RepeatCount.bounded(1)),
e::E373 .simple_use(r::Mandatory,  s::RepeatCount.bounded(1)),
e::E337 .simple_use(r::Mandatory,  s::RepeatCount.bounded(1)),
e::E28  .simple_use(r::Mandatory,  s::RepeatCount.bounded(1)),
e::E455 .simple_use(r::Mandatory,  s::RepeatCount.bounded(1)),
e::E480 .simple_use(r::Mandatory,  s::RepeatCount.bounded(1)))
HL =
s::SegmentDef.build(:HL, "Hierarchical Level",
"To identify dependencies among the content of hierarchically related groups of data segments",
e::E628 .simple_use(r::Mandatory,  s::RepeatCount.bounded(1)),
e::E734 .simple_use(r::Optional,   s::RepeatCount.bounded(1)),
e::E735 .simple_use(r::Mandatory,  s::RepeatCount.bounded(1)),
e::E736 .simple_use(r::Optional,   s::RepeatCount.bounded(1)))
K1 =
s::SegmentDef.build(:K1 , "Remarks",
"To transmit information in a free-form format for comment or special instruction",
e::E61.simple_use(r::Mandatory,  s::RepeatCount.bounded(1)),
e::E61.simple_use(r::Optional ,  s::RepeatCount.bounded(1)))
L3 =
s::SegmentDef.build(:L3 , "Total Weight and Charges",
"To specify the total shipment in terms of weight, volume, rates, charges, advances, and prepaid amounts applicable to one or more line items",
e::E81 .simple_use(r::Relational, s::RepeatCount.bounded(1)),
e::E187.simple_use(r::Relational, s::RepeatCount.bounded(1)),
e::E60 .simple_use(r::Relational, s::RepeatCount.bounded(1)),
e::E122.simple_use(r::Relational, s::RepeatCount.bounded(1)),
e::E58 .simple_use(r::Optional  , s::RepeatCount.bounded(1)),
e::E191.simple_use(r::Optional,   s::RepeatCount.bounded(1)),
e::E117.simple_use(r::Optional,   s::RepeatCount.bounded(1)),
e::E150.simple_use(r::Optional,   s::RepeatCount.bounded(1)),
e::E183.simple_use(r::Relational, s::RepeatCount.bounded(1)),
e::E184.simple_use(r::Relational, s::RepeatCount.bounded(1)),
e::E80 .simple_use(r::Optional,   s::RepeatCount.bounded(1)),
e::E188.simple_use(r::Optional,   s::RepeatCount.bounded(1)),
e::E171.simple_use(r::Optional,   s::RepeatCount.bounded(1)),
e::E74 .simple_use(r::Relational, s::RepeatCount.bounded(1)),
e::E122.simple_use(r::Relational, s::RepeatCount.bounded(1)),

SyntaxNotes::P.build( 1,  2),
SyntaxNotes::P.build( 3,  4),
SyntaxNotes::P.build( 9, 10),
SyntaxNotes::C.build(12,  1),
SyntaxNotes::P.build(14, 15))
L5 =
s::SegmentDef.build(:L5 , "Description, Marks and Numbers",
"To specify the line item in terms of description, quantity, packaging, and marks and numbers",
e::E213.simple_use(r::Optional,   s::RepeatCount.bounded(1)),
e::E79 .simple_use(r::Optional,   s::RepeatCount.bounded(1)),
e::E22 .simple_use(r::Relational, s::RepeatCount.bounded(1)),
e::E23 .simple_use(r::Relational, s::RepeatCount.bounded(1)),
e::E103.simple_use(r::Optional,   s::RepeatCount.bounded(1)),
e::E87 .simple_use(r::Relational, s::RepeatCount.bounded(1)),
e::E88 .simple_use(r::Relational, s::RepeatCount.bounded(1)),
e::E23 .simple_use(r::Relational, s::RepeatCount.bounded(1)),
e::E22 .simple_use(r::Relational, s::RepeatCount.bounded(1)),
e::E595.simple_use(r::Optional,   s::RepeatCount.bounded(1)),

SyntaxNotes::P.build(3, 4),
SyntaxNotes::C.build(7, 6),
SyntaxNotes::P.build(8, 9))
LE =
s::SegmentDef.build(:LE, "Loop Trailer",
"To indicate that the loop immediately preceding this segment is complete",
e::E447 .simple_use(r::Mandatory,  s::RepeatCount.bounded(1)))
LS =
s::SegmentDef.build(:LS, "Loop Header",
"To indicate that the next segment begins a loop",
e::E447.simple_use(r::Mandatory,  s::RepeatCount.bounded(1)))
LX =
s::SegmentDef.build(:LX, "Assigned Numbers",
"To reference a line number in a transaction set",
e::E554.simple_use(r::Mandatory,  s::RepeatCount.bounded(1)))
M7 =
s::SegmentDef.build(:M7 , "Seal Numbers",
"To record seal numbers used and the organization that applied the seals",
e::E225 .simple_use(r::Mandatory,  s::RepeatCount.bounded(1)),
e::E225 .simple_use(r::Optional,   s::RepeatCount.bounded(1)),
e::E225 .simple_use(r::Optional,   s::RepeatCount.bounded(1)),
e::E225 .simple_use(r::Optional,   s::RepeatCount.bounded(1)),
e::E98  .simple_use(r::Optional,   s::RepeatCount.bounded(1)))
N1 =
s::SegmentDef.build(:N1, "Name",
"To identify a party by type of organization, name, and code",
e::E98  .simple_use(r::Mandatory,  s::RepeatCount.bounded(1)),
e::E93  .simple_use(r::Relational, s::RepeatCount.bounded(1)),
e::E66  .simple_use(r::Relational, s::RepeatCount.bounded(1)),
e::E67  .simple_use(r::Relational, s::RepeatCount.bounded(1)))
N2 =
s::SegmentDef.build(:N2, "Additional Name Information",
"Additional Name Information",
e::E93  .simple_use(r::Mandatory, s::RepeatCount.bounded(1)),
e::E93  .simple_use(r::Optional,  s::RepeatCount.bounded(1)))
N3 =
s::SegmentDef.build(:N3 , "Address Information",
"To specify the location of the named party",
e::E166 .simple_use(r::Mandatory,  s::RepeatCount.bounded(1)),
e::E166 .simple_use(r::Optional,   s::RepeatCount.bounded(1)))
N4 =
s::SegmentDef.build(:N4, "Geographic Location",
"To specify the goegraphic place of the named party",
e::E19  .simple_use(r::Optional,   s::RepeatCount.bounded(1)),
e::E156 .simple_use(r::Relational, s::RepeatCount.bounded(1)),
e::E116 .simple_use(r::Optional,   s::RepeatCount.bounded(1)),
e::E26  .simple_use(r::Relational, s::RepeatCount.bounded(1)))
N7 =
s::SegmentDef.build(:N7 , "Equipment Details",
"To identify the equipment",
e::E206.simple_use(r::Optional,   s::RepeatCount.bounded(1)),
e::E207.simple_use(r::Mandatory,  s::RepeatCount.bounded(1)),
e::E81 .simple_use(r::Relational, s::RepeatCount.bounded(1)),
e::E187.simple_use(r::Relational, s::RepeatCount.bounded(1)),
e::E167.simple_use(r::Optional,   s::RepeatCount.bounded(1)),
e::E232.simple_use(r::Optional,   s::RepeatCount.bounded(1)),
e::E205.simple_use(r::Optional,   s::RepeatCount.bounded(1)),
e::E183.simple_use(r::Relational, s::RepeatCount.bounded(1)),
e::E184.simple_use(r::Relational, s::RepeatCount.bounded(1)),
e::E102.simple_use(r::Optional,   s::RepeatCount.bounded(1)),
e::E40 .simple_use(r::Optional,   s::RepeatCount.bounded(1)),
e::E140.simple_use(r::Optional,   s::RepeatCount.bounded(1)),
e::E319.simple_use(r::Optional,   s::RepeatCount.bounded(1)),
e::E219.simple_use(r::Optional,   s::RepeatCount.bounded(1)),
e::E567.simple_use(r::Optional,   s::RepeatCount.bounded(1)),
e::E571.simple_use(r::Optional,   s::RepeatCount.bounded(1)),
e::E188.simple_use(r::Optional,   s::RepeatCount.bounded(1)),
e::E761.simple_use(r::Optional,   s::RepeatCount.bounded(1)),
e::E56 .simple_use(r::Optional,   s::RepeatCount.bounded(1)),
e::E65 .simple_use(r::Optional,   s::RepeatCount.bounded(1)),
e::E189.simple_use(r::Optional,   s::RepeatCount.bounded(1)),
e::E24 .simple_use(r::Optional,   s::RepeatCount.bounded(1)),
e::E140.simple_use(r::Optional,   s::RepeatCount.bounded(1)),
e::E301.simple_use(r::Optional,   s::RepeatCount.bounded(1)),
SyntaxNotes::P.build(3,  4),
SyntaxNotes::P.build(5, 16),
SyntaxNotes::P.build(8,  9))
N9 =
s::SegmentDef.build(:N9 , "Reference Identification",
"To transmit identifying information as specified by the Reference Identification Qualifier",
e::E128 .simple_use(r::Mandatory,  s::RepeatCount.bounded(1)),
e::E127 .simple_use(r::Mandatory,  s::RepeatCount.bounded(1)))
S5 =
s::SegmentDef.build(:S5 , "Stop Off Details",
"To specify stop-off detail reference numbers and stop reason",
e::E165 .simple_use(r::Mandatory,  s::RepeatCount.bounded(1)),
e::E163 .simple_use(r::Mandatory,  s::RepeatCount.bounded(1)),
e::E81  .simple_use(r::Relational, s::RepeatCount.bounded(1)),
e::E188 .simple_use(r::Relational, s::RepeatCount.bounded(1)),
e::E382 .simple_use(r::Relational, s::RepeatCount.bounded(1)),
e::E355 .simple_use(r::Relational, s::RepeatCount.bounded(1)),
e::E183 .simple_use(r::Relational, s::RepeatCount.bounded(1)),
e::E184 .simple_use(r::Relational, s::RepeatCount.bounded(1)),
e::E352 .simple_use(r::Optional,   s::RepeatCount.bounded(1)),
e::E154 .simple_use(r::Optional,   s::RepeatCount.bounded(1)),
e::E190 .simple_use(r::Optional,   s::RepeatCount.bounded(1)),

SyntaxNotes::P.build(3, 4),
SyntaxNotes::P.build(5, 6),
SyntaxNotes::P.build(7, 8))
SE =
s::SegmentDef.build(:SE, "Transaction Set Trailer",
"To indicate the end of the transaction set and provide the count of the transmitted segments (including the beginning (ST) and ending (SE) segments)",
e::E96  .simple_use(r::Mandatory,  s::RepeatCount.bounded(1)),
e::E329 .simple_use(r::Mandatory,  s::RepeatCount.bounded(1)))
ST =
s::SegmentDef.build(:ST, "Transaction Set Header",
"To indicate the start of a transaction set and assign a control number",
e::E143 .simple_use(r::Mandatory,  s::RepeatCount.bounded(1)),
e::E329 .simple_use(r::Mandatory,  s::RepeatCount.bounded(1)))
AK1 =
s::SegmentDef.build(:AK1, "Functional Group Response Header",
"To start acknowledgement of a functional group",
e::E479 .simple_use(r::Mandatory,  s::RepeatCount.bounded(1)),
e::E28  .simple_use(r::Mandatory,  s::RepeatCount.bounded(1)))
AK2 =
s::SegmentDef.build(:AK2, "Transaction Set Response Header",
"To start acknowledgement of a single transaction set",
e::E143 .simple_use(r::Mandatory,  s::RepeatCount.bounded(1)),
e::E329 .simple_use(r::Mandatory,  s::RepeatCount.bounded(1)))
AK3 =
s::SegmentDef.build(:AK3, "Data Segement Note",
"To report errors in a data segment, and identify the location of a data segment.",
e::E721 .simple_use(r::Mandatory,  s::RepeatCount.bounded(1)),
e::E719 .simple_use(r::Mandatory,  s::RepeatCount.bounded(1)))
AK9 =
s::SegmentDef.build(:AK9, "Functional Group Response Trailer",
"To acknowledge acceptance or rejection of a functional group and report the number of included transaction sets from the original trailer, the accepted sets, and the received sets in this functional group",
e::E715 .simple_use(r::Mandatory,  s::RepeatCount.bounded(1)),
e::E97  .simple_use(r::Mandatory,  s::RepeatCount.bounded(1)),
e::E123 .simple_use(r::Mandatory,  s::RepeatCount.bounded(1)),
e::E2   .simple_use(r::Mandatory,  s::RepeatCount.bounded(1)),
e::E716 .simple_use(r::Optional,   s::RepeatCount.bounded(1)))
AMT =
s::SegmentDef.build(:AMT, "Monetary Amount",
"To indicate the total monetary amount",
e::E522 .simple_use(r::Optional,  s::RepeatCount.bounded(1)),
e::E782 .simple_use(r::Mandatory,  s::RepeatCount.bounded(1)))
AT7 =
s::SegmentDef.build(:AT7, "Shipment Status Detail",
"To specify the status of a shipment, the reason for that status, the date and time of the status and the date and time of any appointments scheduled.",
e::E1650.simple_use(r::Relational, s::RepeatCount.bounded(1)),
e::E1651.simple_use(r::Relational, s::RepeatCount.bounded(1)),
e::E1652.simple_use(r::Relational, s::RepeatCount.bounded(1)),
e::E1651.simple_use(r::Relational, s::RepeatCount.bounded(1)),
e::E373 .simple_use(r::Relational, s::RepeatCount.bounded(1)),
e::E337 .simple_use(r::Relational, s::RepeatCount.bounded(1)),
e::E623 .simple_use(r::Optional,   s::RepeatCount.bounded(1)),

SyntaxNotes::E.build(1, 3),
SyntaxNotes::P.build(1, 2),
SyntaxNotes::P.build(3, 4),
SyntaxNotes::C.build(6, 5),
SyntaxNotes::C.build(7, 6))
AT8 =
s::SegmentDef.build(:AT8, "Shipment Weight, Packaging and Quantity Data",
"To specify shipment details in terms of weight, and quantity of handling units",
e::E187 .simple_use(r::Relational, s::RepeatCount.bounded(1)),
e::E188 .simple_use(r::Relational, s::RepeatCount.bounded(1)),
e::E81  .simple_use(r::Relational, s::RepeatCount.bounded(1)),
e::E80  .simple_use(r::Optional,   s::RepeatCount.bounded(1)),
e::E80  .simple_use(r::Optional,   s::RepeatCount.bounded(1)),
e::E184 .simple_use(r::Relational, s::RepeatCount.bounded(1)),
e::E183 .simple_use(r::Relational, s::RepeatCount.bounded(1)),

SyntaxNotes::P.build(6, 7),
SyntaxNotes::P.build(1, 2, 3))
B10 =
s::SegmentDef.build(:B10, "Beginning Segment for Transportation Carrier Shipment Status Message",
"To transmit identifying numbers and other basic data relating to the transaction set",
e::E127 .simple_use(r::Relational, s::RepeatCount.bounded(1)),
e::E145 .simple_use(r::Optional,   s::RepeatCount.bounded(1)),
e::E140 .simple_use(r::Mandatory,  s::RepeatCount.bounded(1)),
e::E71  .simple_use(r::Optional,   s::RepeatCount.bounded(1)),
e::E128 .simple_use(r::Relational, s::RepeatCount.bounded(1)),
e::E127 .simple_use(r::Relational, s::RepeatCount.bounded(1)),
e::E1073.simple_use(r::Optional,   s::RepeatCount.bounded(1)),

SyntaxNotes::R.build(1, 6),
SyntaxNotes::E.build(1, 5),
SyntaxNotes::P.build(5, 6))
B2A =
s::SegmentDef.build(:B2A, "Set Purpose",
"To allow for positive identification of transaction set purpose",
e::E353.simple_use(r::Mandatory,  s::RepeatCount.bounded(1)),
e::E346.simple_use(r::Optional,   s::RepeatCount.bounded(1)))
BEG =
s::SegmentDef.build(:BEG, "Beginning Segment for Purchase Order",
"To indicate the beginning of the Purchase Order Transaction Set and transmit identifying numbers and dates",
e::E353 .simple_use(r::Mandatory,  s::RepeatCount.bounded(1)),
e::E92  .simple_use(r::Mandatory,  s::RepeatCount.bounded(1)),
e::E324 .simple_use(r::Mandatory,  s::RepeatCount.bounded(1)),
e::E328 .simple_use(r::Optional,   s::RepeatCount.bounded(1)),
e::E323 .simple_use(r::Mandatory,  s::RepeatCount.bounded(1)))
BGN =
s::SegmentDef.build(:BGN, "Beginning Segment",
"To indicate the beginning of a transaction set",
e::E353 .simple_use(r::Mandatory,  s::RepeatCount.bounded(1)),
e::E127 .simple_use(r::Mandatory,  s::RepeatCount.bounded(1)),
e::E373 .simple_use(r::Mandatory,  s::RepeatCount.bounded(1)))
BPS =

Definition might be outdated, working from ANSI X12 2001 specification

s::SegmentDef.build(:BPS, "Beginning Segment for Payment Order/Remittance Advice",
"To (1) indicate the beginning of a payment order/remittance advice transaction set and
total payment and (2) to enable related transfer of funds and/or information from payor to
payee to occur while utilizing an automated clearing house (ACH) or other banking network.",
e::E591.simple_use(r::Mandatory,  s::RepeatCount.bounded(1)),
e::E782.simple_use(r::Mandatory,  s::RepeatCount.bounded(1)),
e::E305.simple_use(r::Mandatory,  s::RepeatCount.bounded(1)), #E373 ?
e::E508.simple_use(r::Optional,   s::RepeatCount.bounded(1)),
e::E513.simple_use(r::Optional,   s::RepeatCount.bounded(1)))
BSN =

Definition might be outdated, working from ANSI X12 2001 specification

s::SegmentDef.build(:BSN, "Beginning Segment for Ship Notice",
"To transmit identifying numbers, dates, and other basic data relating to the transaction set",
e::E353 .simple_use(r::Mandatory,  s::RepeatCount.bounded(1)),
e::E396 .simple_use(r::Mandatory,  s::RepeatCount.bounded(1)),
e::E729 .simple_use(r::Mandatory,  s::RepeatCount.bounded(1)), #E373 ?
e::E730 .simple_use(r::Optional,   s::RepeatCount.bounded(1)),
e::E1005.simple_use(r::Optional,   s::RepeatCount.bounded(1)),
e::E640 .simple_use(r::Relational, s::RepeatCount.bounded(1)),
e::E641 .simple_use(r::Optional,   s::RepeatCount.bounded(1)))
CTT =
s::SegmentDef.build(:CTT, "Transaction Totals",
"To transmit a hash total for a specific element in the transaction set",
e::E354 .simple_use(r::Mandatory,  s::RepeatCount.bounded(1)))
CUR =
s::SegmentDef.build(:CUR, "Currency",
"To specify the currency (dollars, pounds, francs, etc) used in a transaction",
e::E98  .simple_use(r::Mandatory,  s::RepeatCount.bounded(1)),
e::E100 .simple_use(r::Mandatory,  s::RepeatCount.bounded(1)),
e::E280 .simple_use(r::Optional,   s::RepeatCount.bounded(1)))
DTM =
s::SegmentDef.build(:DTM, "Date/Time Reference",
"To specify pertinent dates and times",
e::E374 .simple_use(r::Mandatory,  s::RepeatCount.bounded(1)),
e::E373 .simple_use(r::Relational, s::RepeatCount.bounded(1)),

# e::E337 .simple_use(r::Optional, s::RepeatCount.bounded(1)),
# e::E623 .simple_use(r::Optional, s::RepeatCount.bounded(1)),
e::E624 .simple_use(r::Optional, s::RepeatCount.bounded(1)))
FOB =
s::SegmentDef.build(:FOB, "F.O.B. Related Instructions",
"To specify transportation instructions relating to shipment",
e::E146 .simple_use(r::Mandatory,  s::RepeatCount.bounded(1)),
e::E309 .simple_use(r::Relational,  s::RepeatCount.bounded(1)),
e::E352 .simple_use(r::Optional,  s::RepeatCount.bounded(1)),
e::E309 .simple_use(r::Relational,  s::RepeatCount.bounded(1)),
e::E352 .simple_use(r::Optional,  s::RepeatCount.bounded(1)))
G61 =
s::SegmentDef.build(:G61, "Contact",
"To identify a person or office to whom communications should be directed",
e::E366 .simple_use(r::Mandatory,  s::RepeatCount.bounded(1)),
e::E93  .simple_use(r::Mandatory,  s::RepeatCount.bounded(1)),
e::E365 .simple_use(r::Relational, s::RepeatCount.bounded(1)),
e::E364 .simple_use(r::Relational, s::RepeatCount.bounded(1)),
e::E443 .simple_use(r::Optional,   s::RepeatCount.bounded(1)),

SyntaxNotes::P.build(3, 4))
G62 =
s::SegmentDef.build(:G62, "Date/Time",
"To specify pertinent dates and times",
e::E432 .simple_use(r::Relational, s::RepeatCount.bounded(1)),
e::E373 .simple_use(r::Relational, s::RepeatCount.bounded(1)),
e::E176 .simple_use(r::Relational, s::RepeatCount.bounded(1)),
e::E337 .simple_use(r::Relational, s::RepeatCount.bounded(1)),
e::E623 .simple_use(r::Optional,   s::RepeatCount.bounded(1)),

SyntaxNotes::P.build(1, 2),
SyntaxNotes::P.build(3, 4))
G69 =
s::SegmentDef.build(:G69, "Line Item Detail - Description",
"To describe an item in free-form format",
e::E369.simple_use(r::Mandatory, s::RepeatCount.bounded(1)))
IT1 =
s::SegmentDef.build(:IT1, "Baseline Item Data (Invoice)",
"To specify the basic and most frequently used line item data for the invoice and related transactions",
e::E350 .simple_use(r::Optional,  s::RepeatCount.bounded(1)),
e::E358 .simple_use(r::Mandatory,  s::RepeatCount.bounded(1)),
e::E355 .simple_use(r::Mandatory,  s::RepeatCount.bounded(1)),
e::E212 .simple_use(r::Mandatory,  s::RepeatCount.bounded(1)))
ITD =
s::SegmentDef.build(:ITD, "Terms of Sale/Deferred Terms of Sale",
"To specify terms of sale",
e::E336 .simple_use(r::Mandatory,  s::RepeatCount.bounded(1)),
e::E333 .simple_use(r::Relational,  s::RepeatCount.bounded(1)),
e::E338 .simple_use(r::Optional,  s::RepeatCount.bounded(1)),
e::E370 .simple_use(r::Relational,  s::RepeatCount.bounded(1)),
e::E351 .simple_use(r::Relational,  s::RepeatCount.bounded(1)),
e::E446 .simple_use(r::Optional,  s::RepeatCount.bounded(1)),
e::E386 .simple_use(r::Optional,  s::RepeatCount.bounded(1)),
e::E362 .simple_use(r::Optional,  s::RepeatCount.bounded(1)),
e::E388 .simple_use(r::Optional,  s::RepeatCount.bounded(1)),
e::E389 .simple_use(r::Relational,  s::RepeatCount.bounded(1)),
e::E342 .simple_use(r::Relational,  s::RepeatCount.bounded(1)),
e::E352 .simple_use(r::Optional,  s::RepeatCount.bounded(1)),
e::E765 .simple_use(r::Relational,  s::RepeatCount.bounded(1)))
L11 =
s::SegmentDef.build(:L11, "Business Instructions and Reference Number",
"To specify instructions in this business relationship or a reference number",
e::E127 .simple_use(r::Relational, s::RepeatCount.bounded(1)),
e::E128 .simple_use(r::Relational, s::RepeatCount.bounded(1)),
e::E352 .simple_use(r::Relational, s::RepeatCount.bounded(1)),

SyntaxNotes::R.build(1,3),
SyntaxNotes::P.build(1,2))
LFH =
s::SegmentDef.build(:LFH, "Hazardous Material Shipping Name",
"To specify the hazardous material shipping name and additional descriptive requirements",
e::E808. simple_use(r::Mandatory,  s::RepeatCount.bounded(1)),
e::E809. simple_use(r::Mandatory,  s::RepeatCount.bounded(1)),
e::E809 .simple_use(r::Optional,   s::RepeatCount.bounded(1)),
e::E1023.simple_use(r::Optional,   s::RepeatCount.bounded(1)),
e::E355 .simple_use(r::Relational, s::RepeatCount.bounded(1)),
e::E380 .simple_use(r::Relational, s::RepeatCount.bounded(1)),
e::E380 .simple_use(r::Optional,   s::RepeatCount.bounded(1)),
e::E373 .simple_use(r::Optional,   s::RepeatCount.bounded(1)),

SyntaxNotes::P.build(5, 6))
LH1 =
s::SegmentDef.build(:LH1, "Hazardous Identification Information",
"To specify the hazardous commodity identification reference number and quantity",
e::E355 .simple_use(r::Mandatory,  s::RepeatCount.bounded(1)),
e::E80  .simple_use(r::Mandatory,  s::RepeatCount.bounded(1)),
e::E277 .simple_use(r::Optional ,  s::RepeatCount.bounded(1)),
e::E200 .simple_use(r::Optional,   s::RepeatCount.bounded(1)),
e::E22  .simple_use(r::Optional,   s::RepeatCount.bounded(1)),
e::E355 .simple_use(r::Relational, s::RepeatCount.bounded(1)),
e::E380 .simple_use(r::Relational, s::RepeatCount.bounded(1)),
e::E595 .simple_use(r::Optional,   s::RepeatCount.bounded(1)),
e::E665 .simple_use(r::Optional,   s::RepeatCount.bounded(1)),
e::E254 .simple_use(r::Optional ,  s::RepeatCount.bounded(1)),
e::E1375.simple_use(r::Optional ,  s::RepeatCount.bounded(1)),
e::E1271.simple_use(r::Optional ,  s::RepeatCount.bounded(1)),

SyntaxNotes::P.build(6 ,7))
LH2 =
s::SegmentDef.build(:LH2, "Hazardous Classification Information",
"To specify the hazadous notation and endorsement information",
e::E215. simple_use(r::Optional,   s::RepeatCount.bounded(1)),
e::E983. simple_use(r::Optional,   s::RepeatCount.bounded(1)),
e::E218 .simple_use(r::Optional,   s::RepeatCount.bounded(1)),
e::E222 .simple_use(r::Optional,   s::RepeatCount.bounded(1)),
e::E759 .simple_use(r::Optional,   s::RepeatCount.bounded(1)),
e::E355 .simple_use(r::Relational, s::RepeatCount.bounded(1)),
e::E408 .simple_use(r::Relational, s::RepeatCount.bounded(1)),
e::E355 .simple_use(r::Relational, s::RepeatCount.bounded(1)),
e::E408 .simple_use(r::Relational, s::RepeatCount.bounded(1)),
e::E355 .simple_use(r::Relational, s::RepeatCount.bounded(1)),
e::E408 .simple_use(r::Relational, s::RepeatCount.bounded(1)),
e::E188 .simple_use(r::Relational, s::RepeatCount.bounded(1)),
e::E267 .simple_use(r::Relational, s::RepeatCount.bounded(1)),

SyntaxNotes::P.build( 6,  7),
SyntaxNotes::P.build( 8,  9),
SyntaxNotes::P.build(10, 11),
SyntaxNotes::P.build(12, 13))
LH3 =
s::SegmentDef.build(:LH3, "Hazardous Material Shipping Name",
"To specify the hazardous material shipping name and additional descriptive requirements",
e::E224 .simple_use(r::Relational,  s::RepeatCount.bounded(1)),
e::E984 .simple_use(r::Relational,  s::RepeatCount.bounded(1)),
e::E985 .simple_use(r::Optional,    s::RepeatCount.bounded(1)),
e::E1073.simple_use(r::Optional,    s::RepeatCount.bounded(1)),

SyntaxNotes::P.build(1, 2))
LIN =

Definition might be outdated, working from ANSI X12 2001 specification

s::SegmentDef.build(:LIN, "Item Identification",
"To specify basic item identification data",
e::E350 .simple_use(r::Optional,   s::RepeatCount.bounded(1)),
e::E235 .simple_use(r::Mandatory,  s::RepeatCount.bounded(1)),
e::E234 .simple_use(r::Mandatory,  s::RepeatCount.bounded(1)),
e::E235 .simple_use(r::Relational, s::RepeatCount.bounded(1)),
e::E234 .simple_use(r::Relational, s::RepeatCount.bounded(1)),
e::E235 .simple_use(r::Relational, s::RepeatCount.bounded(1)),
e::E234 .simple_use(r::Relational, s::RepeatCount.bounded(1)),
e::E235 .simple_use(r::Relational, s::RepeatCount.bounded(1)),
e::E234 .simple_use(r::Relational, s::RepeatCount.bounded(1)),
e::E235 .simple_use(r::Relational, s::RepeatCount.bounded(1)),
e::E234 .simple_use(r::Relational, s::RepeatCount.bounded(1)),
e::E235 .simple_use(r::Relational, s::RepeatCount.bounded(1)),
e::E234 .simple_use(r::Relational, s::RepeatCount.bounded(1)),
e::E235 .simple_use(r::Relational, s::RepeatCount.bounded(1)),
e::E234 .simple_use(r::Relational, s::RepeatCount.bounded(1)),
e::E235 .simple_use(r::Relational, s::RepeatCount.bounded(1)),
e::E234 .simple_use(r::Relational, s::RepeatCount.bounded(1)))
MAN =
s::SegmentDef.build(:MAN, "Marks and Numbers",
"To indicate identifying marks and numbers for shipping containers",
e::E88  .simple_use(r::Mandatory,  s::RepeatCount.bounded(1)),
e::E87  .simple_use(r::Mandatory,  s::RepeatCount.bounded(1)),
e::E87  .simple_use(r::Optional,   s::RepeatCount.bounded(1)),
e::E88  .simple_use(r::Relational, s::RepeatCount.bounded(1)),
e::E87  .simple_use(r::Relational, s::RepeatCount.bounded(1)),
e::E87  .simple_use(r::Optional,   s::RepeatCount.bounded(1)),

SyntaxNotes::P.build(4, 5),
SyntaxNotes::C.build(6, 5))
MEA =
s::SegmentDef.build(:MEA, "Measurements",
"To specify physical measurements or counts, including dimensions, tolerances, variances, and weights",
e::E737 .simple_use(r::Mandatory,  s::RepeatCount.bounded(1)),
e::E738 .simple_use(r::Mandatory,  s::RepeatCount.bounded(1)),
e::E739 .simple_use(r::Relational, s::RepeatCount.bounded(1)),
e::E355 .simple_use(r::Mandatory,  s::RepeatCount.bounded(1)),
e::E740 .simple_use(r::Relational, s::RepeatCount.bounded(1)),
e::E741 .simple_use(r::Relational, s::RepeatCount.bounded(1)),

SyntaxNotes::R.build( 3,  5,  6,  8),
SyntaxNotes::E.build( 4, 12),
SyntaxNotes::L.build( 5,  4, 12),
SyntaxNotes::L.build( 6,  4, 12),
SyntaxNotes::L.build( 7,  3,  5,  6),
SyntaxNotes::E.build( 8,  3),
SyntaxNotes::P.build(11, 12))
MS1 =
s::SegmentDef.build(:MS1, "Equipment, Shipment, or Real Property Location",
"To specify the location of a piece of equipment, a shipment, or real property in terms of city and state for the stop location that relates to the AT7 shipment status details.",
e::E19  .simple_use(r::Relational, s::RepeatCount.bounded(1)),
e::E156 .simple_use(r::Relational, s::RepeatCount.bounded(1)),
e::E26  .simple_use(r::Relational, s::RepeatCount.bounded(1)),
e::E1654.simple_use(r::Relational, s::RepeatCount.bounded(1)),
e::E1655.simple_use(r::Relational, s::RepeatCount.bounded(1)),
e::E1280.simple_use(r::Optional,   s::RepeatCount.bounded(1)),
e::E1280.simple_use(r::Optional,   s::RepeatCount.bounded(1)),
e::E116 .simple_use(r::Optional,   s::RepeatCount.bounded(1)),

SyntaxNotes::L.build(1, 2, 3),
SyntaxNotes::E.build(1, 4),
SyntaxNotes::C.build(2, 1),
SyntaxNotes::C.build(3, 1),
SyntaxNotes::P.build(4, 5),
SyntaxNotes::C.build(6, 4),
SyntaxNotes::C.build(7, 4),
SyntaxNotes::C.build(8, 1))
MS2 =
s::SegmentDef.build(:MS2, "Equipment or Container Owner and Type",
"To specify the owner, the identification number assigned by that owner, and the type of equipment",
e::E140 .simple_use(r::Relational, s::RepeatCount.bounded(1)),
e::E207 .simple_use(r::Relational, s::RepeatCount.bounded(1)),
e::E40  .simple_use(r::Optional,   s::RepeatCount.bounded(1)),
e::E761 .simple_use(r::Optional,   s::RepeatCount.bounded(1)),

SyntaxNotes::P.build(1, 2),
SyntaxNotes::C.build(4, 2))
MS3 =
s::SegmentDef.build(:MS3, "Interline Information",
"To identify the interline carrier and relevant data",
e::E140 .simple_use(r::Mandatory,  s::RepeatCount.bounded(1)),
e::E133 .simple_use(r::Mandatory,  s::RepeatCount.bounded(1)),
e::E19  .simple_use(r::Relational, s::RepeatCount.bounded(1)),
e::E91  .simple_use(r::Optional,   s::RepeatCount.bounded(1)),
e::E156 .simple_use(r::Relational, s::RepeatCount.bounded(1)),

SyntaxNotes::C.build(5,3))
MSG =
s::SegmentDef.build(:MSG, "Message Text",
"To provide a free form format that would allow the transmission of text information",
e::E933.simple_use(r::Relational,  s::RepeatCount.bounded(1)))
NTE =
s::SegmentDef.build(:NTE, "Note/Special Instruction",
"To transmit information in a free-form format, if necessary, for comment or special instruction",
e::E363 .simple_use(r::Optional,   s::RepeatCount.bounded(1)),
e::E352 .simple_use(r::Mandatory,  s::RepeatCount.bounded(1)))
PER =
s::SegmentDef.build(:PER, "Administrative Communications Contact",
"To identify a person or office to whom administrative communications should be directed",
e::E366 .simple_use(r::Mandatory,  s::RepeatCount.bounded(1)),
e::E93  .simple_use(r::Optional,   s::RepeatCount.bounded(1)),
e::E365 .simple_use(r::Relational, s::RepeatCount.bounded(1)),
e::E364 .simple_use(r::Relational, s::RepeatCount.bounded(1)))
PID =
s::SegmentDef.build(:PID, "Product/Item Description",
"To describe a product or process in coded or free-form format",
e::E349 .simple_use(r::Mandatory,  s::RepeatCount.bounded(1)),
e::E750 .simple_use(r::Optional,   s::RepeatCount.bounded(1)),
e::E559 .simple_use(r::Relational, s::RepeatCount.bounded(1)),
e::E751 .simple_use(r::Relational, s::RepeatCount.bounded(1)),
e::E352 .simple_use(r::Relational, s::RepeatCount.bounded(1)))
PLD =
s::SegmentDef.build(:PLD, "Pallet Information",
"To specify pallet information including quantity, exchange, and weight",
e::E406 .simple_use(r::Mandatory,  s::RepeatCount.bounded(1)),
e::E399 .simple_use(r::Optional,   s::RepeatCount.bounded(1)),
e::E188 .simple_use(r::Relational, s::RepeatCount.bounded(1)),
e::E81  .simple_use(r::Relational, s::RepeatCount.bounded(1)),

SyntaxNotes::P.build(3, 4))
PO1 =
s::SegmentDef.build(:PO1, "Purchase Order Baseline Item Data",
"To specify basic and most frequently used purchase order line item data",
e::E350 .simple_use(r::Optional,  s::RepeatCount.bounded(1)),
e::E330 .simple_use(r::Relational, s::RepeatCount.bounded(1)),
e::E355 .simple_use(r::Optional, s::RepeatCount.bounded(1)),
e::E212 .simple_use(r::Relational, s::RepeatCount.bounded(1)),
e::E639 .simple_use(r::Optional, s::RepeatCount.bounded(1)),
e::E235 .simple_use(r::Optional, s::RepeatCount.bounded(1)),
e::E234 .simple_use(r::Relational, s::RepeatCount.bounded(1)),
e::E235 .simple_use(r::Optional, s::RepeatCount.bounded(1)),
e::E234 .simple_use(r::Relational, s::RepeatCount.bounded(1)))
PO4 =

Definition might be outdated, working from ANSI X12 2001 specification

s::SegmentDef.build(:PO4, "Item Physical Details",
"To specify the physical qualities, packaging, weights, and dimensions relating to the item",
e::E356 .simple_use(r::Optional,   s::RepeatCount.bounded(1)),
e::E357 .simple_use(r::Optional,   s::RepeatCount.bounded(1)),
e::E355 .simple_use(r::Relational, s::RepeatCount.bounded(1)))
PRR =
s::SegmentDef.build(:PRR, "Problem Report",
"To describe a product condition when presented for service or a recall notice or a service bulletin",
e::E350 .simple_use(r::Optional,  s::RepeatCount.bounded(1)),
e::E1229.simple_use(r::Relational,  s::RepeatCount.bounded(1)),
e::E352 .simple_use(r::Relational,  s::RepeatCount.bounded(1)))
QTY =
s::SegmentDef.build(:QTY, "Quantity",
"To specify quantity information",
e::E673 .simple_use(r::Mandatory,  s::RepeatCount.bounded(1)),
e::E380 .simple_use(r::Mandatory,  s::RepeatCount.bounded(1)),
e::E355 .simple_use(r::Optional,  s::RepeatCount.bounded(1)))
REF =
s::SegmentDef.build(:REF, "Reference Numbers",
"To specify identifying information",
e::E128 .simple_use(r::Mandatory,  s::RepeatCount.bounded(1)),
e::E127 .simple_use(r::Relational, s::RepeatCount.bounded(1)),
e::E352 .simple_use(r::Relational, s::RepeatCount.bounded(1)))
REP =
s::SegmentDef.build(:REP, "Repair Action",
"To specify the action that was taken or is to be taken in response to a service request",
e::E350 .simple_use(r::Optional,  s::RepeatCount.bounded(1)),
e::E235 .simple_use(r::Relational,  s::RepeatCount.bounded(1)),
e::E234 .simple_use(r::Relational,  s::RepeatCount.bounded(1)))
RMT =
s::SegmentDef.build(:RMT , "Remittance Advice",
"To indicate the detail on items",
# e::E128 .simple_use(r::Mandatory,  s::RepeatCount.bounded(1)),
# e::E127 .simple_use(r::Mandatory,  s::RepeatCount.bounded(1)),
# e::E782 .simple_use(r::Optional,   s::RepeatCount.bounded(1)),
# e::E777 .simple_use(r::Optional,   s::RepeatCount.bounded(1)),
# e::E780 .simple_use(r::Optional,   s::RepeatCount.bounded(1)),
# e::E426 .simple_use(r::Optional,   s::RepeatCount.bounded(1)),
# e::E352 .simple_use(r::Optional,   s::RepeatCount.bounded(1)))

e::E128 .simple_use(r::Mandatory,  s::RepeatCount.bounded(1)),
e::E127 .simple_use(r::Mandatory,  s::RepeatCount.bounded(1)),
e::E782 .simple_use(r::Optional,   s::RepeatCount.bounded(1)),
e::E777 .simple_use(r::Optional,   s::RepeatCount.bounded(1)),
e::E0   .simple_use(r::Optional,   s::RepeatCount.bounded(1)),
e::E0   .simple_use(r::Optional,   s::RepeatCount.bounded(1)),
e::E780 .simple_use(r::Optional,   s::RepeatCount.bounded(1)),
e::E0   .simple_use(r::Optional,   s::RepeatCount.bounded(1)),
e::E426 .simple_use(r::Optional,   s::RepeatCount.bounded(1)),
e::E352 .simple_use(r::Optional,   s::RepeatCount.bounded(1)))
SN1 =

Definition might be outdated, working from ANSI X12 2001 specification

s::SegmentDef.build(:SN1, "Item Detail (Shipment)",
"To specify line-item detail relative to shipment",
e::E350 .simple_use(r::Optional,   s::RepeatCount.bounded(1)),
e::E382 .simple_use(r::Mandatory,  s::RepeatCount.bounded(1)),
e::E355 .simple_use(r::Mandatory,  s::RepeatCount.bounded(1)),
e::E646 .simple_use(r::Optional,   s::RepeatCount.bounded(1)),
e::E330 .simple_use(r::Relational, s::RepeatCount.bounded(1)),
e::E355 .simple_use(r::Optional,   s::RepeatCount.bounded(1)),
e::E728 .simple_use(r::Relational, s::RepeatCount.bounded(1)),
e::E668 .simple_use(r::Optional,   s::RepeatCount.bounded(1)))
SSS =
s::SegmentDef.build(:SSS, "Special Services",
"To specify special conditions or services associated with the purchased product",
e::E248 .simple_use(r::Mandatory,  s::RepeatCount.bounded(1)),
e::E559 .simple_use(r::Mandatory,  s::RepeatCount.bounded(1)),
e::E560 .simple_use(r::Mandatory,  s::RepeatCount.bounded(1)),
e::E359 .simple_use(r::Optional,  s::RepeatCount.bounded(1)),
e::E360 .simple_use(r::Optional,  s::RepeatCount.bounded(1)),
e::E380 .simple_use(r::Optional,  s::RepeatCount.bounded(1)))
TD1 =

Definition might be outdated, working from ANSI X12 2001 specification

s::SegmentDef.build(:TD1, "Carrier Details (Quantity and Weight)",
"To specify the transportation details relative to commodity, weight, and quantity",
e::E103 .simple_use(r::Optional,    s::RepeatCount.bounded(1)),
e::E80  .simple_use(r::Relational,  s::RepeatCount.bounded(1)),
e::E23  .simple_use(r::Optional,    s::RepeatCount.bounded(1)),
e::E22  .simple_use(r::Relational,  s::RepeatCount.bounded(1)),
e::E79  .simple_use(r::Optional,    s::RepeatCount.bounded(1)),
e::E187 .simple_use(r::Optional,    s::RepeatCount.bounded(1)),
e::E81  .simple_use(r::Relational,  s::RepeatCount.bounded(1)),
e::E355 .simple_use(r::Relational,  s::RepeatCount.bounded(1)),
e::E183 .simple_use(r::Relational,  s::RepeatCount.bounded(1)),
e::E355 .simple_use(r::Relational,  s::RepeatCount.bounded(1)))
TD3 =

Definition might be outdated, working from ANSI X12 2001 specification

s::SegmentDef.build(:TD3, "Carrier Details (Equipment)",
"To specify transportation details relating to the equipment used by the carrier",
e::E40  .simple_use(r::Mandatory,  s::RepeatCount.bounded(1)),
e::E206 .simple_use(r::Optional,   s::RepeatCount.bounded(1)),
e::E207 .simple_use(r::Relational, s::RepeatCount.bounded(1)))
TD5 =
s::SegmentDef.build(:TD5, "Carrier Details (Routing Sequence/Transit Time)",
"To specify the carrier and sequence of routing and provide transit time information",
e::E91 .simple_use(r::Relational,  s::RepeatCount.bounded(1)),
e::E387 .simple_use(r::Relational,  s::RepeatCount.bounded(1)))
TDS =
s::SegmentDef.build(:TDS, "Total Monetary Value Summary",
"To specify the total invoice discounts and amounts",
e::E361 .simple_use(r::Mandatory,  s::RepeatCount.bounded(1)))
W01 =
s::SegmentDef.build(:W01, "Line Item Detail",
"Line Item Detail",
e::E380 .simple_use(r::Mandatory,  s::RepeatCount.bounded(1)),
e::E355 .simple_use(r::Mandatory,  s::RepeatCount.bounded(1)),
e::E438 .simple_use(r::Relational, s::RepeatCount.bounded(1)),
e::E235 .simple_use(r::Relational, s::RepeatCount.bounded(1)),
e::E234 .simple_use(r::Relational, s::RepeatCount.bounded(1)),
e::E235 .simple_use(r::Relational, s::RepeatCount.bounded(1)),

e::E234 .simple_use(r::Relational, s::RepeatCount.bounded(1)),
e::E59  .simple_use(r::Optional,   s::RepeatCount.bounded(1)),
e::E121 .simple_use(r::Optional,   s::RepeatCount.bounded(1)),
e::E23  .simple_use(r::Relational, s::RepeatCount.bounded(1)),
e::E22  .simple_use(r::Relational, s::RepeatCount.bounded(1)),
e::E416 .simple_use(r::Optional,   s::RepeatCount.bounded(1)),

e::E451 .simple_use(r::Optional,   s::RepeatCount.bounded(1)),
e::E286 .simple_use(r::Optional,   s::RepeatCount.bounded(1)),
e::E235 .simple_use(r::Relational, s::RepeatCount.bounded(1)),
e::E234 .simple_use(r::Relational, s::RepeatCount.bounded(1)),
e::E560 .simple_use(r::Optional,   s::RepeatCount.bounded(1)),

SyntaxNotes::R.build( 3,  4),
SyntaxNotes::P.build( 4,  5),
SyntaxNotes::P.build( 6,  7),
SyntaxNotes::P.build(10, 11),
SyntaxNotes::P.build(15, 16))
W03 =
s::SegmentDef.build(:W03, "Total Shipment Information",
"To provide totals relating to the shipment",
e::E382 .simple_use(r::Mandatory,  s::RepeatCount.bounded(1)),
e::E81  .simple_use(r::Relational, s::RepeatCount.bounded(1)),
e::E355 .simple_use(r::Relational, s::RepeatCount.bounded(1)),
e::E183 .simple_use(r::Relational, s::RepeatCount.bounded(1)),
e::E355 .simple_use(r::Relational, s::RepeatCount.bounded(1)),
e::E80  .simple_use(r::Relational, s::RepeatCount.bounded(1)),
e::E355 .simple_use(r::Relational, s::RepeatCount.bounded(1)),

SyntaxNotes::P.build(2, 3),
SyntaxNotes::P.build(4, 5),
SyntaxNotes::P.build(6, 7))
W04 =
s::SegmentDef.build(:W04, "Item Detail Total",
"To designate those line items that were shipped",
e::E382 .simple_use(r::Mandatory,  s::RepeatCount.bounded(1)),
e::E355 .simple_use(r::Mandatory,  s::RepeatCount.bounded(1)),
e::E438 .simple_use(r::Relational, s::RepeatCount.bounded(1)),
e::E235 .simple_use(r::Relational, s::RepeatCount.bounded(1)),
e::E234 .simple_use(r::Relational, s::RepeatCount.bounded(1)),
e::E235 .simple_use(r::Relational, s::RepeatCount.bounded(1)),
e::E234 .simple_use(r::Relational, s::RepeatCount.bounded(1)),
e::E59  .simple_use(r::Optional,   s::RepeatCount.bounded(1)),
e::E121 .simple_use(r::Optional,   s::RepeatCount.bounded(1)),
e::E23  .simple_use(r::Relational, s::RepeatCount.bounded(1)),
e::E22  .simple_use(r::Relational, s::RepeatCount.bounded(1)),
e::E416 .simple_use(r::Optional,   s::RepeatCount.bounded(1)),
e::E844 .simple_use(r::Optional,   s::RepeatCount.bounded(1)),
e::E235 .simple_use(r::Relational, s::RepeatCount.bounded(1)),
e::E234 .simple_use(r::Relational, s::RepeatCount.bounded(1)),

SyntaxNotes::R.build( 3,  4),
SyntaxNotes::P.build( 4,  5),
SyntaxNotes::P.build( 6,  7),
SyntaxNotes::P.build(10, 11),
SyntaxNotes::P.build(14, 15))
W05 =
s::SegmentDef.build(:W05, "Shipping Order Identification",
"Shipping Order Identification",
e::E473. simple_use(r::Mandatory,  s::RepeatCount.bounded(1)),
e::E285. simple_use(r::Mandatory,  s::RepeatCount.bounded(1)),
e::E324. simple_use(r::Optional,   s::RepeatCount.bounded(1)),
e::E472. simple_use(r::Relational, s::RepeatCount.bounded(1)),
e::E474. simple_use(r::Relational, s::RepeatCount.bounded(1)),
e::E640 .simple_use(r::Optional,   s::RepeatCount.bounded(1)),
e::E306 .simple_use(r::Optional,   s::RepeatCount.bounded(1)),
e::E92  .simple_use(r::Optional,   s::RepeatCount.bounded(1)),

SyntaxNotes::P.build(4, 5))
W06 =
s::SegmentDef.build(:W06, "Warehouse Shipment Identification",
"To provide identifying numbers, dates, and other basic data for this transaction set",
e::E514 .simple_use(r::Mandatory,  s::RepeatCount.bounded(1)),
e::E285 .simple_use(r::Mandatory,  s::RepeatCount.bounded(1)),
e::E373 .simple_use(r::Mandatory,  s::RepeatCount.bounded(1)),
e::E145 .simple_use(r::Optional,   s::RepeatCount.bounded(1)),
e::E531 .simple_use(r::Optional,   s::RepeatCount.bounded(1)),
e::E324 .simple_use(r::Optional,   s::RepeatCount.bounded(1)),
e::E474 .simple_use(r::Relational, s::RepeatCount.bounded(1)),
e::E472 .simple_use(r::Relational, s::RepeatCount.bounded(1)),
e::E152 .simple_use(r::Optional,   s::RepeatCount.bounded(1)),
e::E891 .simple_use(r::Optional,   s::RepeatCount.bounded(1)),
e::E640 .simple_use(r::Optional,   s::RepeatCount.bounded(1)),
e::E306 .simple_use(r::Optional,   s::RepeatCount.bounded(1)),

SyntaxNotes::P.build(7, 8))
W07 =
s::SegmentDef.build(:W07, "Item Detail For Stock Receipt",
"To indicate quantity and condition of product received",
e::E380 .simple_use(r::Mandatory,  s::RepeatCount.bounded(1)),
e::E355 .simple_use(r::Mandatory,  s::RepeatCount.bounded(1)),
e::E438 .simple_use(r::Relational, s::RepeatCount.bounded(1)),
e::E235 .simple_use(r::Relational, s::RepeatCount.bounded(1)),
e::E234 .simple_use(r::Relational, s::RepeatCount.bounded(1)),
e::E235 .simple_use(r::Relational, s::RepeatCount.bounded(1)),
e::E234 .simple_use(r::Relational, s::RepeatCount.bounded(1)),
e::E451 .simple_use(r::Optional,   s::RepeatCount.bounded(1)),
e::E893 .simple_use(r::Optional,   s::RepeatCount.bounded(1)),
e::E235 .simple_use(r::Relational, s::RepeatCount.bounded(1)),
e::E234 .simple_use(r::Relational, s::RepeatCount.bounded(1)),

SyntaxNotes::R.build( 3,  4),
SyntaxNotes::P.build( 4,  5),
SyntaxNotes::P.build( 6,  7),
SyntaxNotes::P.build(10, 11))
W08 =
s::SegmentDef.build(:W08, "Receipt Carrier Information",
"To identify carrier equipment and condition.",
e::E91  .simple_use(r::Mandatory,  s::RepeatCount.bounded(1)),
e::E140 .simple_use(r::Relational, s::RepeatCount.bounded(1)),
e::E387 .simple_use(r::Optional,   s::RepeatCount.bounded(1)),
e::E206 .simple_use(r::Relational, s::RepeatCount.bounded(1)),
e::E207 .simple_use(r::Relational, s::RepeatCount.bounded(1)),
e::E225 .simple_use(r::Optional,   s::RepeatCount.bounded(1)),
e::E225 .simple_use(r::Optional,   s::RepeatCount.bounded(1)),
e::E407 .simple_use(r::Optional,   s::RepeatCount.bounded(1)),
e::E400 .simple_use(r::Optional,   s::RepeatCount.bounded(1)),

SyntaxNotes::R.build(2, 4),
SyntaxNotes::P.build(4, 5))
W12 =
s::SegmentDef.build(:W12, "Warehouse Item Detail",
"To designate those line items that were shipped.",
e::E368 .simple_use(r::Mandatory,  s::RepeatCount.bounded(1)),
e::E380 .simple_use(r::Optional,   s::RepeatCount.bounded(1)),
e::E382 .simple_use(r::Optional,   s::RepeatCount.bounded(1)),
e::E383 .simple_use(r::Optional,   s::RepeatCount.bounded(1)),
e::E355 .simple_use(r::Optional,   s::RepeatCount.bounded(1)),
e::E438 .simple_use(r::Relational, s::RepeatCount.bounded(1)),

e::E235 .simple_use(r::Relational, s::RepeatCount.bounded(1)),
e::E234 .simple_use(r::Relational, s::RepeatCount.bounded(1)),
e::E451 .simple_use(r::Optional,   s::RepeatCount.bounded(1)),
e::E81  .simple_use(r::Relational, s::RepeatCount.bounded(1)),
e::E187 .simple_use(r::Relational, s::RepeatCount.bounded(1)),
e::E188 .simple_use(r::Relational, s::RepeatCount.bounded(1)),

e::E81  .simple_use(r::Relational, s::RepeatCount.bounded(1)),
e::E187 .simple_use(r::Relational, s::RepeatCount.bounded(1)),
e::E188 .simple_use(r::Relational, s::RepeatCount.bounded(1)),
e::E438 .simple_use(r::Optional,   s::RepeatCount.bounded(1)),
e::E235 .simple_use(r::Relational, s::RepeatCount.bounded(1)),
e::E234 .simple_use(r::Relational, s::RepeatCount.bounded(1)),

e::E892 .simple_use(r::Optional  , s::RepeatCount.bounded(1)),
e::E893 .simple_use(r::Optional  , s::RepeatCount.bounded(1)),
e::E235 .simple_use(r::Relational, s::RepeatCount.bounded(1)),
e::E234 .simple_use(r::Relational, s::RepeatCount.bounded(1)),

SyntaxNotes::R.build( 6,  7),
SyntaxNotes::P.build( 7,  8),
SyntaxNotes::P.build(10, 11, 12),
SyntaxNotes::P.build(13, 14, 15),
SyntaxNotes::P.build(17, 18),
SyntaxNotes::P.build(21, 22))
W14 =
s::SegmentDef.build(:W14, "Total Receipt Information",
"To indicate total received quantity",
e::E380.simple_use(r::Mandatory,  s::RepeatCount.bounded(1)),
e::E380.simple_use(r::Optional,   s::RepeatCount.bounded(1)),
e::E380.simple_use(r::Optional,   s::RepeatCount.bounded(1)),
e::E380.simple_use(r::Optional,   s::RepeatCount.bounded(1)),
e::E380.simple_use(r::Optional,   s::RepeatCount.bounded(1)))
W17 =
s::SegmentDef.build(:W17, "Warehouse Receipt Identification",
"To provide identifying numbers and date",
e::E514 .simple_use(r::Mandatory,  s::RepeatCount.bounded(1)),
e::E373 .simple_use(r::Mandatory,  s::RepeatCount.bounded(1)),
e::E394 .simple_use(r::Mandatory,  s::RepeatCount.bounded(1)),
e::E285 .simple_use(r::Mandatory,  s::RepeatCount.bounded(1)),
e::E145 .simple_use(r::Optional,   s::RepeatCount.bounded(1)),
e::E176 .simple_use(r::Relational, s::RepeatCount.bounded(1)),
e::E337 .simple_use(r::Relational, s::RepeatCount.bounded(1)),
e::E474 .simple_use(r::Relational, s::RepeatCount.bounded(1)),
e::E472 .simple_use(r::Relational, s::RepeatCount.bounded(1)),

SyntaxNotes::P.build(6, 7),
SyntaxNotes::P.build(8, 9))
W20 =
s::SegmentDef.build(:W20, "Packing",
"To specify packing details of the items shipped",
e::E356 .simple_use(r::Mandatory,  s::RepeatCount.bounded(1)),
e::E357 .simple_use(r::Relational, s::RepeatCount.bounded(1)),
e::E355 .simple_use(r::Relational, s::RepeatCount.bounded(1)),
e::E81  .simple_use(r::Relational, s::RepeatCount.bounded(1)),
e::E187 .simple_use(r::Relational, s::RepeatCount.bounded(1)),
e::E188 .simple_use(r::Relational, s::RepeatCount.bounded(1)),
e::E395 .simple_use(r::Optional,   s::RepeatCount.bounded(1)),
e::E183 .simple_use(r::Relational, s::RepeatCount.bounded(1)),
e::E355 .simple_use(r::Relational, s::RepeatCount.bounded(1)),
e::E397 .simple_use(r::Optional,   s::RepeatCount.bounded(1)),

SyntaxNotes::P.build(2, 3),
SyntaxNotes::P.build(4, 5, 6),
SyntaxNotes::P.build(8, 9))
W27 =
s::SegmentDef.build(:W27, "Carrier Detail",
"To specify details of the transportation equipment and carrier routing details",
e::E91  .simple_use(r::Mandatory,  s::RepeatCount.bounded(1)),
e::E140 .simple_use(r::Relational, s::RepeatCount.bounded(1)),
e::E387 .simple_use(r::Relational, s::RepeatCount.bounded(1)),
e::E146 .simple_use(r::Optional,   s::RepeatCount.bounded(1)),
e::E40  .simple_use(r::Optional,   s::RepeatCount.bounded(1)),
e::E206 .simple_use(r::Optional,   s::RepeatCount.bounded(1)),
e::E207 .simple_use(r::Optional,   s::RepeatCount.bounded(1)),
e::E368 .simple_use(r::Optional,   s::RepeatCount.bounded(1)),
e::E152 .simple_use(r::Optional,   s::RepeatCount.bounded(1)),
e::E890 .simple_use(r::Optional,   s::RepeatCount.bounded(1)),

SyntaxNotes::R.build(2, 3))
W66 =
s::SegmentDef.build(:W66, "Warehouse Carrier Information",
"Warehouse Carrier Information",
e::E146 .simple_use(r::Mandatory,  s::RepeatCount.bounded(1)),
e::E91  .simple_use(r::Mandatory,  s::RepeatCount.bounded(1)),
e::E399 .simple_use(r::Optional,   s::RepeatCount.bounded(1)),
e::E400 .simple_use(r::Optional,   s::RepeatCount.bounded(1)),
e::E387 .simple_use(r::Optional,   s::RepeatCount.bounded(1)),
e::E433 .simple_use(r::Optional,   s::RepeatCount.bounded(1)),
e::E434 .simple_use(r::Optional,   s::RepeatCount.bounded(1)),
e::E625 .simple_use(r::Relational, s::RepeatCount.bounded(1)),
e::E610 .simple_use(r::Relational, s::RepeatCount.bounded(1)),
e::E140 .simple_use(r::Optional,   s::RepeatCount.bounded(1)),

SyntaxNotes::P.build(8, 9))
W76 =
s::SegmentDef.build(:W76, "Total Shipping Order",
"Total Shipping Order",
e::E380 .simple_use(r::Mandatory,  s::RepeatCount.bounded(1)),
e::E81  .simple_use(r::Relational, s::RepeatCount.bounded(1)),
e::E355 .simple_use(r::Relational, s::RepeatCount.bounded(1)),
e::E183 .simple_use(r::Relational, s::RepeatCount.bounded(1)),
e::E355 .simple_use(r::Relational, s::RepeatCount.bounded(1)),
e::E398 .simple_use(r::Optional,   s::RepeatCount.bounded(1)),

SyntaxNotes::P.build(2, 3),
SyntaxNotes::P.build(4, 5),
SyntaxNotes::C.build(6, 3))