stupidedi 1.4.1 → 1.4.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (31) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +10 -4
  3. data/Rakefile +4 -4
  4. data/lib/stupidedi/config.rb +1 -0
  5. data/lib/stupidedi/transaction_sets/004010/implementations/IN810.rb +162 -0
  6. data/lib/stupidedi/transaction_sets/004010/implementations.rb +1 -0
  7. data/lib/stupidedi/transaction_sets/004010/standards/IN810.rb +38 -0
  8. data/lib/stupidedi/transaction_sets/004010/standards/PR855.rb +2 -1
  9. data/lib/stupidedi/transaction_sets/004010/standards.rb +1 -0
  10. data/lib/stupidedi/transaction_sets/005010/implementations/X220A1-BE834.rb +1 -1
  11. data/lib/stupidedi/transaction_sets/005010/implementations/X222A1-HC837.rb +26 -26
  12. data/lib/stupidedi/transaction_sets/005010/implementations/X223A2-HC837.rb +5 -5
  13. data/lib/stupidedi/transaction_sets/005010/implementations/X223A3-HC837.rb +5 -5
  14. data/lib/stupidedi/transaction_sets/005010/implementations/X279-HB271.rb +1 -1
  15. data/lib/stupidedi/transaction_sets/005010/implementations/X279-HS270.rb +1 -1
  16. data/lib/stupidedi/transaction_sets/005010/implementations/X279A1-HB271.rb +1 -1
  17. data/lib/stupidedi/transaction_sets/005010/implementations/X279A1-HS270.rb +1 -1
  18. data/lib/stupidedi/version.rb +1 -1
  19. data/lib/stupidedi/versions/003010/element_defs.rb +5 -2
  20. data/lib/stupidedi/versions/004010/element_defs.rb +72 -2
  21. data/lib/stupidedi/versions/004010/segment_defs/ACK.rb +43 -0
  22. data/lib/stupidedi/versions/004010/segment_defs/BIG.rb +25 -0
  23. data/lib/stupidedi/versions/004010/segment_defs/IT1.rb +39 -0
  24. data/lib/stupidedi/versions/004010/segment_defs/ITD.rb +29 -0
  25. data/lib/stupidedi/versions/004010/segment_defs/SAC.rb +31 -0
  26. data/lib/stupidedi/versions/004010/segment_defs/TDS.rb +18 -0
  27. data/lib/stupidedi/versions/004010/segment_defs/TXI.rb +24 -0
  28. data/lib/stupidedi/versions/004010/segment_defs.rb +7 -0
  29. data/lib/stupidedi/versions/005010/element_defs.rb +6 -8
  30. data/lib/stupidedi/versions/common/element_types/r.rb +3 -1
  31. metadata +11 -3
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 1ebce60d52d11cc5d750be833dedaa9c143becc4bebfe15a4d4a91c7934ad08b
4
- data.tar.gz: aea17d716ff7be4f11ddb26e1142edfb5a42d7be8ff33bf9faa0ad8a55cf6411
3
+ metadata.gz: 65b0a1eb140015425ec5a93242e9deb9c8bff5022ab029f4f9e274bd08225237
4
+ data.tar.gz: 9f8dc7f0d565c3a718c75d14625f0c217f496200b85ae5e42998da10e487ccda
5
5
  SHA512:
6
- metadata.gz: 0fb54dce8ae28fd125456dbd0d82aea49c8623b99d364b689853bd4567ff8284815241b5d223f695f9fe79e20fd72d6db4850f7be6b560c820c81dccd1588c8a
7
- data.tar.gz: c9da5e9c52cbbd801b02a5d8aebf466c83fccfe8902ab6e91c538fc48ecb0f0868899d21b0f67216274227e9b1b16a9e3dae03bd11a53b4b63f31f4664dfed3c
6
+ metadata.gz: 5272dfffe350f51c79b91ada058a03afb831d58975450e8d762e487c4082ff362cd422b44133abb4014d2ce43da6e2bf8470323cb3d2ae7783a4b498b5f67178
7
+ data.tar.gz: 8e3b24ec2a7f2ff320a3db67d84637e34787c42e38d772a933314d6ca15a0a961ccd0efcd2969e7e77a139f2b4b75f9e1bc31ccc1c7eca22041176c02c36f529
data/README.md CHANGED
@@ -76,10 +76,16 @@ to understand, assuming a reasonable familiarity with EDI.
76
76
  ### Efficient parsing and traversing
77
77
 
78
78
  The parser is designed using immutable data structures, making it thread-safe
79
- for runtimes that can utilize multiple cores. While in certain cases,
80
- immutability places higher demand on garbage collection, this has been
81
- mitigated with careful optimization. Input can be streamed incrementally, so
82
- very large files aren't read into memory all at once.
79
+ for runtimes that can utilize multiple cores. In some cases, immutability places
80
+ higher demand on garbage collection, this has been somewhat mitigated with careful
81
+ optimization.
82
+
83
+ **Note:** Further optimizations are planned for late 2021. Until then, modestly large
84
+ files can consume excessive memory to the point all CPU time is spent in garbage
85
+ collection. In more than ten years since this library was put into production, this
86
+ seems to rarely happen in practice (as X12 files are most often very small), but until
87
+ these improvements are merged, it can be difficult to work around. See [#65](https://github.com/irobayna/stupidedi/issues/65) for
88
+ more discussion. The current work in progress is in the [`gh-65.3`](https://github.com/irobayna/stupidedi/tree/gh-65.3) branch.
83
89
 
84
90
  ![Benchmark](https://raw.github.com/irobayna/stupidedi/master/notes/benchmark/throughput.png)
85
91
 
data/Rakefile CHANGED
@@ -7,12 +7,12 @@ task :default => :spec
7
7
  require "rspec/core/rake_task"
8
8
  RSpec::Core::RakeTask.new do |t|
9
9
  t.verbose = false
10
- t.rspec_opts = %w(-w -rspec_helper)
10
+ t.rspec_opts = "-w -rspec_helper"
11
11
 
12
- if ENV.include?("CI") or ENV.include?("TRAVIS")
13
- t.rspec_opts += %w(--format progress)
12
+ if ENV.include?("CI")
13
+ t.rspec_opts += " --format progress"
14
14
  else
15
- t.rspec_opts += %w(--format documentation)
15
+ t.rspec_opts += " --format documentation"
16
16
  end
17
17
  end
18
18
 
@@ -154,6 +154,7 @@ module Stupidedi
154
154
  x.register("003050", "PO", "850") { Stupidedi::TransactionSets::ThirtyFifty::Standards::PO850 }
155
155
  x.register("004010", "PO", "850") { Stupidedi::TransactionSets::FortyTen::Standards::PO850 }
156
156
  x.register("004010", "PR", "855") { Stupidedi::TransactionSets::FortyTen::Standards::PR855 }
157
+ x.register("004010", "IN", "810") { Stupidedi::TransactionSets::FortyTen::Standards::IN810 }
157
158
  x.register("004010", "OW", "940") { Stupidedi::TransactionSets::FortyTen::Standards::OW940 }
158
159
  x.register("004010", "AR", "943") { Stupidedi::TransactionSets::FortyTen::Standards::AR943 }
159
160
  x.register("004010", "RE", "944") { Stupidedi::TransactionSets::FortyTen::Standards::RE944 }
@@ -0,0 +1,162 @@
1
+ module Stupidedi
2
+ module TransactionSets
3
+ module FortyTen
4
+ module Implementations
5
+ b = Builder
6
+ d = Schema
7
+ r = SegmentReqs
8
+ e = ElementReqs
9
+ s = SegmentDefs
10
+ IN810 = b.build("IN", "810", "Invoice",
11
+ d::TableDef.header("Heading",
12
+ b::Segment(10, s:: ST, "Transaction Set Header", r::Required, d::RepeatCount.bounded(1),
13
+ b::Element(e::Required, "Transaction Set Identifier Code", b::Values("810")),
14
+ b::Element(e::Required, "Transaction Set Control Number")),
15
+ b::Segment(20, s::BIG, "Beginning Segment for Invoice", r::Required, d::RepeatCount.bounded(1),
16
+ b::Element(e::Required, "Date"),
17
+ b::Element(e::Required, "Invoice Number"),
18
+ b::Element(e::Situational, "Date"),
19
+ b::Element(e::Situational, "Purchase Order Number"),
20
+ b::Element(e::Situational, "Release Number"),
21
+ b::Element(e::Situational, "Change Order Sequence Number"),
22
+ b::Element(e::Situational, "Transaction Type Code"),
23
+ b::Element(e::Situational, "Transaction Set Purpose Code"),
24
+ b::Element(e::Situational, "Action Code"),
25
+ b::Element(e::Situational, "Invoice Number")),
26
+ d::LoopDef.build("N1", d::RepeatCount.bounded(200),
27
+ b::Segment(110, s:: N1, "Name", r::Situational, d::RepeatCount.bounded(1),
28
+ b::Element(e::Required, "Entity Identifier Code"),
29
+ b::Element(e::Situational, "Name"),
30
+ b::Element(e::Situational, "Identification Code Qualifier"),
31
+ b::Element(e::Situational, "Identification Code"),
32
+ b::Element(e::Situational, "Code describing entity relationship"),
33
+ b::Element(e::Situational, "Code identifying an organizational entity, a physical location, property or an individual")),
34
+ b::Segment(120, s:: N2, "Address Information", r::Situational, d::RepeatCount.bounded(2),
35
+ b::Element(e::Situational, "Name"),
36
+ b::Element(e::Situational, "Name")),
37
+ b::Segment(130, s:: N3, "Address Information", r::Situational, d::RepeatCount.bounded(2),
38
+ b::Element(e::Situational, "Address Information"),
39
+ b::Element(e::Situational, "Address Information")),
40
+ b::Segment(140, s:: N4, "Geographic Location", r::Situational, d::RepeatCount.unbounded,
41
+ b::Element(e::Situational, "City Name"),
42
+ b::Element(e::Situational, "State or Province Code"),
43
+ b::Element(e::Situational, "Postal Code"),
44
+ b::Element(e::Situational, "Country Code"),
45
+ b::Element(e::Situational, "Location Qualifier"),
46
+ b::Element(e::Situational, "Location Identifier"))), #end LoopDef N1, Segment 140
47
+ b::Segment(200, s:: ITD, "Terms of Sale or Deferred Terms of Sale", r::Situational, d::RepeatCount.unbounded,
48
+ b::Element(e::Situational, "Terms Type Code"),
49
+ b::Element(e::Situational, "Terms Basis Date Code"),
50
+ b::Element(e::Situational, "Terms Discount Percent"),
51
+ b::Element(e::Situational, "Terms Discount Due Date"),
52
+ b::Element(e::Situational, "Terms Discount Days Due"),
53
+ b::Element(e::Situational, "Terms Net Due Date"),
54
+ b::Element(e::Situational, "Terms Net Days"),
55
+ b::Element(e::Situational, "Terms Discount Amount"),
56
+ b::Element(e::Situational, "Terms Deferred Due Date"),
57
+ b::Element(e::Situational, "Deferred Amount Due"),
58
+ b::Element(e::Situational, "Percent of Invoice Payable"),
59
+ b::Element(e::Situational, "Description"),
60
+ b::Element(e::Situational, "Day of Month"),
61
+ b::Element(e::Situational, "Payment Method Code"),
62
+ b::Element(e::Situational, "Percent"))), #end TableDef HEADING, Segment 200
63
+ d::TableDef.header("Detail",
64
+ d::LoopDef.build("IT1", d::RepeatCount.bounded(100000),
65
+ b::Segment(10, s::IT1, "Baseline Item Data (Invoice)", r::Required, d::RepeatCount.bounded(1),
66
+ b::Element(e::Situational, "Assigned Identification"),
67
+ b::Element(e::Situational, "Quantity"),
68
+ b::Element(e::Situational, "UOM"),
69
+ b::Element(e::Situational, "Unit Price"),
70
+ b::Element(e::Situational, "Basis of Unit Price Code"),
71
+ b::Element(e::Situational, "Product/Service ID Qualifier"),
72
+ b::Element(e::Situational, "Product/Service ID"),
73
+ b::Element(e::Situational, "Product/Service ID Qualifier"),
74
+ b::Element(e::Situational, "Product/Service ID"),
75
+ b::Element(e::Situational, "Product/Service ID Qualifier"),
76
+ b::Element(e::Situational, "Product/Service ID"),
77
+ b::Element(e::Situational, "Product/Service ID Qualifier"),
78
+ b::Element(e::Situational, "Product/Service ID"),
79
+ b::Element(e::Situational, "Product/Service ID Qualifier"),
80
+ b::Element(e::Situational, "Product/Service ID"),
81
+ b::Element(e::Situational, "Product/Service ID Qualifier"),
82
+ b::Element(e::Situational, "Product/Service ID"),
83
+ b::Element(e::Situational, "Product/Service ID Qualifier"),
84
+ b::Element(e::Situational, "Product/Service ID"),
85
+ b::Element(e::Situational, "Product/Service ID Qualifier"),
86
+ b::Element(e::Situational, "Product/Service ID"),
87
+ b::Element(e::Situational, "Product/Service ID Qualifier"),
88
+ b::Element(e::Situational, "Product/Service ID"),
89
+ b::Element(e::Situational, "Product/Service ID Qualifier"),
90
+ b::Element(e::Situational, "Product/Service ID")), #end Segment 10
91
+ b::Segment(20, s::TXI, "Tax Information", r::Situational, d::RepeatCount.bounded(10),
92
+ b::Element(e::Situational, "Tax Type Code"),
93
+ b::Element(e::Situational, "Monetary Amount"),
94
+ b::Element(e::Situational, "Percent"),
95
+ b::Element(e::Situational, "Tax Jurisdiction Code Qualifier"),
96
+ b::Element(e::Situational, "Tax Jurisdiction Code"),
97
+ b::Element(e::Situational, "Tax Exempt Code"),
98
+ b::Element(e::Situational, "Relationship Code"),
99
+ b::Element(e::Situational, "Dollar Basis For Percent"),
100
+ b::Element(e::Situational, "Tax Identification Number"),
101
+ b::Element(e::Situational, "Assigned Identification")), #end Segment 20
102
+ d::LoopDef.build("PID", d::RepeatCount.bounded(1000),
103
+ b::Segment(30, s::PID, "Product/Item Description", r::Situational, d::RepeatCount.bounded(1),
104
+ b::Element(e::Situational, "Item Description Type"),
105
+ b::Element(e::Situational, "Process Characteristic Code"),
106
+ b::Element(e::Situational, "Agency Qualifier Code"),
107
+ b::Element(e::Situational, "Product Description Code"),
108
+ b::Element(e::Situational, "Description"),
109
+ b::Element(e::Situational, "Surface/Layer/Position Code"),
110
+ b::Element(e::Situational, "Source Subqualifier"),
111
+ b::Element(e::Situational, "Yes/No Condition or Response Code"),
112
+ b::Element(e::Situational, "Language Code"))))), #end TableDef Detail, LoopDef IT1, LoopDef PID, Segment 30
113
+ d::TableDef.header("Summary",
114
+ b::Segment(10, s::TDS, "Total Monetary Value Summary", r::Required, d::RepeatCount.bounded(1),
115
+ b::Element(e::Situational, "Amount"),
116
+ b::Element(e::Situational, "Amount"),
117
+ b::Element(e::Situational, "Amount"),
118
+ b::Element(e::Situational, "Amount")), #end Segment 10
119
+ b::Segment(20, s::TXI, "Tax Information", r::Situational, d::RepeatCount.bounded(10),
120
+ b::Element(e::Situational, "Tax Type Code"),
121
+ b::Element(e::Situational, "Monetary Amount"),
122
+ b::Element(e::Situational, "Percent"),
123
+ b::Element(e::Situational, "Tax Jurisdiction Code Qualifier"),
124
+ b::Element(e::Situational, "Tax Jurisdiction Code"),
125
+ b::Element(e::Situational, "Tax Exempt Code"),
126
+ b::Element(e::Situational, "Relationship Code"),
127
+ b::Element(e::Situational, "Dollar Basis For Percent"),
128
+ b::Element(e::Situational, "Tax Identification Number"),
129
+ b::Element(e::Situational, "Assigned Identification")), #end Segment 20
130
+ d::LoopDef.build("SAC", d::RepeatCount.bounded(25),
131
+ b::Segment(30, s::SAC, "Service, Promotion, Allowance, or Charge Information", r::Situational, d::RepeatCount.bounded(1),
132
+ b::Element(e::Situational, "Allowance or Charge Indicator"),
133
+ b::Element(e::Situational, "Service, Promotion, Allowance, or Charge Code"),
134
+ b::Element(e::Situational, "Agency Qualifier Code"),
135
+ b::Element(e::Situational, "Agency Service, Promotion, Allowance, or Charge Code"),
136
+ b::Element(e::Situational, "Amount"),
137
+ b::Element(e::Situational, "Allowance/Charge Percent Qualifier"),
138
+ b::Element(e::Situational, "Percent"),
139
+ b::Element(e::Situational, "Rate"),
140
+ b::Element(e::Situational, "Unit or Basis for Measurement Code"),
141
+ b::Element(e::Situational, "Quantity"),
142
+ b::Element(e::Situational, "Quantity"),
143
+ b::Element(e::Situational, "Allowance or Charge Method of Handling Code"),
144
+ b::Element(e::Situational, "Reference Identification"),
145
+ b::Element(e::Situational, "Option Number"),
146
+ b::Element(e::Situational, "Description"),
147
+ b::Element(e::Situational, "Language Code"))), #end LoopDef SAC, Segment 30
148
+ b::Segment(40, s::CTT, "Transaction Totals", r::Situational, d::RepeatCount.bounded(10),
149
+ b::Element(e::Situational, "Number of Line Items"),
150
+ b::Element(e::Situational, "Hash Total"),
151
+ b::Element(e::Situational, "Weight"),
152
+ b::Element(e::Situational, "Unit or Basis for Measurement Code"),
153
+ b::Element(e::Situational, "Volume"),
154
+ b::Element(e::Situational, "Unit or Basis for Measurement Code"),
155
+ b::Element(e::Situational, "Description")), #end Segment 40
156
+ b::Segment(50, s:: SE, "Transaction Set Trailer", r::Required, d::RepeatCount.bounded(1),
157
+ b::Element(e::Required, "Number of Included Segments"),
158
+ b::Element(e::Required, "Transaction Set Control Number")))) #end build IN, TableDef Summary, Segment 50
159
+ end
160
+ end
161
+ end
162
+ end
@@ -28,6 +28,7 @@ module Stupidedi
28
28
  #utoload :SQ866, "stupidedi/transaction_sets/004010/implementations/SQ866"
29
29
  autoload :SS862, "stupidedi/transaction_sets/004010/implementations/SS862"
30
30
  #utoload :SW945, "stupidedi/transaction_sets/004010/implementations/SW945"
31
+ autoload :IN810, "stupidedi/transaction_sets/004010/implementations/IN810"
31
32
 
32
33
  module X091A1
33
34
  autoload :HP835, "stupidedi/transaction_sets/004010/implementations/X091A1-HP835"
@@ -0,0 +1,38 @@
1
+ module Stupidedi
2
+ module TransactionSets
3
+ module FortyTen
4
+ module Standards
5
+ b = Builder
6
+ d = Schema
7
+ r = SegmentReqs
8
+ s = SegmentDefs
9
+
10
+ IN810 = b.build("IN", "810", "Invoice",
11
+ d::TableDef.header("1 - Header",
12
+ s::ST.use( 10, r::Mandatory, d::RepeatCount.bounded(1)),
13
+ s::BIG.use( 20, r::Mandatory, d::RepeatCount.bounded(1)),
14
+ s::REF.use( 30, r::Optional, d::RepeatCount.bounded(1)),
15
+ d::LoopDef.build("N1", d::RepeatCount.bounded(200),
16
+ s:: N1.use( 110, r::Optional, d::RepeatCount.bounded(1)),
17
+ s:: N2.use( 120, r::Optional, d::RepeatCount.bounded(2)),
18
+ s:: N3.use( 130, r::Optional, d::RepeatCount.bounded(2)),
19
+ s:: N4.use( 140, r::Optional, d::RepeatCount.unbounded)), #end LoopDef build N1
20
+ s::ITD.use( 200, r::Optional, d::RepeatCount.unbounded)), #end TableDef Header
21
+ d::TableDef.detail("2 - Detail",
22
+ d::LoopDef.build("IT1", d::RepeatCount.bounded(100000),
23
+ s::IT1.use( 10, r::Mandatory, d::RepeatCount.bounded(1)),
24
+ s::TXI.use( 20, r::Optional, d::RepeatCount.bounded(10)),
25
+ d::LoopDef.build("PID", d::RepeatCount.bounded(1000),
26
+ s::PID.use( 30, r::Optional, d::RepeatCount.bounded(1))), #end LoopDef build PID
27
+ s::REF.use( 40, r::Optional, d::RepeatCount.unbounded))), #end TableDef Detail, LoopDef build IT1
28
+ d::TableDef.summary("3 - Summary",
29
+ s::TDS.use( 10, r::Mandatory, d::RepeatCount.bounded(1)),
30
+ s::TXI.use( 20, r::Optional, d::RepeatCount.bounded(10)),
31
+ d::LoopDef.build("SAC", d::RepeatCount.bounded(25),
32
+ s:: SAC.use( 30, r::Optional, d::RepeatCount.bounded(1))), #end LoopDef build SAC
33
+ s:: CTT.use( 40, r::Optional, d::RepeatCount.bounded(10)),
34
+ s:: SE.use( 50, r::Mandatory, d::RepeatCount.bounded(1)))) #end build IN, TableDef Summary
35
+ end
36
+ end
37
+ end
38
+ end
@@ -21,7 +21,8 @@ module Stupidedi
21
21
 
22
22
  d::TableDef.detail("2 - Detail",
23
23
  d::LoopDef.build("PO1", d::RepeatCount.bounded(10000),
24
- s::PO1.use( 10, r::Mandatory, d::RepeatCount.bounded(1)))),
24
+ s::PO1.use( 10, r::Mandatory, d::RepeatCount.bounded(1)),
25
+ s::ACK.use( 10, r::Optional, d::RepeatCount.bounded(1)))),
25
26
 
26
27
  d::TableDef.summary("3 - Summary",
27
28
  d::LoopDef.build("CTT", d::RepeatCount.bounded(1),
@@ -13,6 +13,7 @@ module Stupidedi
13
13
  autoload :OW940, "stupidedi/transaction_sets/004010/standards/OW940"
14
14
  autoload :PO850, "stupidedi/transaction_sets/004010/standards/PO850"
15
15
  autoload :PR855, "stupidedi/transaction_sets/004010/standards/PR855"
16
+ autoload :IN810, "stupidedi/transaction_sets/004010/standards/IN810"
16
17
  autoload :PS830, "stupidedi/transaction_sets/004010/standards/PS830"
17
18
  autoload :QM214, "stupidedi/transaction_sets/004010/standards/QM214"
18
19
  autoload :RE944, "stupidedi/transaction_sets/004010/standards/RE944"
@@ -452,7 +452,7 @@ module Stupidedi
452
452
  b::Segment(2600, s::HD, "Health Coverage", r::Situational, d::RepeatCount.bounded(1),
453
453
  b::Element(e::Required, "Maintenance Type Code", b::Values("001", "002", "021", "024", "025", "026", "030", "032")),
454
454
  b::Element(e::NotUsed, "Maintenance Reason Code"),
455
- b::Element(e::Required, "Insurance Line Code", b::Values("AG", "AH", "AJ", "AK", "DCP", "DEN", "EPO", "FAC", "HE", "HLT", "HMO", "LTC", "LTD", "MM", "MOD", "PDG", "POS", "PPO", "PRA", "STD", "UR", "VIS")),
455
+ b::Element(e::Required, "Insurance Line Code", b::Values("AC", "ADD", "AG", "AH", "AJ", "AK", "DCP", "DEN", "EPO", "FAC", "HE", "HLT", "HMO", "LTC", "LTD", "MM", "MOD", "PDG", "POS", "PPO", "PRA", "STD", "UR", "VIS")),
456
456
  b::Element(e::Situational, "Plan Coverage Description"),
457
457
  b::Element(e::Situational, "Coverage Level Code", b::Values("CHD", "DEP", "E1D", "E2D", "E3D", "E5D", "E6D", "E7D", "E8D", "E9D", "ECH", "EMP", "ESP", "FAM", "IND", "SPC", "SPO", "TWO")),
458
458
  b::Element(e::NotUsed, "Count"),
@@ -281,7 +281,7 @@ module Stupidedi
281
281
  b::Element(e::NotUsed, "Condition Indicator")),
282
282
  b::Segment(2310, s::HI, "Health Care Diagnosis Code", r::Required, d::RepeatCount.bounded(1),
283
283
  b::Element(e::Required, "HEALTH CARE CODE INFORMATION",
284
- b::Element(e::Required, "Code List Qualifier", b::Values("ABK", "BK")),
284
+ b::Element(e::Required, "Code List Qualifier Code", b::Values("ABK", "BK")),
285
285
  b::Element(e::Required, "Diagnosis Code"),
286
286
  b::Element(e::NotUsed, "Date Time Period Format Qualifier"),
287
287
  b::Element(e::NotUsed, "Date Time Period"),
@@ -291,7 +291,7 @@ module Stupidedi
291
291
  b::Element(e::NotUsed, "Industry Code"),
292
292
  b::Element(e::NotUsed, "Yes/No Condition or Response Code")),
293
293
  b::Element(e::Situational, "HEALTH CARE CODE INFORMATION",
294
- b::Element(e::Required, "Code List Qualifier", b::Values("ABF", "BF")),
294
+ b::Element(e::Required, "Code List Qualifier Code", b::Values("ABF", "BF")),
295
295
  b::Element(e::Required, "Diagnosis Code"),
296
296
  b::Element(e::NotUsed, "Date Time Period Format Qualifier"),
297
297
  b::Element(e::NotUsed, "Date Time Period"),
@@ -301,7 +301,7 @@ module Stupidedi
301
301
  b::Element(e::NotUsed, "Industry Code"),
302
302
  b::Element(e::NotUsed, "Yes/No Condition or Response Code")),
303
303
  b::Element(e::Situational, "HEALTH CARE CODE INFORMATION",
304
- b::Element(e::Required, "Code List Qualifier", b::Values("ABF", "BF")),
304
+ b::Element(e::Required, "Code List Qualifier Code", b::Values("ABF", "BF")),
305
305
  b::Element(e::Required, "Diagnosis Code"),
306
306
  b::Element(e::NotUsed, "Date Time Period Format Qualifier"),
307
307
  b::Element(e::NotUsed, "Date Time Period"),
@@ -311,7 +311,7 @@ module Stupidedi
311
311
  b::Element(e::NotUsed, "Industry Code"),
312
312
  b::Element(e::NotUsed, "Yes/No Condition or Response Code")),
313
313
  b::Element(e::Situational, "HEALTH CARE CODE INFORMATION",
314
- b::Element(e::Required, "Code List Qualifier", b::Values("ABF", "BF")),
314
+ b::Element(e::Required, "Code List Qualifier Code", b::Values("ABF", "BF")),
315
315
  b::Element(e::Required, "Diagnosis Code"),
316
316
  b::Element(e::NotUsed, "Date Time Period Format Qualifier"),
317
317
  b::Element(e::NotUsed, "Date Time Period"),
@@ -321,7 +321,7 @@ module Stupidedi
321
321
  b::Element(e::NotUsed, "Industry Code"),
322
322
  b::Element(e::NotUsed, "Yes/No Condition or Response Code")),
323
323
  b::Element(e::Situational, "HEALTH CARE CODE INFORMATION",
324
- b::Element(e::Required, "Code List Qualifier", b::Values("ABF", "BF")),
324
+ b::Element(e::Required, "Code List Qualifier Code", b::Values("ABF", "BF")),
325
325
  b::Element(e::Required, "Diagnosis Code"),
326
326
  b::Element(e::NotUsed, "Date Time Period Format Qualifier"),
327
327
  b::Element(e::NotUsed, "Date Time Period"),
@@ -331,7 +331,7 @@ module Stupidedi
331
331
  b::Element(e::NotUsed, "Industry Code"),
332
332
  b::Element(e::NotUsed, "Yes/No Condition or Response Code")),
333
333
  b::Element(e::Situational, "HEALTH CARE CODE INFORMATION",
334
- b::Element(e::Required, "Code List Qualifier", b::Values("ABF", "BF")),
334
+ b::Element(e::Required, "Code List Qualifier Code", b::Values("ABF", "BF")),
335
335
  b::Element(e::Required, "Diagnosis Code"),
336
336
  b::Element(e::NotUsed, "Date Time Period Format Qualifier"),
337
337
  b::Element(e::NotUsed, "Date Time Period"),
@@ -341,7 +341,7 @@ module Stupidedi
341
341
  b::Element(e::NotUsed, "Industry Code"),
342
342
  b::Element(e::NotUsed, "Yes/No Condition or Response Code")),
343
343
  b::Element(e::Situational, "HEALTH CARE CODE INFORMATION",
344
- b::Element(e::Required, "Code List Qualifier", b::Values("ABF", "BF")),
344
+ b::Element(e::Required, "Code List Qualifier Code", b::Values("ABF", "BF")),
345
345
  b::Element(e::Required, "Diagnosis Code"),
346
346
  b::Element(e::NotUsed, "Date Time Period Format Qualifier"),
347
347
  b::Element(e::NotUsed, "Date Time Period"),
@@ -351,7 +351,7 @@ module Stupidedi
351
351
  b::Element(e::NotUsed, "Industry Code"),
352
352
  b::Element(e::NotUsed, "Yes/No Condition or Response Code")),
353
353
  b::Element(e::Situational, "HEALTH CARE CODE INFORMATION",
354
- b::Element(e::Required, "Code List Qualifier", b::Values("ABF", "BF")),
354
+ b::Element(e::Required, "Code List Qualifier Code", b::Values("ABF", "BF")),
355
355
  b::Element(e::Required, "Diagnosis Code"),
356
356
  b::Element(e::NotUsed, "Date Time Period Format Qualifier"),
357
357
  b::Element(e::NotUsed, "Date Time Period"),
@@ -361,7 +361,7 @@ module Stupidedi
361
361
  b::Element(e::NotUsed, "Industry Code"),
362
362
  b::Element(e::NotUsed, "Yes/No Condition or Response Code")),
363
363
  b::Element(e::Situational, "HEALTH CARE CODE INFORMATION",
364
- b::Element(e::Required, "Code List Qualifier", b::Values("ABF", "BF")),
364
+ b::Element(e::Required, "Code List Qualifier Code", b::Values("ABF", "BF")),
365
365
  b::Element(e::Required, "Diagnosis Code"),
366
366
  b::Element(e::NotUsed, "Date Time Period Format Qualifier"),
367
367
  b::Element(e::NotUsed, "Date Time Period"),
@@ -371,7 +371,7 @@ module Stupidedi
371
371
  b::Element(e::NotUsed, "Industry Code"),
372
372
  b::Element(e::NotUsed, "Yes/No Condition or Response Code")),
373
373
  b::Element(e::Situational, "HEALTH CARE CODE INFORMATION",
374
- b::Element(e::Required, "Code List Qualifier", b::Values("ABF", "BF")),
374
+ b::Element(e::Required, "Code List Qualifier Code", b::Values("ABF", "BF")),
375
375
  b::Element(e::Required, "Diagnosis Code"),
376
376
  b::Element(e::NotUsed, "Date Time Period Format Qualifier"),
377
377
  b::Element(e::NotUsed, "Date Time Period"),
@@ -381,7 +381,7 @@ module Stupidedi
381
381
  b::Element(e::NotUsed, "Industry Code"),
382
382
  b::Element(e::NotUsed, "Yes/No Condition or Response Code")),
383
383
  b::Element(e::Situational, "HEALTH CARE CODE INFORMATION",
384
- b::Element(e::Required, "Code List Qualifier", b::Values("ABF", "BF")),
384
+ b::Element(e::Required, "Code List Qualifier Code", b::Values("ABF", "BF")),
385
385
  b::Element(e::Required, "Diagnosis Code"),
386
386
  b::Element(e::NotUsed, "Date Time Period Format Qualifier"),
387
387
  b::Element(e::NotUsed, "Date Time Period"),
@@ -391,7 +391,7 @@ module Stupidedi
391
391
  b::Element(e::NotUsed, "Industry Code"),
392
392
  b::Element(e::NotUsed, "Yes/No Condition or Response Code")),
393
393
  b::Element(e::Situational, "HEALTH CARE CODE INFORMATION",
394
- b::Element(e::Required, "Code List Qualifier", b::Values("ABF", "BF")),
394
+ b::Element(e::Required, "Code List Qualifier Code", b::Values("ABF", "BF")),
395
395
  b::Element(e::Required, "Diagnosis Code"),
396
396
  b::Element(e::NotUsed, "Date Time Period Format Qualifier"),
397
397
  b::Element(e::NotUsed, "Date Time Period"),
@@ -402,7 +402,7 @@ module Stupidedi
402
402
  b::Element(e::NotUsed, "Yes/No Condition or Response Code"))),
403
403
  b::Segment(2310, s::HI, "Anesthesia Related Procedure", r::Situational, d::RepeatCount.bounded(1),
404
404
  b::Element(e::Required, "HEALTH CARE CODE INFORMATION",
405
- b::Element(e::Required, "Code List Qualifier", b::Values("BP")),
405
+ b::Element(e::Required, "Code List Qualifier Code", b::Values("BP")),
406
406
  b::Element(e::Required, "Diagnosis Code"),
407
407
  b::Element(e::NotUsed, "Date Time Period Format Qualifier"),
408
408
  b::Element(e::NotUsed, "Date Time Period"),
@@ -412,7 +412,7 @@ module Stupidedi
412
412
  b::Element(e::NotUsed, "Industry Code"),
413
413
  b::Element(e::NotUsed, "Yes/No Condition or Response Code")),
414
414
  b::Element(e::Situational, "HEALTH CARE CODE INFORMATION",
415
- b::Element(e::Required, "Code List Qualifier", b::Values("BO")),
415
+ b::Element(e::Required, "Code List Qualifier Code", b::Values("BO")),
416
416
  b::Element(e::Required, "Diagnosis Code"),
417
417
  b::Element(e::NotUsed, "Date Time Period Format Qualifier"),
418
418
  b::Element(e::NotUsed, "Date Time Period"),
@@ -433,7 +433,7 @@ module Stupidedi
433
433
  b::Element(e::NotUsed, "HEALTH CARE CODE INFORMATION")),
434
434
  b::Segment(2310, s::HI, "Condition Information", r::Situational, d::RepeatCount.bounded(1),
435
435
  b::Element(e::Required, "HEALTH CARE CODE INFORMATION",
436
- b::Element(e::Required, "Code List Qualifier", b::Values("BG")),
436
+ b::Element(e::Required, "Code List Qualifier Code", b::Values("BG")),
437
437
  b::Element(e::Required, "Diagnosis Code"),
438
438
  b::Element(e::NotUsed, "Date Time Period Format Qualifier"),
439
439
  b::Element(e::NotUsed, "Date Time Period"),
@@ -443,7 +443,7 @@ module Stupidedi
443
443
  b::Element(e::NotUsed, "Industry Code"),
444
444
  b::Element(e::NotUsed, "Yes/No Condition or Response Code")),
445
445
  b::Element(e::Situational, "HEALTH CARE CODE INFORMATION",
446
- b::Element(e::Required, "Code List Qualifier", b::Values("BG")),
446
+ b::Element(e::Required, "Code List Qualifier Code", b::Values("BG")),
447
447
  b::Element(e::Required, "Diagnosis Code"),
448
448
  b::Element(e::NotUsed, "Date Time Period Format Qualifier"),
449
449
  b::Element(e::NotUsed, "Date Time Period"),
@@ -453,7 +453,7 @@ module Stupidedi
453
453
  b::Element(e::NotUsed, "Industry Code"),
454
454
  b::Element(e::NotUsed, "Yes/No Condition or Response Code")),
455
455
  b::Element(e::Situational, "HEALTH CARE CODE INFORMATION",
456
- b::Element(e::Required, "Code List Qualifier", b::Values("BG")),
456
+ b::Element(e::Required, "Code List Qualifier Code", b::Values("BG")),
457
457
  b::Element(e::Required, "Diagnosis Code"),
458
458
  b::Element(e::NotUsed, "Date Time Period Format Qualifier"),
459
459
  b::Element(e::NotUsed, "Date Time Period"),
@@ -463,7 +463,7 @@ module Stupidedi
463
463
  b::Element(e::NotUsed, "Industry Code"),
464
464
  b::Element(e::NotUsed, "Yes/No Condition or Response Code")),
465
465
  b::Element(e::Situational, "HEALTH CARE CODE INFORMATION",
466
- b::Element(e::Required, "Code List Qualifier", b::Values("BG")),
466
+ b::Element(e::Required, "Code List Qualifier Code", b::Values("BG")),
467
467
  b::Element(e::Required, "Diagnosis Code"),
468
468
  b::Element(e::NotUsed, "Date Time Period Format Qualifier"),
469
469
  b::Element(e::NotUsed, "Date Time Period"),
@@ -473,7 +473,7 @@ module Stupidedi
473
473
  b::Element(e::NotUsed, "Industry Code"),
474
474
  b::Element(e::NotUsed, "Yes/No Condition or Response Code")),
475
475
  b::Element(e::Situational, "HEALTH CARE CODE INFORMATION",
476
- b::Element(e::Required, "Code List Qualifier", b::Values("BG")),
476
+ b::Element(e::Required, "Code List Qualifier Code", b::Values("BG")),
477
477
  b::Element(e::Required, "Diagnosis Code"),
478
478
  b::Element(e::NotUsed, "Date Time Period Format Qualifier"),
479
479
  b::Element(e::NotUsed, "Date Time Period"),
@@ -483,7 +483,7 @@ module Stupidedi
483
483
  b::Element(e::NotUsed, "Industry Code"),
484
484
  b::Element(e::NotUsed, "Yes/No Condition or Response Code")),
485
485
  b::Element(e::Situational, "HEALTH CARE CODE INFORMATION",
486
- b::Element(e::Required, "Code List Qualifier", b::Values("BG")),
486
+ b::Element(e::Required, "Code List Qualifier Code", b::Values("BG")),
487
487
  b::Element(e::Required, "Diagnosis Code"),
488
488
  b::Element(e::NotUsed, "Date Time Period Format Qualifier"),
489
489
  b::Element(e::NotUsed, "Date Time Period"),
@@ -493,7 +493,7 @@ module Stupidedi
493
493
  b::Element(e::NotUsed, "Industry Code"),
494
494
  b::Element(e::NotUsed, "Yes/No Condition or Response Code")),
495
495
  b::Element(e::Situational, "HEALTH CARE CODE INFORMATION",
496
- b::Element(e::Required, "Code List Qualifier", b::Values("BG")),
496
+ b::Element(e::Required, "Code List Qualifier Code", b::Values("BG")),
497
497
  b::Element(e::Required, "Diagnosis Code"),
498
498
  b::Element(e::NotUsed, "Date Time Period Format Qualifier"),
499
499
  b::Element(e::NotUsed, "Date Time Period"),
@@ -503,7 +503,7 @@ module Stupidedi
503
503
  b::Element(e::NotUsed, "Industry Code"),
504
504
  b::Element(e::NotUsed, "Yes/No Condition or Response Code")),
505
505
  b::Element(e::Situational, "HEALTH CARE CODE INFORMATION",
506
- b::Element(e::Required, "Code List Qualifier", b::Values("BG")),
506
+ b::Element(e::Required, "Code List Qualifier Code", b::Values("BG")),
507
507
  b::Element(e::Required, "Diagnosis Code"),
508
508
  b::Element(e::NotUsed, "Date Time Period Format Qualifier"),
509
509
  b::Element(e::NotUsed, "Date Time Period"),
@@ -513,7 +513,7 @@ module Stupidedi
513
513
  b::Element(e::NotUsed, "Industry Code"),
514
514
  b::Element(e::NotUsed, "Yes/No Condition or Response Code")),
515
515
  b::Element(e::Situational, "HEALTH CARE CODE INFORMATION",
516
- b::Element(e::Required, "Code List Qualifier", b::Values("BG")),
516
+ b::Element(e::Required, "Code List Qualifier Code", b::Values("BG")),
517
517
  b::Element(e::Required, "Diagnosis Code"),
518
518
  b::Element(e::NotUsed, "Date Time Period Format Qualifier"),
519
519
  b::Element(e::NotUsed, "Date Time Period"),
@@ -523,7 +523,7 @@ module Stupidedi
523
523
  b::Element(e::NotUsed, "Industry Code"),
524
524
  b::Element(e::NotUsed, "Yes/No Condition or Response Code")),
525
525
  b::Element(e::Situational, "HEALTH CARE CODE INFORMATION",
526
- b::Element(e::Required, "Code List Qualifier", b::Values("BG")),
526
+ b::Element(e::Required, "Code List Qualifier Code", b::Values("BG")),
527
527
  b::Element(e::Required, "Diagnosis Code"),
528
528
  b::Element(e::NotUsed, "Date Time Period Format Qualifier"),
529
529
  b::Element(e::NotUsed, "Date Time Period"),
@@ -533,7 +533,7 @@ module Stupidedi
533
533
  b::Element(e::NotUsed, "Industry Code"),
534
534
  b::Element(e::NotUsed, "Yes/No Condition or Response Code")),
535
535
  b::Element(e::Situational, "HEALTH CARE CODE INFORMATION",
536
- b::Element(e::Required, "Code List Qualifier", b::Values("BG")),
536
+ b::Element(e::Required, "Code List Qualifier Code", b::Values("BG")),
537
537
  b::Element(e::Required, "Diagnosis Code"),
538
538
  b::Element(e::NotUsed, "Date Time Period Format Qualifier"),
539
539
  b::Element(e::NotUsed, "Date Time Period"),
@@ -543,7 +543,7 @@ module Stupidedi
543
543
  b::Element(e::NotUsed, "Industry Code"),
544
544
  b::Element(e::NotUsed, "Yes/No Condition or Response Code")),
545
545
  b::Element(e::Situational, "HEALTH CARE CODE INFORMATION",
546
- b::Element(e::Required, "Code List Qualifier", b::Values("BG")),
546
+ b::Element(e::Required, "Code List Qualifier Code", b::Values("BG")),
547
547
  b::Element(e::Required, "Diagnosis Code"),
548
548
  b::Element(e::NotUsed, "Date Time Period Format Qualifier"),
549
549
  b::Element(e::NotUsed, "Date Time Period"),
@@ -158,7 +158,7 @@ module Stupidedi
158
158
  b::Element(e::NotUsed, "Condition Indicator")),
159
159
  b::Segment(2310, s::HI, "Principal Diagnosis", r::Required, d::RepeatCount.bounded(1),
160
160
  b::Element(e::Required, "HEALTH CARE CODE INFORMATION",
161
- b::Element(e::Required, "Code List Qualifier", b::Values("ABK", "BK")),
161
+ b::Element(e::Required, "Code List Qualifier Code", b::Values("ABK", "BK")),
162
162
  b::Element(e::Required, "Principal Diagnosis Code"),
163
163
  b::Element(e::NotUsed, "Date Time Period Format Qualifier"),
164
164
  b::Element(e::NotUsed, "Date Time Period"),
@@ -180,7 +180,7 @@ module Stupidedi
180
180
  b::Element(e::NotUsed, "HEALTH CARE CODE INFORMATION")),
181
181
  b::Segment(2310, s::HI, "Admitting Diagnosis", r::Situational, d::RepeatCount.bounded(1),
182
182
  b::Element(e::Required, "HEALTH CARE CODE INFORMATION",
183
- b::Element(e::Required, "Code List Qualifier", b::Values("ABJ", "BJ")),
183
+ b::Element(e::Required, "Code List Qualifier Code", b::Values("ABJ", "BJ")),
184
184
  b::Element(e::Required, "Admitting Diagnosis Code"),
185
185
  b::Element(e::NotUsed, "Date Time Period Format Qualifier"),
186
186
  b::Element(e::NotUsed, "Date Time Period"),
@@ -202,7 +202,7 @@ module Stupidedi
202
202
  b::Element(e::NotUsed, "HEALTH CARE CODE INFORMATION")),
203
203
  b::Segment(2310, s::HI, "Patient's Reason For Visit", r::Situational, d::RepeatCount.bounded(1),
204
204
  b::Element(e::Required, "HEALTH CARE CODE INFORMATION",
205
- b::Element(e::Required, "Code List Qualifier", b::Values("APR", "PR")),
205
+ b::Element(e::Required, "Code List Qualifier Code", b::Values("APR", "PR")),
206
206
  b::Element(e::Required, "Patient Reason For Visit"),
207
207
  b::Element(e::NotUsed, "Date Time Period Format Qualifier"),
208
208
  b::Element(e::NotUsed, "Date Time Period"),
@@ -212,7 +212,7 @@ module Stupidedi
212
212
  b::Element(e::NotUsed, "Industry Code"),
213
213
  b::Element(e::NotUsed, "Yes/No Condition or Response Code")),
214
214
  b::Element(e::Situational, "HEALTH CARE CODE INFORMATION",
215
- b::Element(e::Required, "Code List Qualifier", b::Values("APR", "PR")),
215
+ b::Element(e::Required, "Code List Qualifier Code", b::Values("APR", "PR")),
216
216
  b::Element(e::Required, "Patient Reason For Visit"),
217
217
  b::Element(e::NotUsed, "Date Time Period Format Qualifier"),
218
218
  b::Element(e::NotUsed, "Date Time Period"),
@@ -222,7 +222,7 @@ module Stupidedi
222
222
  b::Element(e::NotUsed, "Industry Code"),
223
223
  b::Element(e::NotUsed, "Yes/No Condition or Response Code")),
224
224
  b::Element(e::Situational, "HEALTH CARE CODE INFORMATION",
225
- b::Element(e::Required, "Code List Qualifier", b::Values("APR", "PR")),
225
+ b::Element(e::Required, "Code List Qualifier Code", b::Values("APR", "PR")),
226
226
  b::Element(e::Required, "Patient Reason For Visit"),
227
227
  b::Element(e::NotUsed, "Date Time Period Format Qualifier"),
228
228
  b::Element(e::NotUsed, "Date Time Period"),
@@ -196,7 +196,7 @@ module Stupidedi
196
196
  b::Segment(2310, s::HI, "Principal Diagnosis",
197
197
  r::Required, d::RepeatCount.bounded(1),
198
198
  b::Element(e::Required, "HEALTH CARE CODE INFORMATION",
199
- b::Element(e::Required, "Code List Qualifier", b::Values("ABK", "BK")),
199
+ b::Element(e::Required, "Code List Qualifier Code", b::Values("ABK", "BK")),
200
200
  b::Element(e::Required, "Principal Diagnosis Code"),
201
201
  b::Element(e::NotUsed, "Date Time Period Format Qualifier"),
202
202
  b::Element(e::NotUsed, "Date Time Period"),
@@ -219,7 +219,7 @@ module Stupidedi
219
219
  b::Segment(2310, s::HI, "Admitting Diagnosis",
220
220
  r::Situational, d::RepeatCount.bounded(1),
221
221
  b::Element(e::Required, "HEALTH CARE CODE INFORMATION",
222
- b::Element(e::Required, "Code List Qualifier", b::Values("ABJ", "BJ")),
222
+ b::Element(e::Required, "Code List Qualifier Code", b::Values("ABJ", "BJ")),
223
223
  b::Element(e::Required, "Admitting Diagnosis Code"),
224
224
  b::Element(e::NotUsed, "Date Time Period Format Qualifier"),
225
225
  b::Element(e::NotUsed, "Date Time Period"),
@@ -242,7 +242,7 @@ module Stupidedi
242
242
  b::Segment(2310, s::HI, "Patient's Reason For Visit",
243
243
  r::Situational, d::RepeatCount.bounded(1),
244
244
  b::Element(e::Required, "HEALTH CARE CODE INFORMATION",
245
- b::Element(e::Required, "Code List Qualifier", b::Values("APR", "PR")),
245
+ b::Element(e::Required, "Code List Qualifier Code", b::Values("APR", "PR")),
246
246
  b::Element(e::Required, "Patient Reason For Visit"),
247
247
  b::Element(e::NotUsed, "Date Time Period Format Qualifier"),
248
248
  b::Element(e::NotUsed, "Date Time Period"),
@@ -252,7 +252,7 @@ module Stupidedi
252
252
  b::Element(e::NotUsed, "Industry Code"),
253
253
  b::Element(e::NotUsed, "Yes/No Condition or Response Code")),
254
254
  b::Element(e::Situational, "HEALTH CARE CODE INFORMATION",
255
- b::Element(e::Required, "Code List Qualifier", b::Values("APR", "PR")),
255
+ b::Element(e::Required, "Code List Qualifier Code", b::Values("APR", "PR")),
256
256
  b::Element(e::Required, "Patient Reason For Visit"),
257
257
  b::Element(e::NotUsed, "Date Time Period Format Qualifier"),
258
258
  b::Element(e::NotUsed, "Date Time Period"),
@@ -262,7 +262,7 @@ module Stupidedi
262
262
  b::Element(e::NotUsed, "Industry Code"),
263
263
  b::Element(e::NotUsed, "Yes/No Condition or Response Code")),
264
264
  b::Element(e::Situational, "HEALTH CARE CODE INFORMATION",
265
- b::Element(e::Required, "Code List Qualifier", b::Values("APR", "PR")),
265
+ b::Element(e::Required, "Code List Qualifier Code", b::Values("APR", "PR")),
266
266
  b::Element(e::Required, "Patient Reason For Visit"),
267
267
  b::Element(e::NotUsed, "Date Time Period Format Qualifier"),
268
268
  b::Element(e::NotUsed, "Date Time Period"),
@@ -657,7 +657,7 @@ module Stupidedi
657
657
 
658
658
  d::LoopDef.build("2115D DEPENDENT ELIGIBILITY OR BENEFIT ADDITIONAL INFORMATION", d::RepeatCount.bounded(10),
659
659
  b::Segment(2600, s::III, "Dependent Eligibility or Benefit Additional Information", r::Situational, d::RepeatCount.bounded(1),
660
- b::Element(e::Situational, "Code List Qualifier", b::Values("GR", "NI", "ZZ")),
660
+ b::Element(e::Situational, "Code List Qualifier Code", b::Values("GR", "NI", "ZZ")),
661
661
  b::Element(e::Situational, "Industry Code"),
662
662
  b::Element(e::Situational, "Code Category", b::Values("44")),
663
663
  b::Element(e::Situational, "Injured Body Part Name"),
@@ -500,7 +500,7 @@ module Stupidedi
500
500
  b::Element(e::Situational, "Diagnosis Code Pointer"),
501
501
  b::Element(e::Situational, "Diagnosis Code Pointer"))),
502
502
  b::Segment(1700, s::III, "Dependent Eligibility or Benefit Additional Inquiry Information", r::Situational, d::RepeatCount.bounded(1),
503
- b::Element(e::Required, "Code List Qualifier", b::Values("ZZ")),
503
+ b::Element(e::Required, "Code List Qualifier Code", b::Values("ZZ")),
504
504
  b::Element(e::Required, "Industry Code"),
505
505
  b::Element(e::NotUsed, "Code Category"),
506
506
  b::Element(e::NotUsed, "Free-form Message Text"),
@@ -668,7 +668,7 @@ module Stupidedi
668
668
 
669
669
  d::LoopDef.build("2115D DEPENDENT ELIGIBILITY OR BENEFIT ADDITIONAL INFORMATION", d::RepeatCount.unbounded,
670
670
  b::Segment(2600, s::III, "Dependent Eligibility or Benefit Additional Information", r::Situational, d::RepeatCount.bounded(1),
671
- b::Element(e::Situational, "Code List Qualifier", b::Values("GR", "NI", "ZZ")),
671
+ b::Element(e::Situational, "Code List Qualifier Code", b::Values("GR", "NI", "ZZ")),
672
672
  b::Element(e::Situational, "Industry Code"),
673
673
  b::Element(e::Situational, "Code Category", b::Values("44")),
674
674
  b::Element(e::Situational, "Injured Body Part Name"),
@@ -500,7 +500,7 @@ module Stupidedi
500
500
  b::Element(e::Situational, "Diagnosis Code Pointer"),
501
501
  b::Element(e::Situational, "Diagnosis Code Pointer"))),
502
502
  b::Segment(1700, s::III, "Dependent Eligibility or Benefit Additional Inquiry Information", r::Situational, d::RepeatCount.bounded(1),
503
- b::Element(e::Required, "Code List Qualifier", b::Values("ZZ")),
503
+ b::Element(e::Required, "Code List Qualifier Code", b::Values("ZZ")),
504
504
  b::Element(e::Required, "Industry Code"),
505
505
  b::Element(e::NotUsed, "Code Category"),
506
506
  b::Element(e::NotUsed, "Free-form Message Text"),
@@ -1,4 +1,4 @@
1
1
  # frozen_string_literal: true
2
2
  module Stupidedi
3
- VERSION = "1.4.1"
3
+ VERSION = "1.4.2"
4
4
  end
@@ -2664,7 +2664,9 @@ module Stupidedi
2664
2664
  E301 = t::ID.new(:E301 , "Car Type Code" , 1, 4)
2665
2665
  E305 = t::ID.new(:E305, "Transaction Handling Code" , 1, 1,
2666
2666
  s::CodeList.build(
2667
- "I" => "Remittance Information Only"))
2667
+ "I" => "Remittance Information Only",
2668
+ "C" => "Payment Accompanies Remittance Advice",
2669
+ "X" => "Make Payment and Send Remittance Advice"))
2668
2670
  E306 = t::ID.new(:E306 , "Action Code" , 1, 2,
2669
2671
  s::CodeList.build(
2670
2672
  "0" => "Authorize",
@@ -4704,7 +4706,8 @@ module Stupidedi
4704
4706
  "ZZ" => "Mutually Defined"))
4705
4707
  E591 = t::ID.new(:E591, "Payment Method Code" , 3, 3,
4706
4708
  s::CodeList.build(
4707
- "PBC" => "Pay by Check"))
4709
+ "PBC" => "Pay by Check",
4710
+ "ZZZ" => "Mutually Defined"))
4708
4711
  E595 = t::ID.new(:E595 , "Compartment ID Code" , 1, 1,
4709
4712
  s::CodeList.build(
4710
4713
  "1" => "Brake End",
@@ -30,7 +30,7 @@ module Stupidedi
30
30
  "RC" => "Refrigerated (Reefer) Car",
31
31
  "RT" => "Controlled Temperature Trailer (Reefer)",
32
32
  "SU" => "Supplier/Manufacturer",
33
- "TF" => "Trailer, Try Freight",
33
+ "TF" => "Trailer, Dry Freight",
34
34
  "TL" => "Trailer (not otherwise specified)",
35
35
  "TV" => "Truck, Van"))
36
36
  E46 = t::AN.new(:E46 , "Ex Parte" , 4, 4)
@@ -4045,6 +4045,8 @@ module Stupidedi
4045
4045
  "BL" => "Brand/Label",
4046
4046
  "CB" => "Buyer's Part Number",
4047
4047
  "ER" => "Jurisdiction Specific Procedure and Supply Codes",
4048
+ "EN" => "European Article Number (EAN)",
4049
+ "GC" => "Grade Code",
4048
4050
  "HC" => "Health Care Financing Administration Common Procedural Coding System (HCPCS) Codes",
4049
4051
  "ID" => "International Classification of Diseases Clinical Modification (ICD-9-CM) - Procedure",
4050
4052
  "IV" => "Home Infusion EDI Coalition (HIEC) Product/Service Code",
@@ -4678,6 +4680,7 @@ module Stupidedi
4678
4680
  E310 = t::AN.new(:E310 , "Location Identifier" , 1, 30)
4679
4681
  E319 = t::AN.new(:E319 , "Temperature Control" , 3, 6)
4680
4682
  E324 = t::AN.new(:E324 , "Purchase Order Number" , 1, 22)
4683
+ E326 = t::AN.new(:E326 , "Request Reference Number" , 1, 45)
4681
4684
  E328 = t::AN.new(:E328 , "Release Number" , 1, 30)
4682
4685
  E329 = t::ID.new(:E329 , "Transaction Set Control Number" , 4, 9)
4683
4686
  E330 = t:: R.new(:E330 , "Quantity Ordered" , 1, 15)
@@ -5411,7 +5414,9 @@ module Stupidedi
5411
5414
  s::CodeList.build(
5412
5415
  "PE" => "Price per Each",
5413
5416
  "PP" => "Price per Pound",
5414
- "UM" => "Price per Unit of Measure"))
5417
+ "UM" => "Price per Unit of Measure",
5418
+ "PC" => "Price per Case",
5419
+ "ZZ" => "Mutually Defined"))
5415
5420
  E640 = t::ID.new(:E640 , "Transaction Type Code" , 2, 2,
5416
5421
  s::CodeList.build(
5417
5422
  "01" => "Location Address Message",
@@ -9461,6 +9466,71 @@ module Stupidedi
9461
9466
  s::CodeList.external("559"))
9462
9467
  E1715 = t::ID.new(:E1715, "Country Subdivision Code" , 1, 3,
9463
9468
  s::CodeList.external("5"))
9469
+ E1716 = t::AN.new(:E1716, "Change Order Sequence Number" , 1, 8)
9470
+ E1717 = t::ID.new(:E1717, "Allowance or Charge Indicator" , 1, 1,
9471
+ s::CodeList.build(
9472
+ "A" => "Allowance",
9473
+ "C" => "Charge",
9474
+ "N" => "No Allowance or Charge"))
9475
+ E1718 = t::ID.new(:E1718, "Allowance or Charge Indicator" , 4, 4,
9476
+ s::CodeList.build(
9477
+ "A310" => "Air Express Charge",
9478
+ "A930" => "Carrier Credit Allowance",
9479
+ "B720" => "Cooperative Advertising Allowance",
9480
+ "B820" => "Currency Adjustment",
9481
+ "B860" => "Customs Broker Fee",
9482
+ "B870" => "Customs Charge",
9483
+ "B872" => "Customs Duty",
9484
+ "B994" => "Declared Value for Customs",
9485
+ "C000" => "Defective Allowance",
9486
+ "C040" => "Delivery",
9487
+ "C260" => "Discount - Incentive",
9488
+ "C860" => "Expedited Shipments",
9489
+ "D170" => "Free Goods",
9490
+ "D240" => "Freight",
9491
+ "D360" => "Goods and Services Tax Charge",
9492
+ "D500" => "Handling",
9493
+ "D900" => "Installation",
9494
+ "E170" => "Labeling",
9495
+ "F155" => "Packaging",
9496
+ "F330" => "Pick-up and Delivery",
9497
+ "F920" => "Quantity Surcharge",
9498
+ "G740" => "Service Charge",
9499
+ "G970" => "Small Order Charge",
9500
+ "H090" => "Special Handling",
9501
+ "H151" => "Special Services",
9502
+ "H640" => "Tax - Excist Tax - Destination",
9503
+ "H740" => "Tax - Sate and Use",
9504
+ "H770" => "Tax - Sate Tax",
9505
+ "H750" => "Tax - Sales Tax",
9506
+ "H800" => "Tax - VAT",
9507
+ "I170" => "Trade Discountt",
9508
+ "ZZZZ" => "Mutually Defined"))
9509
+ E1719 = t::AN.new(:E1719, "Agency Service, Promotion, Allowance, or Charge Code", 1, 10)
9510
+ E1720 = t::ID.new(:E1720, "Allowance/Charge Percent Qualifier" , 1, 1)
9511
+ E1721 = t:: R.new(:E1721, "Rate" , 1, 10)
9512
+ E1722 = t::ID.new(:E1722, "Allowance or Charge Method of Handling Code", 2, 2)
9513
+ E1723 = t::AN.new(:E1723, "Option Number" , 1, 20)
9514
+ E1724 = t::ID.new(:E1724, "Tax Type Code" , 2, 2)
9515
+ E1725 = t::ID.new(:E1725, "Tax Jurisdiction Code Qualifier" , 2, 2)
9516
+ E1726 = t::AN.new(:E1726, "Tax Jurisdiction Code" , 1, 10)
9517
+ E1727 = t::ID.new(:E1727, "Tax Exempt Code" , 1, 1)
9518
+ E1728 = t::ID.new(:E1728, "Relationship Code" , 1, 1)
9519
+ E1729 = t:: R.new(:E1729, "Dollar Basis for Percent" , 1, 9)
9520
+ E1730 = t::AN.new(:E1730, "Tax Identification Number" , 1, 20)
9521
+ E1731 = t::AN.new(:E1731, "Assigned Identification" , 1, 20)
9522
+ E1732 = t:: R.new(:E1732, "Quantity Invoiced" , 1, 10)
9523
+ E1733 = t::ID.new(:E1733, "Terms Type Code" , 2, 2)
9524
+ E1734 = t::ID.new(:E1734, "Terms Basis Date Code" , 1, 2)
9525
+ E1735 = t::DT.new(:E1735, "Terms Discount Due Date" , 8, 8)
9526
+ E1736 = t::Nn.new(:E1736, "Terms Discount Days Due" , 1, 3, 0)
9527
+ E1737 = t::DT.new(:E1737, "Terms Net Due Date" , 8, 8)
9528
+ E1738 = t::Nn.new(:E1738, "Terms Net Days" , 1, 3, 0)
9529
+ E1739 = t::Nn.new(:E1739, "Terms Discount Amount" , 1, 10, 2)
9530
+ E1740 = t::DT.new(:E1740, "Terms Deferred Due Date" , 8, 8)
9531
+ E1741 = t::Nn.new(:E1741, "Deferred Amount Due" , 1, 10, 2)
9532
+ E1742 = t::Nn.new(:E1742, "Day of Month" , 1, 2, 0)
9533
+ E1743 = t::ID.new(:E1743, "Payment Method Code" , 1, 2)
9464
9534
  C001 = Schema::CompositeElementDef.build(:C001,
9465
9535
  "Composite Unit of Measure",
9466
9536
  "To identify a composite unit of measure",
@@ -0,0 +1,43 @@
1
+ # frozen_string_literal: true
2
+ module Stupidedi
3
+ module Versions
4
+ module FortyTen
5
+ module SegmentDefs
6
+ s = Schema
7
+ e = ElementDefs
8
+ r = ElementReqs
9
+
10
+ ACK = s::SegmentDef.build(:ACK, "Line Item Acknowledgment", "To start acknowledgement of a line item",
11
+ e::E668 .simple_use(r::Optional, s::RepeatCount.bounded(1)),
12
+ e::E380 .simple_use(r::Optional, s::RepeatCount.bounded(1)),
13
+ e::E355 .simple_use(r::Optional, s::RepeatCount.bounded(1)),
14
+ e::E374 .simple_use(r::Optional, s::RepeatCount.bounded(1)),
15
+ e::E373 .simple_use(r::Optional, s::RepeatCount.bounded(1)),
16
+ e::E326 .simple_use(r::Optional, s::RepeatCount.bounded(1)),
17
+ e::E235 .simple_use(r::Optional, s::RepeatCount.bounded(1)),
18
+ e::E234 .simple_use(r::Optional, s::RepeatCount.bounded(1)),
19
+ e::E235 .simple_use(r::Optional, s::RepeatCount.bounded(1)),
20
+ e::E234 .simple_use(r::Optional, s::RepeatCount.bounded(1)),
21
+ e::E235 .simple_use(r::Optional, s::RepeatCount.bounded(1)),
22
+ e::E234 .simple_use(r::Optional, s::RepeatCount.bounded(1)),
23
+ e::E235 .simple_use(r::Optional, s::RepeatCount.bounded(1)),
24
+ e::E234 .simple_use(r::Optional, s::RepeatCount.bounded(1)),
25
+ e::E235 .simple_use(r::Optional, s::RepeatCount.bounded(1)),
26
+ e::E234 .simple_use(r::Optional, s::RepeatCount.bounded(1)),
27
+ e::E235 .simple_use(r::Optional, s::RepeatCount.bounded(1)),
28
+ e::E234 .simple_use(r::Optional, s::RepeatCount.bounded(1)),
29
+ e::E235 .simple_use(r::Optional, s::RepeatCount.bounded(1)),
30
+ e::E234 .simple_use(r::Optional, s::RepeatCount.bounded(1)),
31
+ e::E235 .simple_use(r::Optional, s::RepeatCount.bounded(1)),
32
+ e::E234 .simple_use(r::Optional, s::RepeatCount.bounded(1)),
33
+ e::E235 .simple_use(r::Optional, s::RepeatCount.bounded(1)),
34
+ e::E234 .simple_use(r::Optional, s::RepeatCount.bounded(1)),
35
+ e::E235 .simple_use(r::Optional, s::RepeatCount.bounded(1)),
36
+ e::E234 .simple_use(r::Optional, s::RepeatCount.bounded(1)),
37
+ e::E235 .simple_use(r::Optional, s::RepeatCount.bounded(1)),
38
+ e::E234 .simple_use(r::Optional, s::RepeatCount.bounded(1)),
39
+ e::E1271 .simple_use(r::Optional, s::RepeatCount.bounded(1)))
40
+ end
41
+ end
42
+ end
43
+ end
@@ -0,0 +1,25 @@
1
+ # frozen_string_literal: true
2
+ module Stupidedi
3
+ module Versions
4
+ module FortyTen
5
+ module SegmentDefs
6
+ s = Schema
7
+ e = ElementDefs
8
+ r = ElementReqs
9
+
10
+ BIG = s::SegmentDef.build(:BIG, "Beginning Segment for Invoice",
11
+ "To indicate the beginning of the Invoice Transaction Set and transmit identifying numbers and dates",
12
+ e::E32 .simple_use(r::Mandatory, s::RepeatCount.bounded(1)),
13
+ e::E76 .simple_use(r::Mandatory, s::RepeatCount.bounded(1)),
14
+ e::E32 .simple_use(r::Optional, s::RepeatCount.bounded(1)),
15
+ e::E324 .simple_use(r::Optional, s::RepeatCount.bounded(1)),
16
+ e::E328 .simple_use(r::Optional, s::RepeatCount.bounded(1)),
17
+ e::E1716.simple_use(r::Optional, s::RepeatCount.bounded(1)),
18
+ e::E640 .simple_use(r::Optional, s::RepeatCount.bounded(1)),
19
+ e::E353 .simple_use(r::Optional, s::RepeatCount.bounded(1)),
20
+ e::E306 .simple_use(r::Optional, s::RepeatCount.bounded(1)),
21
+ e::E76 .simple_use(r::Optional, s::RepeatCount.bounded(1)))
22
+ end
23
+ end
24
+ end
25
+ end
@@ -0,0 +1,39 @@
1
+ # frozen_string_literal: true
2
+ module Stupidedi
3
+ module Versions
4
+ module FortyTen
5
+ module SegmentDefs
6
+ s = Schema
7
+ e = ElementDefs
8
+ r = ElementReqs
9
+
10
+ IT1 = s::SegmentDef.build(:IT1, "Baseline Item Data (Invoice)", "Invoice Lines",
11
+ e::E1731.simple_use(r::Optional, s::RepeatCount.bounded(1)),
12
+ e::E1732.simple_use(r::Optional, s::RepeatCount.bounded(1)),
13
+ e::E355 .simple_use(r::Optional, s::RepeatCount.bounded(1)),
14
+ e::E212 .simple_use(r::Optional, s::RepeatCount.bounded(1)),
15
+ e::E639 .simple_use(r::Optional, s::RepeatCount.bounded(1)),
16
+ e::E235 .simple_use(r::Optional, s::RepeatCount.bounded(1)),
17
+ e::E234 .simple_use(r::Optional, s::RepeatCount.bounded(1)),
18
+ e::E235 .simple_use(r::Optional, s::RepeatCount.bounded(1)),
19
+ e::E234 .simple_use(r::Optional, s::RepeatCount.bounded(1)),
20
+ e::E235 .simple_use(r::Optional, s::RepeatCount.bounded(1)),
21
+ e::E234 .simple_use(r::Optional, s::RepeatCount.bounded(1)),
22
+ e::E235 .simple_use(r::Optional, s::RepeatCount.bounded(1)),
23
+ e::E234 .simple_use(r::Optional, s::RepeatCount.bounded(1)),
24
+ e::E235 .simple_use(r::Optional, s::RepeatCount.bounded(1)),
25
+ e::E234 .simple_use(r::Optional, s::RepeatCount.bounded(1)),
26
+ e::E235 .simple_use(r::Optional, s::RepeatCount.bounded(1)),
27
+ e::E234 .simple_use(r::Optional, s::RepeatCount.bounded(1)),
28
+ e::E235 .simple_use(r::Optional, s::RepeatCount.bounded(1)),
29
+ e::E234 .simple_use(r::Optional, s::RepeatCount.bounded(1)),
30
+ e::E235 .simple_use(r::Optional, s::RepeatCount.bounded(1)),
31
+ e::E234 .simple_use(r::Optional, s::RepeatCount.bounded(1)),
32
+ e::E235 .simple_use(r::Optional, s::RepeatCount.bounded(1)),
33
+ e::E234 .simple_use(r::Optional, s::RepeatCount.bounded(1)),
34
+ e::E235 .simple_use(r::Optional, s::RepeatCount.bounded(1)),
35
+ e::E234 .simple_use(r::Optional, s::RepeatCount.bounded(1)))
36
+ end
37
+ end
38
+ end
39
+ end
@@ -0,0 +1,29 @@
1
+ # frozen_string_literal: true
2
+ module Stupidedi
3
+ module Versions
4
+ module FortyTen
5
+ module SegmentDefs
6
+ s = Schema
7
+ e = ElementDefs
8
+ r = ElementReqs
9
+
10
+ ITD = s::SegmentDef.build(:ITD, "Terms of Sale/Deferred Terms of Sale", "Terms of Sale/Deferred Terms of Sale",
11
+ e::E1733.simple_use(r::Optional, s::RepeatCount.bounded(1)),
12
+ e::E1734.simple_use(r::Optional, s::RepeatCount.bounded(1)),
13
+ e::E954 .simple_use(r::Optional, s::RepeatCount.bounded(1)),
14
+ e::E1735.simple_use(r::Optional, s::RepeatCount.bounded(1)),
15
+ e::E1736.simple_use(r::Optional, s::RepeatCount.bounded(1)),
16
+ e::E1737.simple_use(r::Optional, s::RepeatCount.bounded(1)),
17
+ e::E1738.simple_use(r::Optional, s::RepeatCount.bounded(1)),
18
+ e::E1739.simple_use(r::Optional, s::RepeatCount.bounded(1)),
19
+ e::E1740.simple_use(r::Optional, s::RepeatCount.bounded(1)),
20
+ e::E1741.simple_use(r::Optional, s::RepeatCount.bounded(1)),
21
+ e::E954 .simple_use(r::Optional, s::RepeatCount.bounded(1)),
22
+ e::E352 .simple_use(r::Optional, s::RepeatCount.bounded(1)),
23
+ e::E1742.simple_use(r::Optional, s::RepeatCount.bounded(1)),
24
+ e::E1743.simple_use(r::Optional, s::RepeatCount.bounded(1)),
25
+ e::E954 .simple_use(r::Optional, s::RepeatCount.bounded(1)))
26
+ end
27
+ end
28
+ end
29
+ end
@@ -0,0 +1,31 @@
1
+ # frozen_string_literal: true
2
+ module Stupidedi
3
+ module Versions
4
+ module FortyTen
5
+ module SegmentDefs
6
+ s = Schema
7
+ e = ElementDefs
8
+ r = ElementReqs
9
+
10
+ SAC = s::SegmentDef.build(:SAC, "Service, Promotion, Allowance, or Charge Information",
11
+ "To indicate the header charge information",
12
+ e::E1717.simple_use(r::Optional, s::RepeatCount.bounded(1)),
13
+ e::E1718.simple_use(r::Optional, s::RepeatCount.bounded(1)),
14
+ e::E559 .simple_use(r::Optional, s::RepeatCount.bounded(1)),
15
+ e::E1719.simple_use(r::Optional, s::RepeatCount.bounded(1)),
16
+ e::E782 .simple_use(r::Optional, s::RepeatCount.bounded(1)),
17
+ e::E1720.simple_use(r::Optional, s::RepeatCount.bounded(1)),
18
+ e::E954 .simple_use(r::Optional, s::RepeatCount.bounded(1)),
19
+ e::E1721.simple_use(r::Optional, s::RepeatCount.bounded(1)),
20
+ e::E355 .simple_use(r::Optional, s::RepeatCount.bounded(1)),
21
+ e::E380 .simple_use(r::Optional, s::RepeatCount.bounded(1)),
22
+ e::E380 .simple_use(r::Optional, s::RepeatCount.bounded(1)),
23
+ e::E1722.simple_use(r::Optional, s::RepeatCount.bounded(1)),
24
+ e::E127 .simple_use(r::Optional, s::RepeatCount.bounded(1)),
25
+ e::E1723.simple_use(r::Optional, s::RepeatCount.bounded(1)),
26
+ e::E352 .simple_use(r::Optional, s::RepeatCount.bounded(1)),
27
+ e::E819 .simple_use(r::Optional, s::RepeatCount.bounded(1)))
28
+ end
29
+ end
30
+ end
31
+ end
@@ -0,0 +1,18 @@
1
+ # frozen_string_literal: true
2
+ module Stupidedi
3
+ module Versions
4
+ module FortyTen
5
+ module SegmentDefs
6
+ s = Schema
7
+ e = ElementDefs
8
+ r = ElementReqs
9
+
10
+ TDS = s::SegmentDef.build(:TDS, "Total Monetary Value Summary", "Total Monetary Value Summary",
11
+ e::E610.simple_use(r::Optional, s::RepeatCount.bounded(1)),
12
+ e::E610.simple_use(r::Optional, s::RepeatCount.bounded(1)),
13
+ e::E610.simple_use(r::Optional, s::RepeatCount.bounded(1)),
14
+ e::E610.simple_use(r::Optional, s::RepeatCount.bounded(1)))
15
+ end
16
+ end
17
+ end
18
+ end
@@ -0,0 +1,24 @@
1
+ # frozen_string_literal: true
2
+ module Stupidedi
3
+ module Versions
4
+ module FortyTen
5
+ module SegmentDefs
6
+ s = Schema
7
+ e = ElementDefs
8
+ r = ElementReqs
9
+
10
+ TXI = s::SegmentDef.build(:TXI, "Tax Information", "Tax Information",
11
+ e::E1724.simple_use(r::Optional, s::RepeatCount.bounded(1)),
12
+ e::E782 .simple_use(r::Optional, s::RepeatCount.bounded(1)),
13
+ e::E954 .simple_use(r::Optional, s::RepeatCount.bounded(1)),
14
+ e::E1725.simple_use(r::Optional, s::RepeatCount.bounded(1)),
15
+ e::E1726.simple_use(r::Optional, s::RepeatCount.bounded(1)),
16
+ e::E1727.simple_use(r::Optional, s::RepeatCount.bounded(1)),
17
+ e::E1728.simple_use(r::Optional, s::RepeatCount.bounded(1)),
18
+ e::E1729.simple_use(r::Optional, s::RepeatCount.bounded(1)),
19
+ e::E1730.simple_use(r::Optional, s::RepeatCount.bounded(1)),
20
+ e::E1731.simple_use(r::Optional, s::RepeatCount.bounded(1)))
21
+ end
22
+ end
23
+ end
24
+ end
@@ -3,6 +3,7 @@ module Stupidedi
3
3
  module Versions
4
4
  module FortyTen
5
5
  module SegmentDefs
6
+ autoload :ACK, "stupidedi/versions/004010/segment_defs/ACK"
6
7
  autoload :AK1, "stupidedi/versions/004010/segment_defs/AK1"
7
8
  autoload :AK2, "stupidedi/versions/004010/segment_defs/AK2"
8
9
  autoload :AK3, "stupidedi/versions/004010/segment_defs/AK3"
@@ -20,6 +21,12 @@ module Stupidedi
20
21
  autoload :BAK, "stupidedi/versions/004010/segment_defs/BAK"
21
22
  autoload :BCT, "stupidedi/versions/004010/segment_defs/BCT"
22
23
  autoload :BEG, "stupidedi/versions/004010/segment_defs/BEG"
24
+ autoload :BIG, "stupidedi/versions/004010/segment_defs/BIG"
25
+ autoload :ITD, "stupidedi/versions/004010/segment_defs/ITD"
26
+ autoload :IT1, "stupidedi/versions/004010/segment_defs/IT1"
27
+ autoload :TXI, "stupidedi/versions/004010/segment_defs/TXI"
28
+ autoload :TDS, "stupidedi/versions/004010/segment_defs/TDS"
29
+ autoload :SAC, "stupidedi/versions/004010/segment_defs/SAC"
23
30
  autoload :BFR, "stupidedi/versions/004010/segment_defs/BFR"
24
31
  autoload :BPR, "stupidedi/versions/004010/segment_defs/BPR"
25
32
  autoload :BSN, "stupidedi/versions/004010/segment_defs/BSN"
@@ -239,7 +239,6 @@ module Stupidedi
239
239
  "DN" => "Referring Provider",
240
240
  "DQ" => "Supervising Physician",
241
241
  "DO" => "Dependent Name",
242
- "DQ" => "Supervising Physician",
243
242
  # RESTART HERE
244
243
  "E1" => "Person or Other Entity Legally Responsible for a Child",
245
244
  "E2" => "Person or Other Entity With Whom a Child Resides",
@@ -261,7 +260,6 @@ module Stupidedi
261
260
  "GK" => "Previous Insured",
262
261
  "GM" => "Spouse Insured",
263
262
  "GP" => "Gateway Provider",
264
- "GD" => "Guardian",
265
263
  "GW" => "Group",
266
264
  "GY" => "Treatment Facility",
267
265
  "HF" => "Healthcare Professional Shortage Area (HPSA) Facility",
@@ -316,13 +314,11 @@ module Stupidedi
316
314
  "QY" => "Medical Doctor",
317
315
  "R3" => "Next Scheduled Destination",
318
316
  "RC" => "Receiving Location",
319
- "RW" => "Rural Health Clinic",
320
317
  "S1" => "Parent",
321
318
  "S3" => "Custodial Parent",
322
- "S4" => "Skilled Nursing Facility",
323
319
  "SEP" => "Secondary Payer",
324
320
  "SJ" => "Service Provider",
325
- "SU" => "Suppplier/Manufacturer",
321
+ "SU" => "Supplier/Manufacturer",
326
322
  # Used to identify the geographic location where a patient is transferred or diverted
327
323
  "T4" => "Transfer Point",
328
324
  "TL" => "Testing Laboratory",
@@ -2182,7 +2178,7 @@ module Stupidedi
2182
2178
  "24" => "Dependent of a Minor Dependent",
2183
2179
  "25" => "Ex-spouse",
2184
2180
  "26" => "Guardian",
2185
- "29" => "Signficant Other",
2181
+ "29" => "Significant Other",
2186
2182
  "31" => "Court Appointed Guardian",
2187
2183
  "32" => "Mother",
2188
2184
  "33" => "Father",
@@ -2213,7 +2209,7 @@ module Stupidedi
2213
2209
  "14" => "Medicare Secondary, No-fault Insurance including Auto is Primary",
2214
2210
  "15" => "Medicare Secondary Worker's Compensation",
2215
2211
  "16" => "Medicare Secondary Public Health Service (PHS) or Other Federal Agency",
2216
- "41" => "Medicare Secondary Blank Lung",
2212
+ "41" => "Medicare Secondary Black Lung",
2217
2213
  "42" => "Medicare Secondary Veteran's Administration",
2218
2214
  "43" => "Medicare Secondary Disabled Beneficiary Under Age 65 with Large Group Health Plan (LGHP)",
2219
2215
  "44" => "Nature of Injury",
@@ -2353,6 +2349,8 @@ module Stupidedi
2353
2349
  E1204 = t::AN.new(:E1204, "Plan Coverage Description" , 1, 50)
2354
2350
  E1205 = t::ID.new(:E1205, "Insurance Line Code" , 2, 3,
2355
2351
  s::CodeList.build(
2352
+ "AC" => "Basic Life",
2353
+ "ADD" => "Accidental Death and Dismemberment",
2356
2354
  "AG" => "Preventative Care/Wellness",
2357
2355
  "AH" => "24 Hour Care",
2358
2356
  "AJ" => "Medicare Risk",
@@ -2773,7 +2771,7 @@ module Stupidedi
2773
2771
  "14" => "Medicare Secondary, No-fault Insurance including Auto is Primary",
2774
2772
  "15" => "Medicare Secondary Worker's Compensation",
2775
2773
  "16" => "Medicare Secondary Public Health Service (PHS) or Other Federal Agency",
2776
- "41" => "Medicare Secondary Blank Lung",
2774
+ "41" => "Medicare Secondary Black Lung",
2777
2775
  "42" => "Medicare Secondary Veteran's Administration",
2778
2776
  "43" => "Medicare Secondary Disabled Beneficiary Under Age 65 with Large Group Health Plan (LGHP)",
2779
2777
  "47" => "Medicare Secondary, Other Liability Insurance is Primary",
@@ -284,7 +284,9 @@ module Stupidedi
284
284
  if rounded.zero?
285
285
  "0" * definition.min_length
286
286
  else
287
- sign + rounded.abs.to_s("F").
287
+ base = rounded.abs
288
+ base = base.is_a?(BigDecimal) ? base : BigDecimal(base)
289
+ sign + base.to_s("F").
288
290
  gsub(/^0+/, ""). # leading zeros
289
291
  gsub(/0+$/, ""). # trailing zeros
290
292
  gsub(/\.$/, ""). # trailing decimal point
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: stupidedi
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.4.1
4
+ version: 1.4.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Kyle Putnam
@@ -253,6 +253,7 @@ files:
253
253
  - lib/stupidedi/transaction_sets/004010/implementations/FA997.rb
254
254
  - lib/stupidedi/transaction_sets/004010/implementations/GF990.rb
255
255
  - lib/stupidedi/transaction_sets/004010/implementations/IM210.rb
256
+ - lib/stupidedi/transaction_sets/004010/implementations/IN810.rb
256
257
  - lib/stupidedi/transaction_sets/004010/implementations/OW940.rb
257
258
  - lib/stupidedi/transaction_sets/004010/implementations/PO850.rb
258
259
  - lib/stupidedi/transaction_sets/004010/implementations/PS830.rb
@@ -270,6 +271,7 @@ files:
270
271
  - lib/stupidedi/transaction_sets/004010/standards/GF990.rb
271
272
  - lib/stupidedi/transaction_sets/004010/standards/HP835.rb
272
273
  - lib/stupidedi/transaction_sets/004010/standards/IM210.rb
274
+ - lib/stupidedi/transaction_sets/004010/standards/IN810.rb
273
275
  - lib/stupidedi/transaction_sets/004010/standards/OW940.rb
274
276
  - lib/stupidedi/transaction_sets/004010/standards/PO850.rb
275
277
  - lib/stupidedi/transaction_sets/004010/standards/PR855.rb
@@ -748,6 +750,7 @@ files:
748
750
  - lib/stupidedi/versions/004010/element_types/tm.rb
749
751
  - lib/stupidedi/versions/004010/functional_group_def.rb
750
752
  - lib/stupidedi/versions/004010/segment_defs.rb
753
+ - lib/stupidedi/versions/004010/segment_defs/ACK.rb
751
754
  - lib/stupidedi/versions/004010/segment_defs/AK1.rb
752
755
  - lib/stupidedi/versions/004010/segment_defs/AK2.rb
753
756
  - lib/stupidedi/versions/004010/segment_defs/AK3.rb
@@ -766,6 +769,7 @@ files:
766
769
  - lib/stupidedi/versions/004010/segment_defs/BCT.rb
767
770
  - lib/stupidedi/versions/004010/segment_defs/BEG.rb
768
771
  - lib/stupidedi/versions/004010/segment_defs/BFR.rb
772
+ - lib/stupidedi/versions/004010/segment_defs/BIG.rb
769
773
  - lib/stupidedi/versions/004010/segment_defs/BPR.rb
770
774
  - lib/stupidedi/versions/004010/segment_defs/BSN.rb
771
775
  - lib/stupidedi/versions/004010/segment_defs/BSS.rb
@@ -784,6 +788,8 @@ files:
784
788
  - lib/stupidedi/versions/004010/segment_defs/GS.rb
785
789
  - lib/stupidedi/versions/004010/segment_defs/H3.rb
786
790
  - lib/stupidedi/versions/004010/segment_defs/HL.rb
791
+ - lib/stupidedi/versions/004010/segment_defs/IT1.rb
792
+ - lib/stupidedi/versions/004010/segment_defs/ITD.rb
787
793
  - lib/stupidedi/versions/004010/segment_defs/JIT.rb
788
794
  - lib/stupidedi/versions/004010/segment_defs/K1.rb
789
795
  - lib/stupidedi/versions/004010/segment_defs/L0.rb
@@ -829,6 +835,7 @@ files:
829
835
  - lib/stupidedi/versions/004010/segment_defs/R3.rb
830
836
  - lib/stupidedi/versions/004010/segment_defs/REF.rb
831
837
  - lib/stupidedi/versions/004010/segment_defs/S5.rb
838
+ - lib/stupidedi/versions/004010/segment_defs/SAC.rb
832
839
  - lib/stupidedi/versions/004010/segment_defs/SCH.rb
833
840
  - lib/stupidedi/versions/004010/segment_defs/SDP.rb
834
841
  - lib/stupidedi/versions/004010/segment_defs/SE.rb
@@ -840,9 +847,11 @@ files:
840
847
  - lib/stupidedi/versions/004010/segment_defs/TD3.rb
841
848
  - lib/stupidedi/versions/004010/segment_defs/TD4.rb
842
849
  - lib/stupidedi/versions/004010/segment_defs/TD5.rb
850
+ - lib/stupidedi/versions/004010/segment_defs/TDS.rb
843
851
  - lib/stupidedi/versions/004010/segment_defs/TRN.rb
844
852
  - lib/stupidedi/versions/004010/segment_defs/TS2.rb
845
853
  - lib/stupidedi/versions/004010/segment_defs/TS3.rb
854
+ - lib/stupidedi/versions/004010/segment_defs/TXI.rb
846
855
  - lib/stupidedi/versions/004010/segment_defs/UIT.rb
847
856
  - lib/stupidedi/versions/004010/segment_defs/W01.rb
848
857
  - lib/stupidedi/versions/004010/segment_defs/W03.rb
@@ -1063,8 +1072,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
1063
1072
  - !ruby/object:Gem::Version
1064
1073
  version: '0'
1065
1074
  requirements: []
1066
- rubyforge_project:
1067
- rubygems_version: 2.7.8
1075
+ rubygems_version: 3.4.6
1068
1076
  signing_key:
1069
1077
  specification_version: 4
1070
1078
  summary: Parse, generate, validate ASC X12 EDI