stupidedi 1.4.1 → 1.4.3

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 +2 -2
  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
@@ -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"),
@@ -146,7 +146,7 @@ module Stupidedi
146
146
  b::Segment(1000, s::DMG, "Subscriber Demographic Information", r::Situational, d::RepeatCount.bounded(1),
147
147
  b::Element(e::Situational, "Date Time Period Format Qualifier"),
148
148
  b::Element(e::Situational, "Subscriber Birth Date"),
149
- b::Element(e::Situational, "Subscriber Gender Code", b::Values("F", "M")),
149
+ b::Element(e::Situational, "Subscriber Gender Code", b::Values("F", "M", "U")),
150
150
  b::Element(e::NotUsed, "Marital Status Code"),
151
151
  b::Element(e::NotUsed, "COMPOSITE RACE OR ETHNICITY INFORMATION"),
152
152
  b::Element(e::NotUsed, "Citizenship Status Code"),
@@ -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.3"
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.3
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