stupidedi 1.2.17 → 1.2.18

Sign up to get free protection for your applications and to get access to all the features.
Files changed (30) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +1 -1
  3. data/bin/edi-pp +1 -1
  4. data/lib/stupidedi/config.rb +3 -0
  5. data/lib/stupidedi/contrib/004010/guides.rb +1 -0
  6. data/lib/stupidedi/contrib/004010/transaction_set_defs.rb +3 -0
  7. data/lib/stupidedi/contrib/004010/transaction_set_defs/PR855.rb +35 -0
  8. data/lib/stupidedi/contrib/004010/transaction_set_defs/SH856.rb +26 -12
  9. data/lib/stupidedi/guides/005010.rb +4 -0
  10. data/lib/stupidedi/guides/005010/X212-HR276.rb +387 -0
  11. data/lib/stupidedi/guides/005010/guide_builder.rb +2 -2
  12. data/lib/stupidedi/version.rb +1 -1
  13. data/lib/stupidedi/versions/functional_groups/004010/element_defs.rb +6 -1
  14. data/lib/stupidedi/versions/functional_groups/004010/element_types/time_val.rb +1 -0
  15. data/lib/stupidedi/versions/functional_groups/004010/segment_defs.rb +9 -0
  16. data/lib/stupidedi/versions/functional_groups/004010/segment_defs/BAK.rb +24 -0
  17. data/lib/stupidedi/versions/functional_groups/004010/segment_defs/PRF.rb +20 -0
  18. data/lib/stupidedi/versions/functional_groups/004010/segment_defs/TD4.rb +26 -0
  19. data/lib/stupidedi/versions/functional_groups/004010/segment_defs/TD5.rb +2 -2
  20. data/lib/stupidedi/versions/functional_groups/005010/element_defs.rb +6 -3
  21. data/spec/examples/integration/parsing/005010/X091A1-HP835.example +94 -0
  22. data/spec/examples/integration/parsing/005010/X212-HR276.example +152 -0
  23. data/spec/examples/integration/parsing/005010/X221-HP835.example +386 -0
  24. data/spec/examples/integration/parsing/005010/X222-HC837.example +257 -0
  25. data/spec/fixtures/PR855/1-good-v4010.txt +11 -0
  26. data/spec/fixtures/PR855/2-good-v4010.txt +17 -0
  27. data/spec/fixtures/SH856/2-good.txt +31 -0
  28. data/spec/support/matchers/navigation_matchers.rb +0 -1
  29. metadata +17 -3
  30. data/spec/examples/integration/parsing.example +0 -674
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 3c46085ad290ee14271363696a00ac3a9a270cfd2fda4c18c15b1cd3012bcefc
4
- data.tar.gz: 1cb000b1738736fa2a350691cc8c1c42a286ab26cff4a58baec7d526d65e2d93
3
+ metadata.gz: e34a8e41d60b6bb5fe3eb04f3ca7f0488ca045ff8395db0634b52770f234251c
4
+ data.tar.gz: 065f865f6a7c4d128500bd089d66e4c8c439e041e1a185957c5fe0249f8cdfa8
5
5
  SHA512:
6
- metadata.gz: 9d6cb0264b9ecf66838eba432f0bf84901e481e1b7458008854dc7eef4b24c4d4bfb0938d7380360397d670aff5a3de7414ebebe2fe831496a80d8c5d628ac39
7
- data.tar.gz: 1acd64f95de0249078ae28546c2634396bfe25547c25189ad2feac6b056f3491197b9e97e7617ac49d2f29f931e62762c39272f59001609304b14a37876aefbb
6
+ metadata.gz: 56fed9ac0fdbb889e228be5a33c84d84f38bae2f7bba4c54ef4e547b4096a2a52720adae3d2db77e7c9310417ff23771a24b81711268a132d8d433545c202439
7
+ data.tar.gz: e835b0a90b46bf60d964b391cb6d51ec18d158a04a4a4b0114626469db40f5fff382cd80cb240d012a57f1aa21684a6a0b034c67bb90ed701d68cbde354740ff
data/README.md CHANGED
@@ -1,5 +1,5 @@
1
1
  # Stupidedi
2
- [![Build Status](https://secure.travis-ci.org/irobayna/stupidedi.png?branch=master)](http://travis-ci.org/irobayna/stupidedi) [![Dependency Status](https://gemnasium.com/irobayna/stupidedi.svg)](https://gemnasium.com/irobayna/stupidedi) [![GitHub version](https://badge.fury.io/gh/irobayna%2Fstupidedi.svg)](http://badge.fury.io/gh/irobayna%2Fstupidedi) [![Code Climate](https://codeclimate.com/github/irobayna/stupidedi.png)](https://codeclimate.com/github/irobayna/stupidedi) [![Inline docs](http://inch-ci.org/github/irobayna/stupidedi.png?branch=master)](http://inch-ci.org/github/irobayna/stupidedi)
2
+ [![Build Status](https://secure.travis-ci.org/irobayna/stupidedi.png?branch=master)](http://travis-ci.org/irobayna/stupidedi) [![GitHub version](https://badge.fury.io/rb/stupidedi.svg)](http://badge.fury.io/gh/irobayna%2Fstupidedi) [![Code Climate](https://codeclimate.com/github/irobayna/stupidedi.png)](https://codeclimate.com/github/irobayna/stupidedi) [![Inline docs](http://inch-ci.org/github/irobayna/stupidedi.png?branch=master)](http://inch-ci.org/github/irobayna/stupidedi)
3
3
 
4
4
  ![Screenshot](https://raw.github.com/irobayna/stupidedi/master/doc/images/edi-pp.png)
5
5
 
data/bin/edi-pp CHANGED
@@ -1,4 +1,4 @@
1
- #!/usr/bin/env ruby -w
1
+ #!/usr/bin/env ruby
2
2
  require File.expand_path("../../lib/stupidedi", __FILE__)
3
3
  require "pp"
4
4
 
@@ -98,6 +98,7 @@ module Stupidedi
98
98
  base.customize do |c|
99
99
  c.transaction_set.customize do |x|
100
100
  x.register("004010", "HP", "835") { Stupidedi::Versions::FunctionalGroups::FortyTen::TransactionSetDefs::HP835 }
101
+ x.register("005010", "HR", "276") { Stupidedi::Versions::FunctionalGroups::FiftyTen::TransactionSetDefs::HR276 }
101
102
  x.register("005010", "HN", "277") { Stupidedi::Versions::FunctionalGroups::FiftyTen::TransactionSetDefs::HN277 }
102
103
  x.register("005010", "BE", "834") { Stupidedi::Versions::FunctionalGroups::FiftyTen::TransactionSetDefs::BE834 }
103
104
  x.register("005010", "HP", "835") { Stupidedi::Versions::FunctionalGroups::FiftyTen::TransactionSetDefs::HP835 }
@@ -105,6 +106,7 @@ module Stupidedi
105
106
  x.register("005010", "FA", "999") { Stupidedi::Versions::FunctionalGroups::FiftyTen::TransactionSetDefs::FA999 }
106
107
 
107
108
  x.register("004010X091A1", "HP", "835") { Stupidedi::Guides::FortyTen::X091A1::HP835 }
109
+ x.register("005010X212", "HR", "276") { Stupidedi::Guides::FiftyTen::X212::HR276 }
108
110
  x.register("005010X214", "HN", "277") { Stupidedi::Guides::FiftyTen::X214::HN277 }
109
111
  x.register("005010X220", "BE", "834") { Stupidedi::Guides::FiftyTen::X220::BE834 }
110
112
  x.register("005010X221", "HP", "835") { Stupidedi::Guides::FiftyTen::X221::HP835 }
@@ -128,6 +130,7 @@ module Stupidedi
128
130
  base.customize do |c|
129
131
  c.transaction_set.customize do |x|
130
132
  x.register("004010", "PO", "850") { Stupidedi::Contrib::FortyTen::TransactionSetDefs::PO850 }
133
+ x.register("004010", "PR", "855") { Stupidedi::Contrib::FortyTen::TransactionSetDefs::PR855 }
131
134
  x.register("004010", "OW", "940") { Stupidedi::Contrib::FortyTen::TransactionSetDefs::OW940 }
132
135
  x.register("004010", "AR", "943") { Stupidedi::Contrib::FortyTen::TransactionSetDefs::AR943 }
133
136
  x.register("004010", "RE", "944") { Stupidedi::Contrib::FortyTen::TransactionSetDefs::RE944 }
@@ -10,6 +10,7 @@ module Stupidedi
10
10
 
11
11
  autoload :IM210, "stupidedi/contrib/004010/guides/IM210"
12
12
  autoload :PO850, "stupidedi/contrib/004010/guides/PO850"
13
+ autoload :PR855, "stupidedi/contrib/004010/guides/PR855"
13
14
  autoload :OW940, "stupidedi/contrib/004010/guides/OW940"
14
15
  autoload :AR943, "stupidedi/contrib/004010/guides/AR943"
15
16
  autoload :RE944, "stupidedi/contrib/004010/guides/RE944"
@@ -10,6 +10,9 @@ module Stupidedi
10
10
  autoload :PO850, # Purchase Order
11
11
  "stupidedi/contrib/004010/transaction_set_defs/PO850"
12
12
 
13
+ autoload :PR855, # Purchase Order
14
+ "stupidedi/contrib/004010/transaction_set_defs/PR855"
15
+
13
16
  autoload :OW940, # Warehouse Shipping Order
14
17
  "stupidedi/contrib/004010/transaction_set_defs/OW940"
15
18
 
@@ -0,0 +1,35 @@
1
+ # frozen_string_literal: true
2
+ module Stupidedi
3
+ module Contrib
4
+ module FortyTen
5
+ module TransactionSetDefs
6
+ d = Schema
7
+ r = SegmentReqs
8
+ s = SegmentDefs
9
+
10
+ PR855 = d::TransactionSetDef.build("PR", "855",
11
+ "Purchase Order Ack",
12
+
13
+ d::TableDef.header("Table 1 - Header",
14
+ s:: ST.use( 10, r::Mandatory, d::RepeatCount.bounded(1)),
15
+ s::BAK.use( 20, r::Mandatory, d::RepeatCount.bounded(1)),
16
+
17
+ d::LoopDef.build("N1", d::RepeatCount.bounded(200),
18
+ s:: N1.use( 310, r::Optional, d::RepeatCount.bounded(1)),
19
+ s:: N3.use( 330, r::Optional, d::RepeatCount.bounded(2)),
20
+ s:: N4.use( 340, r::Optional, d::RepeatCount.unbounded),
21
+ s::REF.use( 350, r::Optional, d::RepeatCount.bounded(12)))),
22
+
23
+ d::TableDef.header("Table 2 - Detail",
24
+ d::LoopDef.build("PO1", d::RepeatCount.bounded(10000),
25
+ s::PO1.use( 10, r::Mandatory, d::RepeatCount.bounded(1)))),
26
+
27
+ d::TableDef.header("Table 3 - Summary",
28
+ d::LoopDef.build("CTT", d::RepeatCount.bounded(1),
29
+ s::CTT.use( 10, r::Optional, d::RepeatCount.bounded(1))),
30
+
31
+ s:: SE.use( 30, r::Optional, d::RepeatCount.bounded(1))))
32
+ end
33
+ end
34
+ end
35
+ end
@@ -11,24 +11,38 @@ module Stupidedi
11
11
  SH856 = d::TransactionSetDef.build("SH", "856", "Ship Notice/Manifest",
12
12
 
13
13
  d::TableDef.header("Table 1 - Header",
14
- s:: ST.use( 100, r::Mandatory, d::RepeatCount.bounded(1)),
15
- s::BSN.use( 200, r::Mandatory, d::RepeatCount.bounded(1)),
16
- s::DTM.use( 300, r::Mandatory, d::RepeatCount.bounded(10))),
14
+ s:: ST.use( 10, r::Mandatory, d::RepeatCount.bounded(1)),
15
+ s::BSN.use( 20, r::Mandatory, d::RepeatCount.bounded(1)),
16
+ s::DTM.use( 40, r::Optional, d::RepeatCount.bounded(10))
17
+ ),
17
18
 
18
19
  d::TableDef.detail("Table 2 - Detail",
19
20
  d::LoopDef.build("HL", d::RepeatCount.bounded(200000),
20
- s:: HL.use( 200, r::Mandatory, d::RepeatCount.bounded(1)),
21
- s::TD1.use(1000, r::Mandatory, d::RepeatCount.bounded(20)),
22
- s::TD5.use(1100, r::Mandatory, d::RepeatCount.bounded(12)),
23
- s::TD3.use(1200, r::Optional, d::RepeatCount.bounded(12)),
24
- s::REF.use(1500, r::Mandatory, d::RepeatCount.unbounded),
25
- s:: N1.use(3700, r::Mandatory, d::RepeatCount.bounded(3)),
26
- s::LIN.use(6600, r::Mandatory, d::RepeatCount.bounded(1)),
27
- s::SN1.use(6700, r::Mandatory, d::RepeatCount.bounded(1)))),
21
+ s:: HL.use( 10, r::Mandatory, d::RepeatCount.bounded(1)),
22
+ s::MEA.use( 80, r::Optional, d::RepeatCount.bounded(40)),
23
+ s::TD1.use(110, r::Optional, d::RepeatCount.bounded(20)),
24
+ s::TD5.use(120, r::Optional, d::RepeatCount.bounded(12)),
25
+ s::TD3.use(130, r::Optional, d::RepeatCount.bounded(12)),
26
+ s::TD4.use(140, r::Optional, d::RepeatCount.bounded(5)),
27
+ s::REF.use(150, r::Optional, d::RepeatCount.unbounded),
28
+ ),
29
+ d::LoopDef.build("N1", d::RepeatCount.bounded(200),
30
+ s:: N1.use( 310, r::Optional, d::RepeatCount.bounded(1)),
31
+ s:: N3.use( 330, r::Optional, d::RepeatCount.bounded(2)),
32
+ s:: N4.use( 340, r::Optional, d::RepeatCount.unbounded),
33
+ s::REF.use( 350, r::Optional, d::RepeatCount.bounded(12))),
34
+ d::LoopDef.build("HL", d::RepeatCount.bounded(200),
35
+ s:: N1.use( 310, r::Optional, d::RepeatCount.bounded(1)),
36
+ s:: N1.use( 310, r::Optional, d::RepeatCount.bounded(1)),
37
+ s::REF.use( 350, r::Optional, d::RepeatCount.bounded(12))),
38
+
39
+ ),
28
40
 
29
41
  d::TableDef.summary("Table 4 - Summary",
30
42
  s::CTT.use(100, r::Optional, d::RepeatCount.bounded(1)),
31
- s:: SE.use(200, r::Mandatory, d::RepeatCount.bounded(1))))
43
+ s:: SE.use(200, r::Mandatory, d::RepeatCount.bounded(1))
44
+ )
45
+ )
32
46
 
33
47
  end
34
48
  end
@@ -13,6 +13,10 @@ module Stupidedi
13
13
  autoload :ElementReqs, "stupidedi/guides/005010/element_reqs"
14
14
  autoload :GuideBuilder, "stupidedi/guides/005010/guide_builder"
15
15
 
16
+ module X212
17
+ autoload :HR276, "stupidedi/guides/005010/X212-HR276"
18
+ end
19
+
16
20
  module X214
17
21
  autoload :HN277, "stupidedi/guides/005010/X214-HN277"
18
22
  end
@@ -0,0 +1,387 @@
1
+ # frozen_string_literal: true
2
+ module Stupidedi
3
+ using Refinements
4
+
5
+ module Guides
6
+ module FiftyTen
7
+ module X212
8
+
9
+ b = GuideBuilder
10
+ d = Schema
11
+ r = SegmentReqs
12
+ e = ElementReqs
13
+ s = Versions::FunctionalGroups::FiftyTen::SegmentDefs
14
+ t = Versions::FunctionalGroups::FiftyTen::TransactionSetDefs
15
+
16
+ #
17
+ # Health Care Claim Request
18
+ #
19
+ HR276 = b.build(t::HR276,
20
+ d::TableDef.header("Table 1 - Header",
21
+ b::Segment(100, s::ST, "Transaction Set Header",
22
+ r::Required, d::RepeatCount.bounded(1),
23
+ b::Element(e::Required, "Transaction Set Identifier Code", b::Values("276")),
24
+ b::Element(e::Required, "Transaction Set Control Number"),
25
+ b::Element(e::Required, "Version, Release, or Industry Identifier", b::Values("005010X212"))),
26
+
27
+ b::Segment(200, s::BHT, "Beginning of Hierarchical Transaction",
28
+ r::Required, d::RepeatCount.bounded(1),
29
+ b::Element(e::Required, "Hierarchical Structure Code", b::Values("0010")),
30
+ b::Element(e::Required, "Transaction Set Purpose Code", b::Values("13")),
31
+ b::Element(e::Required, "Reference Identification"),
32
+ b::Element(e::Required, "Transaction Set Creation Date"),
33
+ b::Element(e::Required, "Transaction Set Creation Time"),
34
+ b::Element(e::NotUsed, "Transaction Type Code"))),
35
+
36
+ d::TableDef.detail("Table 2 - Information Source Detail",
37
+ d::LoopDef.build("2000A INFORMATION SOURCE LEVEL",
38
+ d::RepeatCount.bounded(1),
39
+ b::Segment(100, s::HL, "Information Source Level",
40
+ r::Required, d::RepeatCount.bounded(1),
41
+ b::Element(e::Required, "Hierarchical ID Number"),
42
+ b::Element(e::NotUsed, "Hierarchical Parent ID Number"),
43
+ b::Element(e::Required, "Hierarchical Level Code", b::Values("20")),
44
+ b::Element(e::Required, "Hierachical Child Code", b::Values("1"))),
45
+
46
+ d::LoopDef.build("2100A PAYER NAME",
47
+ d::RepeatCount.bounded(1),
48
+ b::Segment(500, s::NM1, "Payer Name",
49
+ r::Required, d::RepeatCount.bounded(1),
50
+ b::Element(e::Required, "Entity Identifier Code", b::Values("PR")),
51
+ b::Element(e::Required, "Entity Type Qualifier", b::Values("2")),
52
+ b::Element(e::Required, "Payer Name"),
53
+ b::Element(e::NotUsed, "Name First"),
54
+ b::Element(e::NotUsed, "Name Middle"),
55
+ b::Element(e::NotUsed, "Name Prefix"),
56
+ b::Element(e::NotUsed, "Name Suffix"),
57
+ b::Element(e::Required, "Identification Code Qualifier", b::Values("PI", "XV")),
58
+ b::Element(e::Required, "Payer Identifier"),
59
+ b::Element(e::NotUsed, "Entity Relationship Code"),
60
+ b::Element(e::NotUsed, "Entity Identifier Code"),
61
+ b::Element(e::NotUsed, "Name Last or Organization Name"))))),
62
+
63
+ d::TableDef.detail("Table 2 - Information Receiver Detail",
64
+ d::LoopDef.build("2000B INFORMATION RECEIVER LEVEL",
65
+ d::RepeatCount.bounded(1),
66
+ b::Segment(100, s::HL, "Information Receiver Level",
67
+ r::Required, d::RepeatCount.bounded(1),
68
+ b::Element(e::Required, "Hierarchical ID Number"),
69
+ b::Element(e::Required, "Hierarchical Parent ID Number"),
70
+ b::Element(e::Required, "Hierarchical Level Code", b::Values("21")),
71
+ b::Element(e::Required, "Hierachical Child Code", b::Values("1"))),
72
+
73
+ d::LoopDef.build("2100B INFORMATION RECEIVER NAME",
74
+ d::RepeatCount.bounded(1),
75
+ b::Segment(500, s::NM1, "Information Receiver Name",
76
+ r::Required, d::RepeatCount.bounded(1),
77
+ b::Element(e::Required, "Entity Identifier Code", b::Values("41")),
78
+ b::Element(e::Required, "Entity Type Qualifier", b::Values("1", "2")),
79
+ b::Element(e::Situational, "Information Receiver Last or Organization Name"),
80
+ b::Element(e::Situational, "Information Receiver First Name"),
81
+ b::Element(e::Situational, "Information Receiver Middle Name"),
82
+ b::Element(e::NotUsed, "Name Prefix"),
83
+ b::Element(e::NotUsed, "Name Suffix"),
84
+ b::Element(e::Required, "Identification Code Qualifier", b::Values("46")),
85
+ b::Element(e::Required, "Information Receiver Identification Number"),
86
+ b::Element(e::NotUsed, "Entity Relationship Code"),
87
+ b::Element(e::NotUsed, "Entity Identifier Code"),
88
+ b::Element(e::NotUsed, "Name Last or Organization Name"))))),
89
+
90
+ d::TableDef.detail("Table 2 - Service Provider Detail",
91
+ d::LoopDef.build("2000C SERVICE PROVIDER LEVEL",
92
+ d::RepeatCount.bounded(1),
93
+ b::Segment(100, s::HL, "Billing Provider of Service Level",
94
+ r::Required, d::RepeatCount.bounded(1),
95
+ b::Element(e::Required, "Hierarchical ID Number"),
96
+ b::Element(e::Required, "Hierarchical Parent ID Number"),
97
+ b::Element(e::Required, "Hierarchical Level Code", b::Values("19")),
98
+ b::Element(e::Required, "Hierachical Child Code", b::Values("1"))),
99
+
100
+ d::LoopDef.build("2100C PROVIDER NAME",
101
+ d::RepeatCount.bounded(2),
102
+ b::Segment(500, s::NM1, "Billing Provider Name",
103
+ r::Required, d::RepeatCount.bounded(1),
104
+ b::Element(e::Required, "Entity Identifier Code", b::Values("1P")),
105
+ b::Element(e::Required, "Entity Type Qualifier", b::Values("1", "2")),
106
+ b::Element(e::Situational, "Provider Last or Organization Name"),
107
+ b::Element(e::Situational, "Provider First Name"),
108
+ b::Element(e::Situational, "Provider Middle Name"),
109
+ b::Element(e::NotUsed, "Name Prefix"),
110
+ b::Element(e::Situational, "Provider Name Suffix"),
111
+ b::Element(e::Required, "Identification Code Qualifier", b::Values("FI", "SV", "XX")),
112
+ b::Element(e::Required, "Provider Identifier"),
113
+ b::Element(e::NotUsed, "Entity Relationship Code"),
114
+ b::Element(e::NotUsed, "Entity Identifier Code"),
115
+ b::Element(e::NotUsed, "Name Last or Organization Name"))))),
116
+
117
+ d::TableDef.detail("Table 2 - Subscriber Detail",
118
+ d::LoopDef.build("2000D SUBSCRIBER LEVEL",
119
+ d::RepeatCount.bounded(1),
120
+ b::Segment(100, s::HL, "Subscriber Level",
121
+ r::Required, d::RepeatCount.bounded(1),
122
+ b::Element(e::Required, "Hierarchical ID Number"),
123
+ b::Element(e::Required, "Hierarchical Parent ID Number"),
124
+ b::Element(e::Required, "Hierarchical Level Code", b::Values("22")),
125
+ b::Element(e::Required, "Hierachical Child Code", b::Values("0", "1"))),
126
+
127
+ b::Segment(400, s::DMG, "Subscriber Demographic Information",
128
+ r::Situational, d::RepeatCount.bounded(1),
129
+ b::Element(e::Required, "Date Time Period Format Qualifier", b::Values("D8")),
130
+ b::Element(e::Required, "Subscriber Birth Date"),
131
+ b::Element(e::Situational, "Subscriber Gender Code", b::Values("F", "M")),
132
+ b::Element(e::NotUsed, "Marital Status Code"),
133
+ b::Element(e::NotUsed, "COMPOSITE RACE OR ETHNICITY INFORMATION"),
134
+ b::Element(e::NotUsed, "Citizenship Status Code"),
135
+ b::Element(e::NotUsed, "Country Code"),
136
+ b::Element(e::NotUsed, "Basis of Verification Code"),
137
+ b::Element(e::NotUsed, "Quantity"),
138
+ b::Element(e::NotUsed, "Code LIst Qualifier Code"),
139
+ b::Element(e::NotUsed, "Industry Code")),
140
+
141
+ d::LoopDef.build("2100D SUBSCRIBER NAME",
142
+ d::RepeatCount.bounded(1),
143
+ b::Segment(500, s::NM1, "Subscriber Name",
144
+ r::Required, d::RepeatCount.bounded(1),
145
+ b::Element(e::Required, "Entity Identifier Code", b::Values("IL")),
146
+ b::Element(e::Required, "Entity Type Qualifier", b::Values("1", "2")),
147
+ b::Element(e::Required, "Subscriber Last Name"),
148
+ b::Element(e::Situational, "Subscriber First Name",),
149
+ b::Element(e::Situational, "Subscriber Middle Name or Initial"),
150
+ b::Element(e::NotUsed, "Name Prefix"),
151
+ b::Element(e::Situational, "Subscriber Name Suffix"),
152
+ b::Element(e::Required, "Identification Code Qualifier", b::Values("24", "II", "MI")),
153
+ b::Element(e::Required, "Subscriber Identifier"),
154
+ b::Element(e::NotUsed, "Entity Relationship Code"),
155
+ b::Element(e::NotUsed, "Entity Identifier Code"),
156
+ b::Element(e::NotUsed, "Name Last or Organization Name"))),
157
+
158
+ d::LoopDef.build("2200D CLAIM STATUS TRACKING NUMBER",
159
+ d::RepeatCount.unbounded,
160
+ b::Segment( 900, s::TRN, "Claim Status Tracking Number",
161
+ r::Situational, d::RepeatCount.bounded(1),
162
+ b::Element(e::Required, "Trace Type Code", b::Values("1")),
163
+ b::Element(e::Required, "Current Transaction Trace Number"),
164
+ b::Element(e::NotUsed, "Originating Company Identifier"),
165
+ b::Element(e::NotUsed, "Reference Identification")),
166
+ b::Segment(1000, s::REF, "Payer Claim Control Number",
167
+ r::Situational, d::RepeatCount.bounded(1),
168
+ b::Element(e::Required, "Reference Identification Qualifier", b::Values("1K")),
169
+ b::Element(e::Required, "Payer Claim Control Number"),
170
+ b::Element(e::NotUsed, "Description"),
171
+ b::Element(e::NotUsed, "REFERENCE IDENTIFIER")),
172
+ b::Segment(1000, s::REF, "Institutional Bill Type Identification",
173
+ r::Situational, d::RepeatCount.bounded(1),
174
+ b::Element(e::Required, "Reference Identification Qualifier", b::Values("BLT")),
175
+ b::Element(e::Required, "Bill Type Identifier"),
176
+ b::Element(e::NotUsed, "Description"),
177
+ b::Element(e::NotUsed, "REFERENCE IDENTIFIER")),
178
+ b::Segment(1000, s::REF, "Application or Location System Identifier",
179
+ r::Situational, d::RepeatCount.bounded(1),
180
+ b::Element(e::Required, "Reference Identification Qualifier", b::Values("LU")),
181
+ b::Element(e::Required, "Application or Location System Identifier"),
182
+ b::Element(e::NotUsed, "Description"),
183
+ b::Element(e::NotUsed, "REFERENCE IDENTIFIER")),
184
+ b::Segment(1000, s::REF, "Group Number",
185
+ r::Situational, d::RepeatCount.bounded(1),
186
+ b::Element(e::Required, "Reference Identification Qualifier", b::Values("6P")),
187
+ b::Element(e::Required, "Group Number"),
188
+ b::Element(e::NotUsed, "Description"),
189
+ b::Element(e::NotUsed, "REFERENCE IDENTIFIER")),
190
+ b::Segment(1000, s::REF, "Patient Control Number",
191
+ r::Situational, d::RepeatCount.bounded(1),
192
+ b::Element(e::Required, "Reference Identification Qualifier", b::Values("EJ")),
193
+ b::Element(e::Required, "Patient Control Number"),
194
+ b::Element(e::NotUsed, "Description"),
195
+ b::Element(e::NotUsed, "REFERENCE IDENTIFIER")),
196
+ b::Segment(1000, s::REF, "Pharmacy Prescription Number",
197
+ r::Situational, d::RepeatCount.bounded(1),
198
+ b::Element(e::Required, "Reference Identification Qualifier", b::Values("XZ")),
199
+ b::Element(e::Required, "Pharmacy Prescription Number"),
200
+ b::Element(e::NotUsed, "Description"),
201
+ b::Element(e::NotUsed, "REFERENCE IDENTIFIER")),
202
+ b::Segment(1000, s::REF, "Claim Identification Number for Clearinghouses and Other Transmission Intermediaries",
203
+ r::Situational, d::RepeatCount.bounded(1),
204
+ b::Element(e::Required, "Reference Identification Qualifier", b::Values("D9")),
205
+ b::Element(e::Required, "Clearinghouse Trace Number"),
206
+ b::Element(e::NotUsed, "Description"),
207
+ b::Element(e::NotUsed, "REFERENCE IDENTIFIER")),
208
+ b::Segment(1100, s::AMT, "Institutional Bill Type Identification",
209
+ r::Situational, d::RepeatCount.bounded(1),
210
+ b::Element(e::Required, "Amount Qualifier Code", b::Values("T3")),
211
+ b::Element(e::Required, "Total Claim Charge Amount"),
212
+ b::Element(e::NotUsed, "Credit/Debit Flag Code")),
213
+ b::Segment(1200, s::DTP, "Claim Level Service Date",
214
+ r::Situational, d::RepeatCount.bounded(1),
215
+ b::Element(e::Required, "Date Time Qualifier", b::Values("472")),
216
+ b::Element(e::Required, "Date Time Period Format Qualifier", b::Values("D8", "RD8")),
217
+ b::Element(e::Required, "Claim Service Period")),
218
+ d::LoopDef.build("2210D SERVICE LINE INFORMATION",
219
+ d::RepeatCount.unbounded,
220
+ b::Segment(1300, s::SVC, "Service Line Information",
221
+ r::Situational, d::RepeatCount.bounded(1),
222
+ b::Element(e::Required, "COMPOSITE MEDICAL PROCEDURE IDENTIFIER",
223
+ b::Element(e::Required, "Product or Service ID Qualifier", b::Values("AD", "ER", "HC", "HP", "IV", "N4", "NU", "WK")),
224
+ b::Element(e::Required, "Procedure Code"),
225
+ b::Element(e::Situational, "Procedure Modifier"),
226
+ b::Element(e::Situational, "Procedure Modifier"),
227
+ b::Element(e::Situational, "Procedure Modifier"),
228
+ b::Element(e::Situational, "Procedure Modifier"),
229
+ b::Element(e::NotUsed, "Description"),
230
+ b::Element(e::NotUsed, "Product/Service ID")),
231
+ b::Element(e::Required, "Line Item Charge Amount"),
232
+ b::Element(e::NotUsed, "Monetary Amount"),
233
+ b::Element(e::Situational, "Revenue Code"),
234
+ b::Element(e::NotUsed, "Quantity"),
235
+ b::Element(e::NotUsed, "COMPOSITE MEDICAL PROCEDURE IDENTIFIER"),
236
+ b::Element(e::Situational, "Units of Service Count")),
237
+ b::Segment(1400, s::REF, "Service Line Item Identification",
238
+ r::Situational, d::RepeatCount.bounded(1),
239
+ b::Element(e::Required, "Reference Identification Qualifier", b::Values("FJ")),
240
+ b::Element(e::Required, "Line Item Control Number"),
241
+ b::Element(e::NotUsed, "Description"),
242
+ b::Element(e::NotUsed, "REFERENCE IDENTIFIER")),
243
+ b::Segment(1500, s::DTP, "Service Line Date",
244
+ r::Required, d::RepeatCount.bounded(1),
245
+ b::Element(e::Required, "Date Time Qualifier", b::Values("472")),
246
+ b::Element(e::Required, "Date Time Period Format Qualifier", b::Values("D8", "RD8")),
247
+ b::Element(e::Required, "Service Line Date")))))),
248
+
249
+ d::TableDef.detail("Table 2 - Dependent Detail",
250
+ d::LoopDef.build("2000E DEPENDENT LEVEL",
251
+ d::RepeatCount.bounded(1),
252
+ b::Segment(100, s::HL, "Dependent Level",
253
+ r::Situational, d::RepeatCount.bounded(1),
254
+ b::Element(e::Required, "Hierarchical ID Number"),
255
+ b::Element(e::Required, "Hierarchical Parent ID Number"),
256
+ b::Element(e::Required, "Hierarchical Level Code", b::Values("23")),
257
+ b::Element(e::NotUsed, "Hierachical Child Code")),
258
+ b::Segment(400, s::DMG, "Dependent Demographic Information",
259
+ r::Required, d::RepeatCount.bounded(1),
260
+ b::Element(e::Required, "Date Time Period Format Qualifier", b::Values("D8")),
261
+ b::Element(e::Required, "Patient Birth Date"),
262
+ b::Element(e::Situational, "Patient Gender Code", b::Values("F", "M")),
263
+ b::Element(e::NotUsed, "Marital Status Code"),
264
+ b::Element(e::NotUsed, "COMPOSITE RACE OR ETHNICITY INFORMATION"),
265
+ b::Element(e::NotUsed, "Citizenship Status Code"),
266
+ b::Element(e::NotUsed, "Country Code"),
267
+ b::Element(e::NotUsed, "Basis of Verification Code"),
268
+ b::Element(e::NotUsed, "Quantity"),
269
+ b::Element(e::NotUsed, "Code LIst Qualifier Code"),
270
+ b::Element(e::NotUsed, "Industry Code"))),
271
+
272
+ d::LoopDef.build("2100E DEPENDENT NAME",
273
+ d::RepeatCount.bounded(1),
274
+ b::Segment(500, s::NM1, "Dependent Name",
275
+ r::Required, d::RepeatCount.bounded(1),
276
+ b::Element(e::Required, "Entity Identifier Code", b::Values("QC")),
277
+ b::Element(e::Required, "Entity Type Qualifier", b::Values("1")),
278
+ b::Element(e::Required, "Patient Last Name"),
279
+ b::Element(e::Situational, "Patient First Name"),
280
+ b::Element(e::Situational, "Patient Middle Name or Initial"),
281
+ b::Element(e::NotUsed, "Name Prefix"),
282
+ b::Element(e::Situational, "Patient Name Suffix"),
283
+ b::Element(e::NotUsed, "Identification Code Qualifier"),
284
+ b::Element(e::NotUsed, "Identification Code"),
285
+ b::Element(e::NotUsed, "Entity Relationship Code"),
286
+ b::Element(e::NotUsed, "Entity Identifier Code"),
287
+ b::Element(e::NotUsed, "Name Last or Organization Name"))),
288
+
289
+ d::LoopDef.build("2200E CLAIM STATUS TRACKING NUMBER",
290
+ d::RepeatCount.unbounded,
291
+ b::Segment( 900, s::TRN, "Claim Status Tracking Number",
292
+ r::Required, d::RepeatCount.bounded(1),
293
+ b::Element(e::Required, "Trace Type Code", b::Values("1")),
294
+ b::Element(e::Required, "Current Transaction Trace Number"),
295
+ b::Element(e::NotUsed, "Originating Company Identifier"),
296
+ b::Element(e::NotUsed, "Reference Identification")),
297
+ b::Segment(1000, s::REF, "Payer Claim Control Number",
298
+ r::Situational, d::RepeatCount.bounded(1),
299
+ b::Element(e::Required, "Reference Identification Qualifier", b::Values("1K")),
300
+ b::Element(e::Required, "Payer Claim Control Number"),
301
+ b::Element(e::NotUsed, "Description"),
302
+ b::Element(e::NotUsed, "REFERENCE IDENTIFIER")),
303
+ b::Segment(1000, s::REF, "Institutional Bill Type Identification",
304
+ r::Situational, d::RepeatCount.bounded(1),
305
+ b::Element(e::Required, "Reference Identification Qualifier", b::Values("BLT")),
306
+ b::Element(e::Required, "Bill Type Identifier"),
307
+ b::Element(e::NotUsed, "Description"),
308
+ b::Element(e::NotUsed, "REFERENCE IDENTIFIER")),
309
+ b::Segment(1000, s::REF, "Application or Location System Identifier",
310
+ r::Situational, d::RepeatCount.bounded(1),
311
+ b::Element(e::Required, "Reference Identification Qualifier", b::Values("LU")),
312
+ b::Element(e::Required, "Application or Location System Identifier"),
313
+ b::Element(e::NotUsed, "Description"),
314
+ b::Element(e::NotUsed, "REFERENCE IDENTIFIER")),
315
+ b::Segment(1000, s::REF, "Group Number",
316
+ r::Situational, d::RepeatCount.bounded(1),
317
+ b::Element(e::Required, "Reference Identification Qualifier", b::Values("6P")),
318
+ b::Element(e::Required, "Group Number"),
319
+ b::Element(e::NotUsed, "Description"),
320
+ b::Element(e::NotUsed, "REFERENCE IDENTIFIER")),
321
+ b::Segment(1000, s::REF, "Patient Control Number",
322
+ r::Situational, d::RepeatCount.bounded(1),
323
+ b::Element(e::Required, "Reference Identification Qualifier", b::Values("EJ")),
324
+ b::Element(e::Required, "Patient Control Number"),
325
+ b::Element(e::NotUsed, "Description"),
326
+ b::Element(e::NotUsed, "REFERENCE IDENTIFIER")),
327
+ b::Segment(1000, s::REF, "Pharmacy Prescription Number",
328
+ r::Situational, d::RepeatCount.bounded(1),
329
+ b::Element(e::Required, "Reference Identification Qualifier", b::Values("XZ")),
330
+ b::Element(e::Required, "Pharmacy Prescription Number"),
331
+ b::Element(e::NotUsed, "Description"),
332
+ b::Element(e::NotUsed, "REFERENCE IDENTIFIER")),
333
+ b::Segment(1000, s::REF, "Claim Identification Number for Clearinghouses and Other Transmission Intermediaries",
334
+ r::Situational, d::RepeatCount.bounded(1),
335
+ b::Element(e::Required, "Reference Identification Qualifier", b::Values("D9")),
336
+ b::Element(e::Required, "Clearinghouse Trace Number"),
337
+ b::Element(e::NotUsed, "Description"),
338
+ b::Element(e::NotUsed, "REFERENCE IDENTIFIER")),
339
+ b::Segment(1100, s::AMT, "Claim Submitted Charges",
340
+ r::Situational, d::RepeatCount.bounded(1),
341
+ b::Element(e::Required, "Amount Qualifier Code", b::Values("T3")),
342
+ b::Element(e::Required, "Total Claim Charge Amount"),
343
+ b::Element(e::NotUsed, "Credit/Debit Flag Code")),
344
+ b::Segment(1200, s::DTP, "Claim Service Date",
345
+ r::Situational, d::RepeatCount.bounded(1),
346
+ b::Element(e::Required, "Date Time Qualifier", b::Values("472")),
347
+ b::Element(e::Required, "Date Time Period Format Qualifier", b::Values("D8", "RD8")),
348
+ b::Element(e::Required, "Claim Service Period")),
349
+ d::LoopDef.build("2210E SERVICE LINE INFORMATION",
350
+ d::RepeatCount.unbounded,
351
+ b::Segment(1300, s::SVC, "Service Line Information",
352
+ r::Situational, d::RepeatCount.bounded(1),
353
+ b::Element(e::Required, "COMPOSITE MEDICAL PROCEDURE IDENTIFIER",
354
+ b::Element(e::Required, "Product or Service ID Qualifier", b::Values("AD", "ER", "HC", "HP", "IV", "N4", "NU", "WK")),
355
+ b::Element(e::Required, "Procedure Code"),
356
+ b::Element(e::Situational, "Procedure Modifier"),
357
+ b::Element(e::Situational, "Procedure Modifier"),
358
+ b::Element(e::Situational, "Procedure Modifier"),
359
+ b::Element(e::Situational, "Procedure Modifier"),
360
+ b::Element(e::NotUsed, "Description"),
361
+ b::Element(e::NotUsed, "Product/Service ID")),
362
+ b::Element(e::Required, "Line Item Charge Amount"),
363
+ b::Element(e::NotUsed, "Monetary Amount"),
364
+ b::Element(e::Situational, "Revenue Code"),
365
+ b::Element(e::NotUsed, "Quantity"),
366
+ b::Element(e::NotUsed, "COMPOSITE MEDICAL PROCEDURE IDENTIFIER"),
367
+ b::Element(e::Situational, "Units of Service Count")),
368
+ b::Segment(1400, s::REF, "Service Line Item Identification",
369
+ r::Situational, d::RepeatCount.bounded(1),
370
+ b::Element(e::Required, "Reference Identification Qualifier", b::Values("FJ")),
371
+ b::Element(e::Required, "Line Item Control Number"),
372
+ b::Element(e::NotUsed, "Description"),
373
+ b::Element(e::NotUsed, "REFERENCE IDENTIFIER")),
374
+ b::Segment(1500, s::DTP, "Service Line Date",
375
+ r::Required, d::RepeatCount.bounded(1),
376
+ b::Element(e::Required, "Date Time Qualifier", b::Values("472")),
377
+ b::Element(e::Required, "Date Time Period Format Qualifier", b::Values("D8", "RD8")),
378
+ b::Element(e::Required, "Service Line Date"))))),
379
+ d::TableDef.detail("Table 3 - Summary",
380
+ b::Segment(1600, s::SE, "Transaction Set Trailer",
381
+ r::Required, d::RepeatCount.bounded(1),
382
+ b::Element(e::Required, "Transaction Segment Count"),
383
+ b::Element(e::Required, "Transaction Set Control Number"))))
384
+ end
385
+ end
386
+ end
387
+ end