stupidedi 1.2.2 → 1.2.5

Sign up to get free protection for your applications and to get access to all the features.
Files changed (58) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +15 -3
  3. data/bin/edi-pp +3 -6
  4. data/lib/stupidedi/builder/builder_dsl.rb +4 -0
  5. data/lib/stupidedi/builder/generation.rb +2 -2
  6. data/lib/stupidedi/builder/states/abstract_state.rb +4 -4
  7. data/lib/stupidedi/config.rb +2 -0
  8. data/lib/stupidedi/contrib/003010/guides.rb +1 -1
  9. data/lib/stupidedi/contrib/003010/guides/PC860.rb +7 -2
  10. data/lib/stupidedi/contrib/003010/guides/PS830.rb +198 -0
  11. data/lib/stupidedi/contrib/003010/guides/RA820.rb +7 -0
  12. data/lib/stupidedi/contrib/003010/transaction_set_defs.rb +3 -0
  13. data/lib/stupidedi/contrib/003010/transaction_set_defs/PC860.rb +1 -1
  14. data/lib/stupidedi/contrib/003010/transaction_set_defs/PS830.rb +56 -0
  15. data/lib/stupidedi/contrib/003040/guides/WA142.rb +1 -0
  16. data/lib/stupidedi/contrib/004010/guides/PO850.rb +27 -1
  17. data/lib/stupidedi/contrib/004010/transaction_set_defs.rb +3 -0
  18. data/lib/stupidedi/contrib/004010/transaction_set_defs/PO850.rb +9 -1
  19. data/lib/stupidedi/contrib/004010/transaction_set_defs/SC832.rb +44 -0
  20. data/lib/stupidedi/schema/segment_def.rb +9 -1
  21. data/lib/stupidedi/schema/syntax_note.rb +0 -4
  22. data/lib/stupidedi/version.rb +1 -1
  23. data/lib/stupidedi/versions/functional_groups/002001/element_defs.rb +1 -1
  24. data/lib/stupidedi/versions/functional_groups/002001/element_types/identifier_val.rb +6 -6
  25. data/lib/stupidedi/versions/functional_groups/002001/segment_defs/MEA.rb +8 -9
  26. data/lib/stupidedi/versions/functional_groups/003010/element_defs.rb +57 -1
  27. data/lib/stupidedi/versions/functional_groups/003010/segment_defs.rb +14 -0
  28. data/lib/stupidedi/versions/functional_groups/003010/segment_defs/BFR.rb +40 -0
  29. data/lib/stupidedi/versions/functional_groups/003010/segment_defs/BPS.rb +8 -1
  30. data/lib/stupidedi/versions/functional_groups/003010/segment_defs/CTT.rb +2 -2
  31. data/lib/stupidedi/versions/functional_groups/003010/segment_defs/FOB.rb +2 -0
  32. data/lib/stupidedi/versions/functional_groups/003010/segment_defs/FST.rb +31 -0
  33. data/lib/stupidedi/versions/functional_groups/003010/segment_defs/MEA.rb +8 -9
  34. data/lib/stupidedi/versions/functional_groups/003010/segment_defs/N1.rb +3 -9
  35. data/lib/stupidedi/versions/functional_groups/003010/segment_defs/SDP.rb +21 -0
  36. data/lib/stupidedi/versions/functional_groups/003010/segment_defs/SHP.rb +22 -0
  37. data/lib/stupidedi/versions/functional_groups/003010/segment_defs/TD5.rb +3 -0
  38. data/lib/stupidedi/versions/functional_groups/003010/segment_defs/UIT.rb +20 -0
  39. data/lib/stupidedi/versions/functional_groups/003040/segment_defs/MEA.rb +8 -9
  40. data/lib/stupidedi/versions/functional_groups/003040/segment_defs/PRR.rb +2 -0
  41. data/lib/stupidedi/versions/functional_groups/003040/segment_defs/SSS.rb +2 -0
  42. data/lib/stupidedi/versions/functional_groups/003050/segment_defs/MEA.rb +8 -9
  43. data/lib/stupidedi/versions/functional_groups/004010/element_defs.rb +14 -7
  44. data/lib/stupidedi/versions/functional_groups/004010/segment_defs.rb +9 -0
  45. data/lib/stupidedi/versions/functional_groups/004010/segment_defs/BCT.rb +19 -0
  46. data/lib/stupidedi/versions/functional_groups/004010/segment_defs/BFR.rb +1 -0
  47. data/lib/stupidedi/versions/functional_groups/004010/segment_defs/CTP.rb +36 -0
  48. data/lib/stupidedi/versions/functional_groups/004010/segment_defs/SCH.rb +28 -0
  49. data/lib/stupidedi/versions/functional_groups/005010/element_defs.rb +1 -1
  50. data/lib/stupidedi/versions/interchanges/00200/element_defs.rb +2 -2
  51. data/lib/stupidedi/versions/interchanges/00200/segment_defs/ISA.rb +2 -2
  52. data/lib/stupidedi/versions/interchanges/00300/segment_defs/ISA.rb +2 -2
  53. data/lib/stupidedi/zipper/abstract_cursor.rb +4 -4
  54. data/spec/examples/integration/generating.example +10 -0
  55. data/spec/examples/stupidedi/reader/token_reader.example +1 -1
  56. data/spec/fixtures/SC832/1-good.txt +22 -0
  57. data/spec/fixtures/SC832/2-good.txt +1067 -0
  58. metadata +16 -4
@@ -11,15 +11,9 @@ module Stupidedi
11
11
  N1 = s::SegmentDef.build(:N1, "Name",
12
12
  "To identify a party by type of organization, name, and code",
13
13
  e::E98 .simple_use(r::Mandatory, s::RepeatCount.bounded(1)),
14
- e::E93 .simple_use(r::Relational, s::RepeatCount.bounded(1)))
15
- # e::E66 .simple_use(r::Relational, s::RepeatCount.bounded(1)),
16
- # e::E67 .simple_use(r::Relational, s::RepeatCount.bounded(1)),
17
- # e::E706 .simple_use(r::Optional, s::RepeatCount.bounded(1)),
18
- # e::E98 .simple_use(r::Optional, s::RepeatCount.bounded(1)),
19
-
20
- # SyntaxNotes::P.build(3, 4),
21
- # SyntaxNotes::R.build(2, 3))
22
-
14
+ e::E93 .simple_use(r::Relational, s::RepeatCount.bounded(1)),
15
+ e::E66 .simple_use(r::Relational, s::RepeatCount.bounded(1)),
16
+ e::E67 .simple_use(r::Relational, s::RepeatCount.bounded(1)))
23
17
  end
24
18
  end
25
19
  end
@@ -0,0 +1,21 @@
1
+ module Stupidedi
2
+ module Versions
3
+ module FunctionalGroups
4
+ module ThirtyTen
5
+ module SegmentDefs
6
+
7
+ s = Schema
8
+ e = ElementDefs
9
+ r = ElementReqs
10
+
11
+ # Definition might be outdated, working from ANSI X12 2001 specification
12
+ SDP = s::SegmentDef.build(:SDP, "Ship/Delivery Pattern",
13
+ "To identify specific ship/delivery requirements",
14
+ e::E678.simple_use(r::Mandatory, s::RepeatCount.bounded(1)),
15
+ e::E679.simple_use(r::Mandatory, s::RepeatCount.bounded(1)))
16
+
17
+ end
18
+ end
19
+ end
20
+ end
21
+ end
@@ -0,0 +1,22 @@
1
+ module Stupidedi
2
+ module Versions
3
+ module FunctionalGroups
4
+ module ThirtyTen
5
+ module SegmentDefs
6
+
7
+ s = Schema
8
+ e = ElementDefs
9
+ r = ElementReqs
10
+
11
+ SHP = s::SegmentDef.build(:SHP, "Shipped/ReceivedInformationhip/Delivery Pattern",
12
+ "",
13
+ e::E673 .simple_use(r::Optional, s::RepeatCount.bounded(1)),
14
+ e::E380 .simple_use(r::Relational, s::RepeatCount.bounded(1)),
15
+ e::E374 .simple_use(r::Relational, s::RepeatCount.bounded(1)),
16
+ e::E373 .simple_use(r::Relational, s::RepeatCount.bounded(1)))
17
+
18
+ end
19
+ end
20
+ end
21
+ end
22
+ end
@@ -10,6 +10,9 @@ module Stupidedi
10
10
 
11
11
  TD5 = s::SegmentDef.build(:TD5, "Carrier Details (Routing Sequence/Transit Time)",
12
12
  "To specify the carrier and sequence of routing and provide transit time information",
13
+ e::E352 .simple_use(r::Optional, s::RepeatCount.bounded(1)),
14
+ e::E352 .simple_use(r::Optional, s::RepeatCount.bounded(1)),
15
+ e::E352 .simple_use(r::Optional, s::RepeatCount.bounded(1)),
13
16
  e::E91 .simple_use(r::Relational, s::RepeatCount.bounded(1)),
14
17
  e::E387 .simple_use(r::Relational, s::RepeatCount.bounded(1)))
15
18
  end
@@ -0,0 +1,20 @@
1
+ module Stupidedi
2
+ module Versions
3
+ module FunctionalGroups
4
+ module ThirtyTen
5
+ module SegmentDefs
6
+
7
+ s = Schema
8
+ e = ElementDefs
9
+ r = ElementReqs
10
+
11
+ # Definition might be outdated, working from ANSI X12 2001 specification
12
+ UIT = s::SegmentDef.build(:UIT, "Unit Detail",
13
+ "To specify item unit data",
14
+ e::E355.simple_use(r::Mandatory, s::RepeatCount.bounded(1)))
15
+
16
+ end
17
+ end
18
+ end
19
+ end
20
+ end
@@ -15,16 +15,15 @@ module Stupidedi
15
15
  e::E739 .simple_use(r::Relational, s::RepeatCount.bounded(1)),
16
16
  e::E355 .simple_use(r::Mandatory, s::RepeatCount.bounded(1)),
17
17
  e::E740 .simple_use(r::Relational, s::RepeatCount.bounded(1)),
18
- e::E741 .simple_use(r::Relational, s::RepeatCount.bounded(1)),
19
-
20
- SyntaxNotes::R.build( 3, 5, 6, 8),
21
- SyntaxNotes::E.build( 4, 12),
22
- SyntaxNotes::L.build( 5, 4, 12),
23
- SyntaxNotes::L.build( 6, 4, 12),
24
- SyntaxNotes::L.build( 7, 3, 5, 6),
25
- SyntaxNotes::E.build( 8, 3),
26
- SyntaxNotes::P.build(11, 12))
18
+ e::E741 .simple_use(r::Relational, s::RepeatCount.bounded(1)))
27
19
 
20
+ # SyntaxNotes::R.build( 3, 5, 6, 8),
21
+ # SyntaxNotes::E.build( 4, 12),
22
+ # SyntaxNotes::L.build( 5, 4, 12),
23
+ # SyntaxNotes::L.build( 6, 4, 12),
24
+ # SyntaxNotes::L.build( 7, 3, 5, 6),
25
+ # SyntaxNotes::E.build( 8, 3),
26
+ # SyntaxNotes::P.build(11, 12))
28
27
 
29
28
  end
30
29
  end
@@ -11,6 +11,8 @@ module Stupidedi
11
11
  PRR = s::SegmentDef.build(:PRR, "Problem Report",
12
12
  "To describe a product condition when presented for service or a recall notice or a service bulletin",
13
13
  e::E350 .simple_use(r::Optional, s::RepeatCount.bounded(1)),
14
+ e::E248 .simple_use(r::Optional, s::RepeatCount.bounded(1)),
15
+ e::E248 .simple_use(r::Optional, s::RepeatCount.bounded(1)),
14
16
  e::E1229.simple_use(r::Relational, s::RepeatCount.bounded(1)),
15
17
  e::E352 .simple_use(r::Relational, s::RepeatCount.bounded(1)))
16
18
 
@@ -13,8 +13,10 @@ module Stupidedi
13
13
  e::E248 .simple_use(r::Mandatory, s::RepeatCount.bounded(1)),
14
14
  e::E559 .simple_use(r::Mandatory, s::RepeatCount.bounded(1)),
15
15
  e::E560 .simple_use(r::Mandatory, s::RepeatCount.bounded(1)),
16
+ e::E248 .simple_use(r::Optional, s::RepeatCount.bounded(1)),
16
17
  e::E359 .simple_use(r::Optional, s::RepeatCount.bounded(1)),
17
18
  e::E360 .simple_use(r::Optional, s::RepeatCount.bounded(1)),
19
+ e::E248 .simple_use(r::Optional, s::RepeatCount.bounded(1)),
18
20
  e::E380 .simple_use(r::Optional, s::RepeatCount.bounded(1)))
19
21
 
20
22
  end
@@ -15,16 +15,15 @@ module Stupidedi
15
15
  e::E739 .simple_use(r::Relational, s::RepeatCount.bounded(1)),
16
16
  e::E355 .simple_use(r::Mandatory, s::RepeatCount.bounded(1)),
17
17
  e::E740 .simple_use(r::Relational, s::RepeatCount.bounded(1)),
18
- e::E741 .simple_use(r::Relational, s::RepeatCount.bounded(1)),
19
-
20
- SyntaxNotes::R.build( 3, 5, 6, 8),
21
- SyntaxNotes::E.build( 4, 12),
22
- SyntaxNotes::L.build( 5, 4, 12),
23
- SyntaxNotes::L.build( 6, 4, 12),
24
- SyntaxNotes::L.build( 7, 3, 5, 6),
25
- SyntaxNotes::E.build( 8, 3),
26
- SyntaxNotes::P.build(11, 12))
18
+ e::E741 .simple_use(r::Relational, s::RepeatCount.bounded(1)))
27
19
 
20
+ # SyntaxNotes::R.build( 3, 5, 6, 8),
21
+ # SyntaxNotes::E.build( 4, 12),
22
+ # SyntaxNotes::L.build( 5, 4, 12),
23
+ # SyntaxNotes::L.build( 6, 4, 12),
24
+ # SyntaxNotes::L.build( 7, 3, 5, 6),
25
+ # SyntaxNotes::E.build( 8, 3),
26
+ # SyntaxNotes::P.build(11, 12))
28
27
 
29
28
  end
30
29
  end
@@ -338,7 +338,8 @@ module Stupidedi
338
338
  "ST" => "Ship To",
339
339
  "SU" => "Supplier/Manufacturer",
340
340
  "TT" => "Transfer To",
341
- "WH" => "Warehouse"))
341
+ "WH" => "Warehouse",
342
+ "OB" => "Ordered By"))
342
343
 
343
344
  E100 = t::ID.new(:E100 , "Currency Code" , 3, 3,
344
345
  s::CodeList.external("5"))
@@ -4030,11 +4031,13 @@ module Stupidedi
4030
4031
  s::CodeList.build(
4031
4032
  "AD" => "American Dental Association Codes",
4032
4033
  "BP" => "Buyer's Part Number",
4034
+ "BL" => "Brand/Label",
4033
4035
  "CB" => "Buyer's Part Number",
4034
4036
  "ER" => "Jurisdiction Specific Procedure and Supply Codes",
4035
4037
  "HC" => "Health Care Financing Administration Common Procedural Coding System (HCPCS) Codes",
4036
4038
  "ID" => "International Classification of Diseases Clinical Modification (ICD-9-CM) - Procedure",
4037
4039
  "IV" => "Home Infusion EDI Coalition (HIEC) Product/Service Code",
4040
+ "MG" => "Manufacturer's Part Number",
4038
4041
  "N1" => "National Drug Code in 4-4-2 Format",
4039
4042
  "N2" => "National Drug Code in 5-3-2 Format",
4040
4043
  "N3" => "National Drug Code in 5-4-1 Format",
@@ -4047,15 +4050,12 @@ module Stupidedi
4047
4050
  "VN" => "Vendor's (Seller's) Item Number",
4048
4051
  "VC" => "Vendor's (Seller's) Catalog Number",
4049
4052
  "VP" => "Vendor's (Seller's) Part Number",
4050
- "UK" => "UPC/EAN Shipping Container Code",
4051
- "BP" => "Buyer's Part Number",
4052
4053
  "ON" => "Customer Order Number",
4053
- "CB" => "Buyer's Part Number",
4054
4054
  "JS" => "Job Sequence Number",
4055
- "UP" => "UPC Consumer Packaging Code",
4056
4055
  "VV" => "Motor Vehicle ID Number",
4057
4056
  "ZZ" => "Mutually Defined"))
4058
4057
 
4058
+ E236 = t::ID.new(:E236 , "Price Identifier Code" , 3, 3)
4059
4059
  E254 = t::ID.new(:E254 , "Packing Group Code" , 1, 3)
4060
4060
  E267 = t::Nn.new(:E267 , "Net Explosive Quantity" , 1, 10, 0)
4061
4061
  E277 = t::ID.new(:E277 , "UN/NA Identification Code" , 6, 6)
@@ -4074,6 +4074,7 @@ module Stupidedi
4074
4074
  "09" => "Hold or Reserve Stock",
4075
4075
  "ZZ" => "Mutually Defined"))
4076
4076
 
4077
+ E289 = t::Nn.new(:E289 , "Multiple Price Quantity" , 1, 2, 0)
4077
4078
  E301 = t::ID.new(:E301 , "Car Type Code" , 1, 4)
4078
4079
  E305 = t::ID.new(:E305 , "Transaction Handling Code" , 1, 2,
4079
4080
  s::CodeList.build(
@@ -4118,7 +4119,6 @@ module Stupidedi
4118
4119
  "T" => "Status Query",
4119
4120
  "U" => "Reject",
4120
4121
  "V" => "Respond",
4121
- "A" => "reply or answer",
4122
4122
  "W" => "Reverse",
4123
4123
  "X" => "Recommend",
4124
4124
  "Y" => "Not Recommend",
@@ -4675,6 +4675,7 @@ module Stupidedi
4675
4675
  s::CodeList.build(
4676
4676
  "001" => "Cancel after",
4677
4677
  "002" => "Delivery Requested",
4678
+ "007" => "Effective",
4678
4679
  "010" => "Requested ship",
4679
4680
  "011" => "Shipped",
4680
4681
  "017" => "Estimated Delivery",
@@ -5071,6 +5072,7 @@ module Stupidedi
5071
5072
  "1" => "Current Transaction Trace Numbers",
5072
5073
  "2" => "Referenced Transaction Trace Numbers"))
5073
5074
 
5075
+ E499 = t::AN.new(:E499 , "Condition Value" , 1, 10)
5074
5076
  E501 = t::ID.new(:E501 , "Customes Document Handling Code" , 2, 2)
5075
5077
  E506 = t::ID.new(:E506 , "DFI Identification Number Qualifier" , 2, 2,
5076
5078
  s::CodeList.build(
@@ -5788,7 +5790,6 @@ module Stupidedi
5788
5790
  "SB" => "Second Notice of Balance Due",
5789
5791
  "SC" => "Deprescription",
5790
5792
  "SD" => "Supply Process Deficiency",
5791
- "SE" => "Special Bilateral",
5792
5793
  "SF" => "Single Family Program",
5793
5794
  "SG" => "Sample Goods Invoice",
5794
5795
  "SH" => "Shipment Status Notification",
@@ -5907,6 +5908,7 @@ module Stupidedi
5907
5908
  "ZZ" => "Mutually Defined"))
5908
5909
 
5909
5910
  E646 = t:: R.new(:E646 , "Quantity Shipped to Date" , 1, 9)
5911
+ E648 = t::ID.new(:E648 , "Price Multiplier Qualifier" , 3, 3)
5910
5912
  E649 = t:: R.new(:E649 , "Multiplier" , 1, 10)
5911
5913
  E665 = t::ID.new(:E665 , "Residue Indicator Code" , 1, 1,
5912
5914
  s::CodeList.build(
@@ -5971,6 +5973,11 @@ module Stupidedi
5971
5973
  "D" => "Discrete",
5972
5974
  "F" => "Flexible Interval (from Date X through Date Y)"))
5973
5975
 
5976
+ E683 = t::ID.new(:E683 , "Catalog Purpose Code" , 1, 1,
5977
+ s::CodeList.build(
5978
+ "PC" => "Price Catalog"))
5979
+
5980
+ E687 = t::ID.new(:E687 , "Class of Trade Code" , 2, 2)
5974
5981
  E706 = t::ID.new(:E706 , "Entity Relationship Code" , 2, 2,
5975
5982
  s::CodeList.build(
5976
5983
  "01" => "Parent",
@@ -28,6 +28,9 @@ module Stupidedi
28
28
  autoload :B10,
29
29
  "stupidedi/versions/functional_groups/004010/segment_defs/B10"
30
30
 
31
+ autoload :BCT,
32
+ "stupidedi/versions/functional_groups/004010/segment_defs/BCT"
33
+
31
34
  autoload :BEG,
32
35
  "stupidedi/versions/functional_groups/004010/segment_defs/BEG"
33
36
 
@@ -44,6 +47,9 @@ module Stupidedi
44
47
  autoload :CLP,
45
48
  "stupidedi/versions/functional_groups/004010/segment_defs/CLP"
46
49
 
50
+ autoload :CTP,
51
+ "stupidedi/versions/functional_groups/004010/segment_defs/CTP"
52
+
47
53
  autoload :CTT,
48
54
  "stupidedi/versions/functional_groups/004010/segment_defs/CTT"
49
55
 
@@ -290,6 +296,9 @@ module Stupidedi
290
296
  autoload :AK5,
291
297
  "stupidedi/versions/functional_groups/004010/segment_defs/AK5"
292
298
 
299
+ autoload :SCH,
300
+ "stupidedi/versions/functional_groups/004010/segment_defs/SCH"
301
+
293
302
  end
294
303
  end
295
304
  end
@@ -0,0 +1,19 @@
1
+ module Stupidedi
2
+ module Versions
3
+ module FunctionalGroups
4
+ module FortyTen
5
+ module SegmentDefs
6
+
7
+ s = Schema
8
+ e = ElementDefs
9
+ r = ElementReqs
10
+
11
+ BCT = s::SegmentDef.build(:BCT, "Beginning Segment for Price/Sales Catalog",
12
+ "To indicate the beginning of the Price/Sales Catalog Transaction Set and specify catalog purpose and number information",
13
+ e::E683 .simple_use(r::Mandatory, s::RepeatCount.bounded(1)))
14
+
15
+ end
16
+ end
17
+ end
18
+ end
19
+ end
@@ -19,6 +19,7 @@ module Stupidedi
19
19
  e::E373 .simple_use(r::Optional, s::RepeatCount.bounded(1)),
20
20
  e::E373 .simple_use(r::Mandatory, s::RepeatCount.bounded(1)),
21
21
  e::E367 .simple_use(r::Optional, s::RepeatCount.bounded(1)),
22
+ e::E367 .simple_use(r::Optional, s::RepeatCount.bounded(1)),
22
23
  e::E324 .simple_use(r::Optional, s::RepeatCount.bounded(1)))
23
24
 
24
25
  # SyntaxNotes::P.build(6, 7),
@@ -0,0 +1,36 @@
1
+ module Stupidedi
2
+ module Versions
3
+ module FunctionalGroups
4
+ module FortyTen
5
+ module SegmentDefs
6
+
7
+ s = Schema
8
+ e = ElementDefs
9
+ r = ElementReqs
10
+
11
+ CTP = s::SegmentDef.build(:CTP, "Pricing Information",
12
+ "To specify pricing information",
13
+ e::E687 .simple_use(r::Optional, s::RepeatCount.bounded(1)),
14
+ e::E236 .simple_use(r::Relational, s::RepeatCount.bounded(1)),
15
+ e::E212 .simple_use(r::Relational, s::RepeatCount.bounded(1)),
16
+ e::E380 .simple_use(r::Relational, s::RepeatCount.bounded(1)),
17
+ e::C001 .simple_use(r::Relational, s::RepeatCount.bounded(1)),
18
+ e::E648 .simple_use(r::Optional, s::RepeatCount.bounded(1)),
19
+
20
+ e::E649 .simple_use(r::Relational, s::RepeatCount.bounded(1)),
21
+ e::E782 .simple_use(r::Optional, s::RepeatCount.bounded(1)),
22
+ e::E639 .simple_use(r::Optional, s::RepeatCount.bounded(1)),
23
+ e::E499 .simple_use(r::Optional, s::RepeatCount.bounded(1)),
24
+ e::E289 .simple_use(r::Optional, s::RepeatCount.bounded(1)),
25
+
26
+ SyntaxNotes::P.build( 4, 5),
27
+ SyntaxNotes::C.build( 6, 7),
28
+ SyntaxNotes::C.build( 9, 2),
29
+ SyntaxNotes::C.build(10, 2),
30
+ SyntaxNotes::C.build(11, 3))
31
+
32
+ end
33
+ end
34
+ end
35
+ end
36
+ end
@@ -0,0 +1,28 @@
1
+ module Stupidedi
2
+ module Versions
3
+ module FunctionalGroups
4
+ module FortyTen
5
+ module SegmentDefs
6
+
7
+ s = Schema
8
+ e = ElementDefs
9
+ r = ElementReqs
10
+
11
+ SCH = s::SegmentDef.build(:SCH, "Line Item Schedule",
12
+ "To specify the dat for scheduling aspecifc line-item",
13
+ e::E380 .simple_use(r::Mandatory, s::RepeatCount.bounded(1)),
14
+ e::E355 .simple_use(r::Mandatory, s::RepeatCount.bounded(1)),
15
+ e::E98 .simple_use(r::Optional, s::RepeatCount.bounded(1)),
16
+ e::E93 .simple_use(r::Relational, s::RepeatCount.bounded(1)),
17
+ e::E374 .simple_use(r::Optional, s::RepeatCount.bounded(1)),
18
+ e::E373 .simple_use(r::Optional, s::RepeatCount.bounded(1)),
19
+ e::E374 .simple_use(r::Relational, s::RepeatCount.bounded(1)),
20
+ e::E373 .simple_use(r::Relational, s::RepeatCount.bounded(1)),
21
+
22
+ SyntaxNotes::C.build(3, 4))
23
+
24
+ end
25
+ end
26
+ end
27
+ end
28
+ end
@@ -30,7 +30,7 @@ module Stupidedi
30
30
  "BS" => "Blue Shield Provider Number",
31
31
  "C" => "Insured's Changed Unique Identification Number",
32
32
  "CF" => s::CodeList.external("91"),
33
- "FI" => "Fediral Taxpayer's Identification Number",
33
+ "FI" => "Federal Taxpayer's Identification Number",
34
34
  "HN" => "Health Insurance Claim (HIC) Number",
35
35
  "II" => "Standard Unique Health Identifier for each Individual in the United States",
36
36
  "LD" => s::CodeList.external("457"),
@@ -53,9 +53,9 @@ module Stupidedi
53
53
 
54
54
  class SeparatorElementVal < Values::SimpleElementVal
55
55
 
56
- extend Forwardable
56
+ extend Forwardable
57
57
  def_delegators :@value, :to_s, :length
58
-
58
+
59
59
  def initialize(value, usage, position)
60
60
  @value = value
61
61
  super(usage, position)
@@ -11,9 +11,9 @@ module Stupidedi
11
11
  ISA = s::SegmentDef.build(:ISA, "Interchange Control Header",
12
12
  "To start and identify an interchange of zero or more functional groups and interchange-related control segments",
13
13
  e::I01.simple_use(r::Mandatory, s::RepeatCount.bounded(1)),
14
- e::I02.simple_use(r::Mandatory, s::RepeatCount.bounded(1)),
14
+ e::I02.simple_use(r::Optional, s::RepeatCount.bounded(1)),
15
15
  e::I03.simple_use(r::Mandatory, s::RepeatCount.bounded(1)),
16
- e::I04.simple_use(r::Mandatory, s::RepeatCount.bounded(1)),
16
+ e::I04.simple_use(r::Optional, s::RepeatCount.bounded(1)),
17
17
  e::I05.simple_use(r::Mandatory, s::RepeatCount.bounded(1)),
18
18
  e::I06.simple_use(r::Mandatory, s::RepeatCount.bounded(1)),
19
19
  e::I05.simple_use(r::Mandatory, s::RepeatCount.bounded(1)),
@@ -11,9 +11,9 @@ module Stupidedi
11
11
  ISA = s::SegmentDef.build(:ISA, "Interchange Control Header",
12
12
  "To start and identify an interchange of zero or more functional groups and interchange-related control segments",
13
13
  e::I01.simple_use(r::Mandatory, s::RepeatCount.bounded(1)),
14
- e::I02.simple_use(r::Mandatory, s::RepeatCount.bounded(1)),
14
+ e::I02.simple_use(r::Optional, s::RepeatCount.bounded(1)),
15
15
  e::I03.simple_use(r::Mandatory, s::RepeatCount.bounded(1)),
16
- e::I04.simple_use(r::Mandatory, s::RepeatCount.bounded(1)),
16
+ e::I04.simple_use(r::Optional, s::RepeatCount.bounded(1)),
17
17
  e::I05.simple_use(r::Mandatory, s::RepeatCount.bounded(1)),
18
18
  e::I06.simple_use(r::Mandatory, s::RepeatCount.bounded(1)),
19
19
  e::I05.simple_use(r::Mandatory, s::RepeatCount.bounded(1)),