stupidedi 1.2.12 → 1.2.14

Sign up to get free protection for your applications and to get access to all the features.
Files changed (34) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +10 -4
  3. data/bin/edi-pp +1 -1
  4. data/doc/Generating.md +1 -1
  5. data/lib/ruby/to_d.rb +23 -20
  6. data/lib/stupidedi/config.rb +4 -0
  7. data/lib/stupidedi/guides/005010.rb +11 -3
  8. data/lib/stupidedi/guides/005010/X220-BE834.rb +709 -0
  9. data/lib/stupidedi/guides/005010/X220A1-BE834.rb +709 -0
  10. data/lib/stupidedi/guides/005010/X223-HC837I.rb +2582 -0
  11. data/lib/stupidedi/schema/table_def.rb +2 -2
  12. data/lib/stupidedi/version.rb +1 -1
  13. data/lib/stupidedi/versions/functional_groups/005010/element_defs.rb +471 -14
  14. data/lib/stupidedi/versions/functional_groups/005010/segment_defs.rb +41 -2
  15. data/lib/stupidedi/versions/functional_groups/005010/segment_defs/ACT.rb +33 -0
  16. data/lib/stupidedi/versions/functional_groups/005010/segment_defs/BGN.rb +31 -0
  17. data/lib/stupidedi/versions/functional_groups/005010/segment_defs/COB.rb +24 -0
  18. data/lib/stupidedi/versions/functional_groups/005010/segment_defs/DSB.rb +30 -0
  19. data/lib/stupidedi/versions/functional_groups/005010/segment_defs/EC.rb +26 -0
  20. data/lib/stupidedi/versions/functional_groups/005010/segment_defs/HD.rb +31 -0
  21. data/lib/stupidedi/versions/functional_groups/005010/segment_defs/HLH.rb +27 -0
  22. data/lib/stupidedi/versions/functional_groups/005010/segment_defs/ICM.rb +26 -0
  23. data/lib/stupidedi/versions/functional_groups/005010/segment_defs/IDC.rb +24 -0
  24. data/lib/stupidedi/versions/functional_groups/005010/segment_defs/INS.rb +39 -0
  25. data/lib/stupidedi/versions/functional_groups/005010/segment_defs/LE.rb +20 -0
  26. data/lib/stupidedi/versions/functional_groups/005010/segment_defs/LS.rb +20 -0
  27. data/lib/stupidedi/versions/functional_groups/005010/segment_defs/LUI.rb +28 -0
  28. data/lib/stupidedi/versions/functional_groups/005010/segment_defs/PLA.rb +25 -0
  29. data/lib/stupidedi/versions/functional_groups/005010/transaction_set_defs.rb +3 -3
  30. data/lib/stupidedi/versions/functional_groups/005010/transaction_set_defs/BE834.rb +163 -0
  31. data/lib/stupidedi/zipper/abstract_cursor.rb +2 -2
  32. data/spec/examples/ruby/symbol.example +22 -18
  33. data/spec/spec_helper.rb +1 -0
  34. metadata +25 -7
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: c6c79cf377cf10c26a069203de16a7490729b691
4
- data.tar.gz: 4f979f9cd4ce79ef213119eea58cf12aea4463c7
3
+ metadata.gz: 2e0bed8435395120843b4f51683cea5d686732e6
4
+ data.tar.gz: c5bb0aee47784bca3225adaa3cab3baf8fdc4635
5
5
  SHA512:
6
- metadata.gz: 1702828adf1d45725d4b8b6c8ac526f8131e7e32765c9c1675e064318a3c7048e999bf5bccc21142b0e4b52dbad683ed7aa9ed23785d144342a30c2655c443db
7
- data.tar.gz: 7fec90e6d0a3c98104c37ff927d85632a02513215c0086639340bb703db38ba01ef9f41b61ade8cc1a398beef6efda1eff55faecd7ea4067e5b539a68e261898
6
+ metadata.gz: '08bb934927e0f00a6ace691da761ff6d283c0786ffb2681d0077864b8fd0e66c28e7529d31c100a8a6987c0f7f7b277a21a26688f5dcbbdfcc9c4cccc0bbd510'
7
+ data.tar.gz: f4d19956f28deed5d76affa8c980a17d320981e88fdd3cb085dd4fdac4774fd35c7048b5ee42c6a0fb6fde4a629dbb25863ec699e2abbc920b68073ab62bd041
data/README.md CHANGED
@@ -1,5 +1,5 @@
1
1
  # Stupidedi
2
- [![Build Status](https://secure.travis-ci.org/kputnam/stupidedi.png?branch=master)](http://travis-ci.org/kputnam/stupidedi) [![Dependency Status](https://gemnasium.com/irobayna/stupidedi.svg)](https://gemnasium.com/irobayna/stupidedi) [![GitHub version](https://badge.fury.io/gh/kputnam%2Fstupidedi.svg)](http://badge.fury.io/gh/kputnam%2Fstupidedi) [![Code Climate](https://codeclimate.com/github/kputnam/stupidedi.png)](https://codeclimate.com/github/kputnam/stupidedi) [![Inline docs](http://inch-ci.org/github/kputnam/stupidedi.png?branch=master)](http://inch-ci.org/github/kputnam/stupidedi)
2
+ [![Build Status](https://secure.travis-ci.org/kputnam/stupidedi.png?branch=master)](http://travis-ci.org/kputnam/stupidedi) [![Dependency Status](https://gemnasium.com/irobayna/stupidedi.svg)](https://gemnasium.com/irobayna/stupidedi) [![GitHub version](https://badge.fury.io/gh/kputnam%2Fstupidedi.svg)](http://badge.fury.io/gh/kputnam%2Fstupidedi) [![Code Climate](https://codeclimate.com/github/kputnam/stupidedi.png)](https://codeclimate.com/github/kputnam/stupidedi) [![Inline docs](http://inch-ci.org/github/kputnam/stupidedi.png?branch=master)](http://inch-ci.org/github/kputnam/stupidedi)
3
3
 
4
4
  ![Screenshot](https://raw.github.com/kputnam/stupidedi/master/doc/images/edi-pp.png)
5
5
 
@@ -205,10 +205,10 @@ Pretty print the syntax tree
205
205
  TableVal[Table 3 - Summary](
206
206
  SegmentVal[SE: Transaction Set Trailer](
207
207
  Nn.value[ E96: Number of Included Segments](45),
208
- AN.value[ E329: Transaction Set Control Number](0021)))),
208
+ AN.value[ E329: Transaction Set Control Number](0021)))),
209
209
  SegmentVal[GE: Functional Group Trailer](
210
210
  Nn.value[ E97: Number of Transaction Sets Included](1),
211
- Nn.value[ E28: Group Control Number](1))),
211
+ Nn.value[ E28: Group Control Number](1))),
212
212
  SegmentVal[IEA: Interchange Control Trailer](
213
213
  Nn.value[ I16: Number of Included Functional Groups](1),
214
214
  Nn.value[ I12: Interchange Control Number](905))))
@@ -297,7 +297,7 @@ b.machine.zipper.tap do |z|
297
297
  # You can also serialize any subtree within the document (e.g., everything inside
298
298
  # some ST..SE transaction set, or a single loop. Here, z.root is the entire tree.
299
299
  w = Stupidedi::Writer::Default.new(z.root, separators)
300
- w.write($stdout)
300
+ print w.write()
301
301
  end
302
302
  ```
303
303
 
@@ -345,3 +345,9 @@ parser.first
345
345
  .flatmap{|m| m.find(:NM1, "QC") }
346
346
  .tap{|m| el(m, 3, 4){|l,f| puts "Patient: #{l}, #{f}" }}
347
347
  ```
348
+
349
+ ### Testing
350
+
351
+ ```ruby
352
+ rake spec
353
+ ```
data/bin/edi-pp CHANGED
@@ -20,7 +20,7 @@ ARGV.each do |path|
20
20
  # parser, r = parser.read(Stupidedi::Reader.build(content))
21
21
 
22
22
  File.open(path) do |io|
23
- parser, result = parser.read(Stupidedi::Reader.build(io))
23
+ parser, _result = parser.read(Stupidedi::Reader.build(io))
24
24
  end
25
25
  end
26
26
 
data/doc/Generating.md CHANGED
@@ -2,7 +2,7 @@ Generating X12
2
2
  ==============
3
3
 
4
4
  Stupidedi has a simple interface for generating X12 documents. Once you have
5
- defined a transaction set or implementation guide (see {file:Defining.md Defining}),
5
+ defined a transaction set or implementation guide (see [Defining](unwritten/Defining.md)) ,
6
6
  you can generate well-formed documents using [`BuilderDsl`][1].
7
7
 
8
8
  [1]: Stupidedi/Builder/BuilderDsl.html
data/lib/ruby/to_d.rb CHANGED
@@ -1,6 +1,7 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  require "bigdecimal"
4
+ require "bigdecimal/util"
4
5
  require "rational"
5
6
 
6
7
  module Stupidedi
@@ -13,27 +14,29 @@ module Stupidedi
13
14
  end
14
15
  end
15
16
 
16
- refine String do
17
- BIGDECIMAL = /\A[+-]? (?# optional leading sign )
18
- (?:
19
- (?:\d+\.?\d*) | (?# whole with optional decimal or ..)
20
- (?:\d*?\.?\d+) ) (?# optional whole with decimal )
21
- (?:E[+-]?\d+)? (?# optional exponent )
22
- \Z/ix
17
+ if RUBY_VERSION < "2.4"
18
+ refine String do
19
+ BIGDECIMAL = /\A[+-]? (?# optional leading sign )
20
+ (?:
21
+ (?:\d+\.?\d*) | (?# whole with optional decimal or ..)
22
+ (?:\d*?\.?\d+) ) (?# optional whole with decimal )
23
+ (?:E[+-]?\d+)? (?# optional exponent )
24
+ \Z/ix
23
25
 
24
- # Converts the string to a BigDecimal after validating the format. If the
25
- # string does not match the pattern for a valid number, an `ArgumentError`
26
- # is raised.
27
- #
28
- # @example
29
- # "1.0".to_d #=> BigDecimal("1.0")
30
- #
31
- # @return [BigDecimal]
32
- def to_d
33
- if BIGDECIMAL =~ self
34
- BigDecimal(to_s)
35
- else
36
- raise ArgumentError, "#{inspect} is not a valid number"
26
+ # Converts the string to a BigDecimal after validating the format. If the
27
+ # string does not match the pattern for a valid number, an `ArgumentError`
28
+ # is raised.
29
+ #
30
+ # @example
31
+ # "1.0".to_d #=> BigDecimal("1.0")
32
+ #
33
+ # @return [BigDecimal]
34
+ def to_d
35
+ if BIGDECIMAL =~ self
36
+ BigDecimal(to_s)
37
+ else
38
+ raise ArgumentError, "#{inspect} is not a valid number"
39
+ end
37
40
  end
38
41
  end
39
42
  end
@@ -99,15 +99,19 @@ module Stupidedi
99
99
  c.transaction_set.customize do |x|
100
100
  x.register("004010", "HP", "835") { Stupidedi::Versions::FunctionalGroups::FortyTen::TransactionSetDefs::HP835 }
101
101
  x.register("005010", "HN", "277") { Stupidedi::Versions::FunctionalGroups::FiftyTen::TransactionSetDefs::HN277 }
102
+ x.register("005010", "BE", "834") { Stupidedi::Versions::FunctionalGroups::FiftyTen::TransactionSetDefs::BE834 }
102
103
  x.register("005010", "HP", "835") { Stupidedi::Versions::FunctionalGroups::FiftyTen::TransactionSetDefs::HP835 }
103
104
  x.register("005010", "HC", "837") { Stupidedi::Versions::FunctionalGroups::FiftyTen::TransactionSetDefs::HC837 }
104
105
  x.register("005010", "FA", "999") { Stupidedi::Versions::FunctionalGroups::FiftyTen::TransactionSetDefs::FA999 }
105
106
 
106
107
  x.register("004010X091A1", "HP", "835") { Stupidedi::Guides::FortyTen::X091A1::HP835 }
107
108
  x.register("005010X214", "HN", "277") { Stupidedi::Guides::FiftyTen::X214::HN277 }
109
+ x.register("005010X220", "BE", "834") { Stupidedi::Guides::FiftyTen::X220::BE834 }
108
110
  x.register("005010X221", "HP", "835") { Stupidedi::Guides::FiftyTen::X221::HP835 }
109
111
  x.register("005010X222", "HC", "837") { Stupidedi::Guides::FiftyTen::X222::HC837P }
112
+ x.register("005010X223", "HC", "837") { Stupidedi::Guides::FiftyTen::X223::HC837I }
110
113
  x.register("005010X231", "FA", "999") { Stupidedi::Guides::FiftyTen::X231::FA999 }
114
+ x.register("005010X220A1", "BE", "834") { Stupidedi::Guides::FiftyTen::X220A1::BE834 }
111
115
  x.register("005010X221A1", "HP", "835") { Stupidedi::Guides::FiftyTen::X221A1::HP835 }
112
116
  x.register("005010X222A1", "HC", "837") { Stupidedi::Guides::FiftyTen::X222A1::HC837P }
113
117
  x.register("005010X231A1", "FA", "999") { Stupidedi::Guides::FiftyTen::X231A1::FA999 }
@@ -17,6 +17,14 @@ module Stupidedi
17
17
  autoload :HN277, "stupidedi/guides/005010/X214-HN277"
18
18
  end
19
19
 
20
+ module X220
21
+ autoload :BE834, "stupidedi/guides/005010/X220-BE834"
22
+ end
23
+
24
+ module X220A1
25
+ autoload :BE834, "stupidedi/guides/005010/X220A1-BE834"
26
+ end
27
+
20
28
  module X221
21
29
  autoload :HP835, "stupidedi/guides/005010/X221-HP835"
22
30
  end
@@ -33,9 +41,9 @@ module Stupidedi
33
41
  autoload :HC837P, "stupidedi/guides/005010/X222A1-HC837P"
34
42
  end
35
43
 
36
- # module X223
37
- # autoload :HC837I, "stupidedi/guides/005010/X223-HC837I"
38
- # end
44
+ module X223
45
+ autoload :HC837I, "stupidedi/guides/005010/X223-HC837I"
46
+ end
39
47
 
40
48
  # module X223A1
41
49
  # autoload :HC837I, "stupidedi/guides/005010/X223A1-HC837I"
@@ -0,0 +1,709 @@
1
+ # frozen_string_literal: true
2
+ module Stupidedi
3
+ using Refinements
4
+
5
+ module Guides
6
+ module FiftyTen
7
+ module X220
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
+ BE834 = b.build(t::BE834,
17
+ d::TableDef.header("Table 1 - Header",
18
+ b::Segment(100, s::ST, "Transaction Set Header", r::Required, d::RepeatCount.bounded(1),
19
+ b::Element(e::Required, "Transaction Set Identifier Code", b::Values("834")),
20
+ b::Element(e::Required, "Transaction Set Control Number"),
21
+ b::Element(e::Required, "Implementation Convention Reference", b::Values("005010X220"))
22
+ ),
23
+ b::Segment(200, s::BGN, "Beginning Segment", r::Required, d::RepeatCount.bounded(1),
24
+ b::Element(e::Required, "Transaction Set Purpose Code", b::Values("00", "15", "22")),
25
+ b::Element(e::Required, "Transaction Set Reference Number", b::MaxLength(50)),
26
+ b::Element(e::Required, "Transaction Set Creation Date"),
27
+ b::Element(e::Required, "Transaction Set Creation Time"),
28
+ b::Element(e::NotUsed, "Time Zone Code"),
29
+ b::Element(e::Situational, "Original Transaction Set Reference Number"),
30
+ b::Element(e::NotUsed, "Transaction Type Code"),
31
+ b::Element(e::Required, "Action Code", b::Values("2", "4", "RX")),
32
+ b::Element(e::NotUsed, "Security Level Code")
33
+ ),
34
+ b::Segment(300, s::REF, "Transaction Set Policy Number", r::Situational, d::RepeatCount.bounded(1),
35
+ b::Element(e::Required, "Reference Identification Qualifier", b::Values("38")),
36
+ b::Element(e::Required, "Master Policy Number", b::MaxLength(50)),
37
+ b::Element(e::NotUsed, "Description"),
38
+ b::Element(e::NotUsed, "REFERENCE IDENTIFIER")
39
+ ),
40
+ b::Segment(400, s::DTP, "File Effective Date", r::Situational, d::RepeatCount.bounded(2),
41
+ b::Element(e::Required, "Date Time Qualifier", b::Values("007", "090", "091", "303", "382", "388")),
42
+ b::Element(e::Required, "Date Time Period Format Qualifier", b::Values("D8")),
43
+ b::Element(e::Required, "Date Time Period", b::MaxLength(8))
44
+ ),
45
+ b::Segment(600, s::QTY, "Transaction Set Control Totals", r::Situational, d::RepeatCount.bounded(3),
46
+ b::Element(e::Required, "Quantity Qualifier", b::Values("DT", "ET", "TO")),
47
+ b::Element(e::Required, "Record Totals", b::MaxLength(15)),
48
+ b::Element(e::NotUsed, "Composite Unit of Measure"),
49
+ b::Element(e::NotUsed, "Free-form Information")
50
+ ),
51
+ d::LoopDef.build("1000A - SPONSOR NAME", d::RepeatCount.bounded(1),
52
+ b::Segment(700, s::N1, "Sponsor Name", r::Required, d::RepeatCount.bounded(1),
53
+ b::Element(e::Required, "Entity Identifier Code", b::Values("P5")),
54
+ b::Element(e::Situational, "Plan Sponsor Name", b::MaxLength(60)),
55
+ b::Element(e::Required, "Identification Code Qualifier", b::Values("24", "94", "FI")),
56
+ b::Element(e::Required, "Sponsor Identifier", b::MaxLength(80)),
57
+ b::Element(e::NotUsed, "Entity Relationship Code"),
58
+ b::Element(e::NotUsed, "Entity Identifier Code")
59
+ )
60
+ ),
61
+ d::LoopDef.build("1000B - PAYER", d::RepeatCount.bounded(1),
62
+ b::Segment(700, s::N1, "Payer", r::Required, d::RepeatCount.bounded(1),
63
+ b::Element(e::Required, "Entity Identifier Code", b::Values("IN")),
64
+ b::Element(e::Situational, "Insurer Name", b::MaxLength(60)),
65
+ b::Element(e::Required, "Identification Code Qualifier", b::Values("94", "FI", "XV")),
66
+ b::Element(e::Required, "Insurer Identification Code", b::MaxLength(80)),
67
+ b::Element(e::NotUsed, "Entity Relationship Code"),
68
+ b::Element(e::NotUsed, "Entity Identifier Code")
69
+ )
70
+ ),
71
+ d::LoopDef.build("1000C - TPA/BROKER NAME", d::RepeatCount.bounded(2),
72
+ b::Segment(700, s::N1, "TPA/Broker Name", r::Situational, d::RepeatCount.bounded(1),
73
+ b::Element(e::Required, "Entity Identifier Code", b::Values("BO", "TV")),
74
+ b::Element(e::Situational, "TPA or Broker Name", b::MaxLength(60)),
75
+ b::Element(e::Required, "Identification Code Qualifier", b::Values("94", "FI", "XV")),
76
+ b::Element(e::Required, "TPA or Broker Identification Code", b::MaxLength(80)),
77
+ b::Element(e::NotUsed, "Entity Relationship Code"),
78
+ b::Element(e::NotUsed, "Entity Identifier Code")
79
+ )
80
+ ),
81
+ d::LoopDef.build("1100C - TPA/BROKER ACCOUNT INFORMATION", d::RepeatCount.bounded(1),
82
+ b::Segment(1200, s::ACT, "TPA/Broker Account Information", r::Situational, d::RepeatCount.bounded(1),
83
+ b::Element(e::Required, "TPA or Broker Account Number", b::MaxLength(35)),
84
+ b::Element(e::NotUsed, "Name"),
85
+ b::Element(e::NotUsed, "Identification Code Qualifier"),
86
+ b::Element(e::NotUsed, "Identification Code"),
87
+ b::Element(e::NotUsed, "Account Number Qualifier"),
88
+ b::Element(e::Situational, "TPA or Broker Account Number", b::MaxLength(35)),
89
+ b::Element(e::NotUsed, "Description"),
90
+ b::Element(e::NotUsed, "Payment Method Type Code"),
91
+ b::Element(e::NotUsed, "Benefit Status Code")
92
+ )
93
+ )
94
+ ),
95
+
96
+ d::TableDef.detail("Table 2 - Detail",
97
+ d::LoopDef.build("2000 - MEMBER LEVEL DETAIL", d::RepeatCount.unbounded,
98
+ b::Segment(100, s::INS, "Member Level Detail", r::Required, d::RepeatCount.bounded(1),
99
+ b::Element(e::Required, "Member Indicator", b::Values("N", "Y")),
100
+ b::Element(e::Required, "Individual Relationship Code", b::Values("01", "03", "04", "05", "06", "07", "08", "09", "10", "11", "12", "13", "14", "15", "16", "17", "18", "19", "23", "24", "25", "26", "31", "38", "53", "60", "D2", "G8", "G9")),
101
+ b::Element(e::Required, "Maintenance Type Code", b::Values("001", "021", "024", "025", "030")),
102
+ b::Element(e::Situational, "Maintenance Reason Code", b::Values("01", "03", "04", "05", "06", "07", "08", "09", "10", "11", "14", "15", "16", "17", "18", "20", "21", "22", "25", "26", "27", "28", "29", "31", "32", "33", "37", "38", "39", "40", "41", "43", "59", "AA", "AB", "AC", "AD", "AE", "AF", "AG", "AH", "AI", "AJ", "AL", "EC", "XN", "XT")),
103
+ b::Element(e::Required, "Benefit Status Code", b::Values("A", "C", "S", "T")),
104
+ b::Element(e::Situational, "MEDICARE STATUS CODE",
105
+ b::Element(e::Required, "Medicare Plan Code", b::Values("A", "B", "C", "D", "E")),
106
+ b::Element(e::Situational, "Medicare Eligibility Reason Code", b::Values("0", "1", "2")),
107
+ b::Element(e::NotUsed, "Eligibility Reason Code"),
108
+ b::Element(e::NotUsed, "Eligibility Reason Code")
109
+ ),
110
+ b::Element(e::Situational, "Consolidated Omnibus Budget Reconciliation Act (COBRA) Qualifying Event Code", b::Values("1", "2", "3", "4", "5", "6", "7", "8", "9", "10", "ZZ")),
111
+ b::Element(e::Situational, "Employment Status Code", b::Values("AC", "AO", "AU", "FT", "L1", "PT", "RT", "TE")),
112
+ b::Element(e::Situational, "Student Status Code", b::Values("F", "N", "P")),
113
+ b::Element(e::Situational, "Handicap Indicator", b::Values("N", "Y")),
114
+ b::Element(e::Situational, "Date Time Period Format Qualifier", b::Values("D8")),
115
+ b::Element(e::Situational, "Member Individual Death Date"),
116
+ b::Element(e::Situational, "Confidentiality Code", b::Values("R", "U")),
117
+ b::Element(e::NotUsed, "City Name"),
118
+ b::Element(e::NotUsed, "State or Province Code"),
119
+ b::Element(e::NotUsed, "Country Code"),
120
+ b::Element(e::Situational, "Birth Sequence Number")
121
+ ),
122
+ b::Segment(200, s::REF, "Subscriber Identifier", r::Required, d::RepeatCount.bounded(1),
123
+ b::Element(e::Required, "Reference Identification Qualifier", b::Values("0F")),
124
+ b::Element(e::Required, "Subscriber Identifier", b::MaxLength(50)),
125
+ b::Element(e::NotUsed, "Description"),
126
+ b::Element(e::NotUsed, "REFERENCE IDENTIFIER")
127
+ ),
128
+ b::Segment(200, s::REF, "Member Policy Number", r::Situational, d::RepeatCount.bounded(1),
129
+ b::Element(e::Required, "Reference Identification Qualifier", b::Values("1L")),
130
+ b::Element(e::Required, "Member Group or Policy Number", b::MaxLength(50)),
131
+ b::Element(e::NotUsed, "Description"),
132
+ b::Element(e::NotUsed, "REFERENCE IDENTIFIER")
133
+ ),
134
+ b::Segment(200, s::REF, "Member Supplemental Identifier", r::Situational, d::RepeatCount.bounded(13),
135
+ b::Element(e::Required, "Reference Identification Qualifier", b::Values("17", "23", "3H", "4A", "6O", "ABB", "D3", "DX", "F6", "P5", "Q4", "QQ", "ZZ")),
136
+ b::Element(e::Required, "Member Supplemental Identifier", b::MaxLength(50)),
137
+ b::Element(e::NotUsed, "Description"),
138
+ b::Element(e::NotUsed, "REFERENCE IDENTIFIER")
139
+ ),
140
+ b::Segment(250, s::DTP, "Member Level Dates", r::Situational, d::RepeatCount.bounded(24),
141
+ b::Element(e::Required, "Date Time Qualifier", b::Values("050", "286", "296", "297", "300", "301", "303", "336", "337", "338", "339", "340", "341", "350", "351", "356", "357", "383", "385", "386", "393", "394", "473", "474")),
142
+ b::Element(e::Required, "Date Time Period Format Qualifier", b::Values("D8")),
143
+ b::Element(e::Required, "Status Information Effective Date")
144
+ ),
145
+ d::LoopDef.build("2100A - MEMBER", d::RepeatCount.bounded(1),
146
+ b::Segment(300, s::NM1, "Member Name", r::Required, d::RepeatCount.bounded(1),
147
+ b::Element(e::Required, "Entity Identifier Code", b::Values("74", "IL")),
148
+ b::Element(e::Required, "Entity Type Qualifier", b::Values("1")),
149
+ b::Element(e::Required, "Member Last Name", b::MaxLength(60)),
150
+ b::Element(e::Situational, "Member First Name", b::MaxLength(35)),
151
+ b::Element(e::Situational, "Member Middle Name", b::MaxLength(25)),
152
+ b::Element(e::Situational, "Member Name Prefix", b::MaxLength(10)),
153
+ b::Element(e::Situational, "Member Name Suffix", b::MaxLength(10)),
154
+ b::Element(e::Situational, "Identification Code Qualifier", b::Values("34", "ZZ")),
155
+ b::Element(e::Situational, "Member Identifier", b::MaxLength(80)),
156
+ b::Element(e::NotUsed, "Entity Relationship Code"),
157
+ b::Element(e::NotUsed, "Entity Identifier Code"),
158
+ b::Element(e::NotUsed, "Name Last or Organization Name")
159
+ ),
160
+ b::Segment(400, s::PER, "Member Communications Numbers", r::Situational, d::RepeatCount.bounded(1),
161
+ b::Element(e::Required, "Contact Function Code", b::Values("IP")),
162
+ b::Element(e::NotUsed, "Name"),
163
+ b::Element(e::Required, "Communication Number Qualifier", b::Values("AP", "BN", "CP", "EM", "EX", "FX", "HP", "TE", "WP")),
164
+ b::Element(e::Required, "Communication Number", b::MaxLength(256)),
165
+ b::Element(e::Situational, "Communication Number Qualifier", b::Values("AP", "BN", "CP", "EM", "EX", "FX", "HP", "TE", "WP")),
166
+ b::Element(e::Situational, "Communication Number", b::MaxLength(256)),
167
+ b::Element(e::Situational, "Communication Number Qualifier", b::Values("AP", "BN", "CP", "EM", "EX", "FX", "HP", "TE", "WP")),
168
+ b::Element(e::Situational, "Communication Number", b::MaxLength(256)),
169
+ b::Element(e::NotUsed, "Contact Inquiry Reference")
170
+ ),
171
+ b::Segment(500, s::N3, "Member Residence Street Address", r::Situational, d::RepeatCount.bounded(1),
172
+ b::Element(e::Required, "Member Address Line", b::MaxLength(55)),
173
+ b::Element(e::Situational, "Member Address Line", b::MaxLength(55))
174
+ ),
175
+ b::Segment(600, s::N4, "Member City, State, Zip Code", r::Situational, d::RepeatCount.bounded(1),
176
+ b::Element(e::Required, "Member City Name"),
177
+ b::Element(e::Situational, "Member State Code"),
178
+ b::Element(e::Situational, "Member Postal Zone or Zip Code"),
179
+ b::Element(e::Situational, "Country Code"),
180
+ b::Element(e::Situational, "Location Qualifier", b::Values("60", "CY")),
181
+ b::Element(e::Situational, "Location Identifier"),
182
+ b::Element(e::Situational, "Country Subdivision Code")
183
+ ),
184
+ b::Segment(800, s::DMG, "Member Demographics", r::Situational, d::RepeatCount.bounded(1),
185
+ b::Element(e::Required, "Date Time Period Format Qualifier", b::Values("D8")),
186
+ b::Element(e::Required, "Member Birth Date"),
187
+ b::Element(e::Required, "Gender Code", b::Values("F", "M", "U")),
188
+ b::Element(e::Situational, "Marital Status Code", b::Values("B", "D", "I", "M", "R", "S", "U", "W", "X")),
189
+ b::Element(e::Situational, "COMPOSITE RACE OR ETHNICITY INFORMATION",
190
+ b::Element(e::Situational, "Race or Ethnicity Code", b::Values("7", "8", "A", "B", "C", "D", "E", "F", "G", "H", "I", "J", "N", "O", "P", "Z")),
191
+ b::Element(e::Situational, "Code List Qualifier Code", b::Values("RET")),
192
+ b::Element(e::Situational, "Race or Ethnicity Code")
193
+ ),
194
+ b::Element(e::Situational, "Citizenship Status Code", b::Values("1", "2", "3", "4", "5", "6", "7")),
195
+ b::Element(e::NotUsed, "Country Code"),
196
+ b::Element(e::NotUsed, "Basis of Verification Code"),
197
+ b::Element(e::NotUsed, "Quantity"),
198
+ b::Element(e::Situational, "Code List Qualifier Code", b::Values("REC")),
199
+ b::Element(e::Situational, "Race or Ethnicity Collection Code")
200
+ ),
201
+ b::Segment(1000, s::EC, "Employment Class", r::Situational, d::RepeatCount.unbounded,
202
+ b::Element(e::Required, "Employment Class Code", b::Values("01", "02", "03", "04", "05", "06", "07", "08", "09", "10", "11", "12", "17", "18", "19", "20", "21", "22", "23")),
203
+ b::Element(e::Situational, "Employment Class Code", b::Values("01", "02", "03", "04", "05", "06", "07", "08", "09", "10", "11", "12", "17", "18", "19", "20", "21", "22", "23")),
204
+ b::Element(e::Situational, "Employment Class Code", b::Values("01", "02", "03", "04", "05", "06", "07", "08", "09", "10", "11", "12", "17", "18", "19", "20", "21", "22", "23")),
205
+ b::Element(e::NotUsed, "Percentage as Decimal"),
206
+ b::Element(e::NotUsed, "Information Status Code"),
207
+ b::Element(e::NotUsed, "Occupation Code")
208
+ ),
209
+ b::Segment(1100, s::ICM, "Member Income", r::Situational, d::RepeatCount.bounded(1),
210
+ b::Element(e::Required, "Frequency Code", b::Values("1", "2", "3", "4", "6", "7", "8", "9", "B", "C", "H", "Q", "S", "U")),
211
+ b::Element(e::Required, "Wage Amount"),
212
+ b::Element(e::Situational, "Work Hours Count"),
213
+ b::Element(e::Situational, "Location Identification Code"),
214
+ b::Element(e::Situational, "Salary Grade Code"),
215
+ b::Element(e::NotUsed, "Currency Code")
216
+ ),
217
+ b::Segment(1200, s::AMT, "Member Policy Amounts", r::Situational, d::RepeatCount.bounded(7),
218
+ b::Element(e::Required, "Amount Qualifier Code", b::Values("B9", "C1", "D2", "EBA", "FK", "P3", "R")),
219
+ b::Element(e::Required, "Contract Amount"),
220
+ b::Element(e::NotUsed, "Credit/Debit Flag Code")
221
+ ),
222
+ b::Segment(1300, s::HLH, "Member Health Information", r::Situational, d::RepeatCount.bounded(1),
223
+ b::Element(e::Required, "Health Related Code", b::Values("N", "S", "T", "U", "X")),
224
+ b::Element(e::Situational, "Member Height"),
225
+ b::Element(e::Situational, "Member Weight"),
226
+ b::Element(e::NotUsed, "Weight"),
227
+ b::Element(e::NotUsed, "Description"),
228
+ b::Element(e::NotUsed, "Current Health Condition Code"),
229
+ b::Element(e::NotUsed, "Description")
230
+ ),
231
+ b::Segment(1500, s::LUI, "Member Language", r::Situational, d::RepeatCount.unbounded,
232
+ b::Element(e::Situational, "Identification Code Qualifier", b::Values("LD", "LE")),
233
+ b::Element(e::Situational, "Language Code"),
234
+ b::Element(e::Situational, "Language Description"),
235
+ b::Element(e::Situational, "Language Use Indicator", b::Values("5", "6", "7", "8")),
236
+ b::Element(e::NotUsed, "Language Proficiency Indicator")
237
+ )
238
+ ),
239
+ d::LoopDef.build("2100B - INCORRECT MEMBER NAME", d::RepeatCount.bounded(1),
240
+ b::Segment(300, s::NM1, "Incorrect Member Name", r::Situational, d::RepeatCount.bounded(1),
241
+ b::Element(e::Required, "Entity Identifier Code", b::Values("70")),
242
+ b::Element(e::Required, "Entity Type Qualifier", b::Values("1")),
243
+ b::Element(e::Required, "Prior Incorrect Member Last Name"),
244
+ b::Element(e::Situational, "Prior Incorrect Member First Name"),
245
+ b::Element(e::Situational, "Prior Incorrect Member Middle Name"),
246
+ b::Element(e::Situational, "Prior Incorrect Member Name Prefix"),
247
+ b::Element(e::Situational, "Prior Incorrect Member Name Suffix"),
248
+ b::Element(e::Situational, "Identification Code Qualifier", b::Values("34", "ZZ")),
249
+ b::Element(e::Situational, "Prior Incorrect Insured Identifier"),
250
+ b::Element(e::NotUsed, "Entity Relationship Code"),
251
+ b::Element(e::NotUsed, "Entity Identifier Code"),
252
+ b::Element(e::NotUsed, "Name Last or Organization Name")
253
+ ),
254
+ b::Segment(800, s::DMG, "Incorrect Member Demographics", r::Situational, d::RepeatCount.bounded(1),
255
+ b::Element(e::Situational, "Date Time Period Format Qualifier", b::Values("D8")),
256
+ b::Element(e::Situational, "Prior Incorrect Insured Birth Date"),
257
+ b::Element(e::Situational, "Prior Incorrect Insured Gender Code", b::Values("F", "M", "U")),
258
+ b::Element(e::Situational, "Marital Status Code", b::Values("B", "D", "I", "M", "R", "S", "U", "W", "X")),
259
+ b::Element(e::Situational, "COMPOSITE RACE OR ETHNICITY INFORMATION",
260
+ b::Element(e::Situational, "Race or Ethnicity Code"),
261
+ b::Element(e::Situational, "Code List Qualifier Code"),
262
+ b::Element(e::Situational, "Race or Ethnicity Code")
263
+ ),
264
+ b::Element(e::Situational, "Citizenship Status Code"),
265
+ b::Element(e::NotUsed, "Country Code"),
266
+ b::Element(e::NotUsed, "Basis of Verification Code"),
267
+ b::Element(e::NotUsed, "Quantity"),
268
+ b::Element(e::Situational, "Code List Qualifier Code"),
269
+ b::Element(e::Situational, "Race or Ethnicity Collection Code")
270
+ )
271
+ ),
272
+ d::LoopDef.build("2100C - MEMBER MAILING ADDRESS", d::RepeatCount.bounded(1),
273
+ b::Segment(300, s::NM1, "Member Mailing Address", r::Situational, d::RepeatCount.bounded(1),
274
+ b::Element(e::Required, "Entity Identifier Code", b::Values("31")),
275
+ b::Element(e::Required, "Entity Type Qualifier", b::Values("1")),
276
+ b::Element(e::NotUsed, "Name Last or Organization Name"),
277
+ b::Element(e::NotUsed, "Name First"),
278
+ b::Element(e::NotUsed, "Name Middle"),
279
+ b::Element(e::NotUsed, "Name Prefix"),
280
+ b::Element(e::NotUsed, "Name Suffix"),
281
+ b::Element(e::NotUsed, "Identification Code Qualifier"),
282
+ b::Element(e::NotUsed, "Identification Code"),
283
+ b::Element(e::NotUsed, "Entity Relationship Code"),
284
+ b::Element(e::NotUsed, "Entity Identifier Code"),
285
+ b::Element(e::NotUsed, "Name Last or Organization Name")
286
+ ),
287
+ b::Segment(500, s::N3, "Member Mail Street Address", r::Required, d::RepeatCount.bounded(1),
288
+ b::Element(e::Required, "Member Address Line", b::MaxLength(55)),
289
+ b::Element(e::Situational, "Member Address Line", b::MaxLength(55))
290
+ ),
291
+ b::Segment(600, s::N4, "Member Mail City, State, Zip Code", r::Situational, d::RepeatCount.bounded(1),
292
+ b::Element(e::Required, "Member Mail City Name"),
293
+ b::Element(e::Situational, "Member Mail State Code"),
294
+ b::Element(e::Situational, "Member Mail Postal Zone or Zip Code"),
295
+ b::Element(e::Situational, "Country Code"),
296
+ b::Element(e::NotUsed, "Location Qualifier"),
297
+ b::Element(e::NotUsed, "Location Identifier"),
298
+ b::Element(e::Situational, "Country Subdivision Code")
299
+ )
300
+ ),
301
+ d::LoopDef.build("2100D - MEMBER EMPLOYER", d::RepeatCount.bounded(3),
302
+ b::Segment(300, s::NM1, "Member Employer", r::Situational, d::RepeatCount.bounded(1),
303
+ b::Element(e::Required, "Entity Identifier Code", b::Values("36")),
304
+ b::Element(e::Required, "Entity Type Qualifier", b::Values("1", "2")),
305
+ b::Element(e::Situational, "Member Employer Name"),
306
+ b::Element(e::Situational, "Member Employer First Name"),
307
+ b::Element(e::Situational, "Member Employer Middle Name"),
308
+ b::Element(e::Situational, "Member Employer Name Prefix"),
309
+ b::Element(e::Situational, "Member Employer Name Suffix"),
310
+ b::Element(e::Situational, "Identification Code Qualifier", b::Values("24", "34")),
311
+ b::Element(e::Situational, "Member Employer Identifier"),
312
+ b::Element(e::NotUsed, "Entity Relationship Code"),
313
+ b::Element(e::NotUsed, "Entity Identifier Code"),
314
+ b::Element(e::NotUsed, "Name Last or Organization Name")
315
+ ),
316
+ b::Segment(400, s::PER, "Member Employer Communications Numbers", r::Situational, d::RepeatCount.bounded(1),
317
+ b::Element(e::Required, "Contact Function Code", b::Values("EP")),
318
+ b::Element(e::Situational, "Member Employer Communications Contact Name"),
319
+ b::Element(e::Required, "Communication Number Qualifier", b::Values("AP", "BN", "CP", "EM", "EX", "FX", "TE")),
320
+ b::Element(e::Required, "Communication Number", b::MaxLength(256)),
321
+ b::Element(e::Situational, "Communication Number Qualifier", b::Values("AP", "BN", "CP", "EM", "EX", "FX", "TE")),
322
+ b::Element(e::Situational, "Communication Number", b::MaxLength(256)),
323
+ b::Element(e::Situational, "Communication Number Qualifier", b::Values("AP", "BN", "CP", "EM", "EX", "FX", "TE")),
324
+ b::Element(e::Situational, "Communication Number", b::MaxLength(256)),
325
+ b::Element(e::NotUsed, "Contact Inquiry Reference")
326
+ ),
327
+ b::Segment(500, s::N3, "Member Employer Street Address", r::Situational, d::RepeatCount.bounded(1),
328
+ b::Element(e::Required, "Member Employer Address Line", b::MaxLength(55)),
329
+ b::Element(e::Situational, "Member Employer Address Line", b::MaxLength(55))
330
+ ),
331
+ b::Segment(600, s::N4, "Member Employer City, State, Zip Code", r::Situational, d::RepeatCount.bounded(1),
332
+ b::Element(e::Required, "Member Employer City Name"),
333
+ b::Element(e::Situational, "Member Employer State Code"),
334
+ b::Element(e::Situational, "Member Employer Postal Zone or Zip Code"),
335
+ b::Element(e::Situational, "Country Code"),
336
+ b::Element(e::NotUsed, "Location Qualifier"),
337
+ b::Element(e::NotUsed, "Location Identifier"),
338
+ b::Element(e::Situational, "Country Subdivision Code")
339
+ )
340
+ ),
341
+ d::LoopDef.build("2100E - MEMBER SCHOOL", d::RepeatCount.bounded(3),
342
+ b::Segment(300, s::NM1, "Member School", r::Situational, d::RepeatCount.bounded(1),
343
+ b::Element(e::Required, "Entity Identifier Code", b::Values("M8")),
344
+ b::Element(e::Required, "Entity Type Qualifier", b::Values("2")),
345
+ b::Element(e::Required, "School Name"),
346
+ b::Element(e::NotUsed, "Name First"),
347
+ b::Element(e::NotUsed, "Name Middle"),
348
+ b::Element(e::NotUsed, "Name Prefix"),
349
+ b::Element(e::NotUsed, "Name Suffix"),
350
+ b::Element(e::NotUsed, "Identification Code Qualifier"),
351
+ b::Element(e::NotUsed, "Identification Code"),
352
+ b::Element(e::NotUsed, "Entity Relationship Code"),
353
+ b::Element(e::NotUsed, "Entity Identifier Code"),
354
+ b::Element(e::NotUsed, "Name Last or Organization Name")
355
+ ),
356
+ b::Segment(400, s::PER, "Member School Communications Numbers", r::Situational, d::RepeatCount.bounded(1),
357
+ b::Element(e::Required, "Contact Function Code", b::Values("SK")),
358
+ b::Element(e::Situational, "Member School Communications Contact Name"),
359
+ b::Element(e::Required, "Communication Number Qualifier", b::Values("EM", "EX", "FX", "TE")),
360
+ b::Element(e::Required, "Communication Number", b::MaxLength(256)),
361
+ b::Element(e::Situational, "Communication Number Qualifier", b::Values("EM", "EX", "FX", "TE")),
362
+ b::Element(e::Situational, "Communication Number", b::MaxLength(256)),
363
+ b::Element(e::Situational, "Communication Number Qualifier", b::Values("EM", "EX", "FX", "TE")),
364
+ b::Element(e::Situational, "Communication Number", b::MaxLength(256)),
365
+ b::Element(e::NotUsed, "Contact Inquiry Reference")
366
+ ),
367
+ b::Segment(500, s::N3, "Member School Street Address", r::Situational, d::RepeatCount.bounded(1),
368
+ b::Element(e::Required, "School Address Line", b::MaxLength(55)),
369
+ b::Element(e::Situational, "School Address Line", b::MaxLength(55))
370
+ ),
371
+ b::Segment(600, s::N4, "Member School City, State, Zip Code", r::Situational, d::RepeatCount.bounded(1),
372
+ b::Element(e::Required, "Member School City Name"),
373
+ b::Element(e::Situational, "Member School State Code"),
374
+ b::Element(e::Situational, "Member School Postal Zone or Zip Code"),
375
+ b::Element(e::Situational, "Country Code"),
376
+ b::Element(e::NotUsed, "Location Qualifier"),
377
+ b::Element(e::NotUsed, "Location Identifier"),
378
+ b::Element(e::Situational, "Country Subdivision Code")
379
+ )
380
+ ),
381
+ d::LoopDef.build("2100F - CUSTODIAL PARENT", d::RepeatCount.bounded(1),
382
+ b::Segment(300, s::NM1, "Custodial Parent", r::Situational, d::RepeatCount.bounded(1),
383
+ b::Element(e::Required, "Entity Identifier Code", b::Values("S3")),
384
+ b::Element(e::Required, "Entity Type Qualifier", b::Values("1")),
385
+ b::Element(e::Required, "Custodial Parent Last Name"),
386
+ b::Element(e::Required, "Custodial Parent First Name"),
387
+ b::Element(e::Situational, "Custodial Parent Middle Name"),
388
+ b::Element(e::Situational, "Custodial Parent Name Prefix"),
389
+ b::Element(e::Situational, "Custodial Parent Name Suffix"),
390
+ b::Element(e::Situational, "Identification Code Qualifier", b::Values("34", "ZZ")),
391
+ b::Element(e::Situational, "Custodial Parent Identifier"),
392
+ b::Element(e::NotUsed, "Entity Relationship Code"),
393
+ b::Element(e::NotUsed, "Entity Identifier Code"),
394
+ b::Element(e::NotUsed, "Name Last or Organization Name")
395
+ ),
396
+ b::Segment(400, s::PER, "Custodial Parent Communications Numbers", r::Situational, d::RepeatCount.bounded(1),
397
+ b::Element(e::Required, "Contact Function Code", b::Values("PQ")),
398
+ b::Element(e::NotUsed, "Name"),
399
+ b::Element(e::Required, "Communication Number Qualifier", b::Values("AP", "BN", "CP", "EM", "EX", "FX", "HP", "TE", "WP")),
400
+ b::Element(e::Required, "Communication Number", b::MaxLength(256)),
401
+ b::Element(e::Situational, "Communication Number Qualifier", b::Values("AP", "BN", "CP", "EM", "EX", "FX", "HP", "TE", "WP")),
402
+ b::Element(e::Situational, "Communication Number", b::MaxLength(256)),
403
+ b::Element(e::Situational, "Communication Number Qualifier", b::Values("AP", "BN", "CP", "EM", "EX", "FX", "HP", "TE", "WP")),
404
+ b::Element(e::Situational, "Communication Number", b::MaxLength(256)),
405
+ b::Element(e::NotUsed, "Contact Inquiry Reference")
406
+ ),
407
+ b::Segment(500, s::N3, "Custodial Parent Street Address", r::Situational, d::RepeatCount.bounded(1),
408
+ b::Element(e::Required, "Custodial Parent Address Line", b::MaxLength(55)),
409
+ b::Element(e::Situational, "Custodial Parent Address Line", b::MaxLength(55))
410
+ ),
411
+ b::Segment(600, s::N4, "Custodial Parent City, State, Zip Code", r::Situational, d::RepeatCount.bounded(1),
412
+ b::Element(e::Required, "Custodial Parent City Name"),
413
+ b::Element(e::Situational, "Custodial Parent State Code"),
414
+ b::Element(e::Situational, "Custodial Parent Postal Zone or Zip Code"),
415
+ b::Element(e::Situational, "Country Code"),
416
+ b::Element(e::NotUsed, "Location Qualifier"),
417
+ b::Element(e::NotUsed, "Location Identifier"),
418
+ b::Element(e::Situational, "Country Subdivision Code")
419
+ )
420
+ ),
421
+ d::LoopDef.build("2100G - RESPONSIBLE PERSON", d::RepeatCount.bounded(13),
422
+ b::Segment(300, s::NM1, "Responsible Person", r::Situational, d::RepeatCount.bounded(1),
423
+ b::Element(e::Required, "Entity Identifier Code", b::Values("6Y", "9K", "E1", "EI", "EXS", "GB", "GD", "J6", "LR", "QD", "S1", "TZ", "X4")),
424
+ b::Element(e::Required, "Entity Type Qualifier", b::Values("1")),
425
+ b::Element(e::Required, "Responsible Party Last or Organization Name"),
426
+ b::Element(e::Situational, "Responsible Party First Name"),
427
+ b::Element(e::Situational, "Responsible Party Middle Name"),
428
+ b::Element(e::Situational, "Responsible Party Name Prefix"),
429
+ b::Element(e::Situational, "Responsible Party Name Suffix"),
430
+ b::Element(e::Situational, "Identification Code Qualifier", b::Values("34", "ZZ")),
431
+ b::Element(e::Situational, "Responsible Party Identifier"),
432
+ b::Element(e::NotUsed, "Entity Relationship Code"),
433
+ b::Element(e::NotUsed, "Entity Identifier Code"),
434
+ b::Element(e::NotUsed, "Name Last or Organization Name")
435
+ ),
436
+ b::Segment(400, s::PER, "Responsible Person Communications Numbers", r::Situational, d::RepeatCount.bounded(1),
437
+ b::Element(e::Required, "Contact Function Code", b::Values("RP")),
438
+ b::Element(e::NotUsed, "Name"),
439
+ b::Element(e::Required, "Communication Number Qualifier", b::Values("AP", "BN", "CP", "EM", "EX", "FX", "HP", "TE", "WP")),
440
+ b::Element(e::Required, "Communication Number", b::MaxLength(256)),
441
+ b::Element(e::Situational, "Communication Number Qualifier", b::Values("AP", "BN", "CP", "EM", "EX", "FX", "HP", "TE", "WP")),
442
+ b::Element(e::Situational, "Communication Number", b::MaxLength(256)),
443
+ b::Element(e::Situational, "Communication Number Qualifier", b::Values("AP", "BN", "CP", "EM", "EX", "FX", "HP", "TE", "WP")),
444
+ b::Element(e::Situational, "Communication Number", b::MaxLength(256)),
445
+ b::Element(e::NotUsed, "Contact Inquiry Reference")
446
+ ),
447
+ b::Segment(500, s::N3, "Responsible Person Street Address", r::Situational, d::RepeatCount.bounded(1),
448
+ b::Element(e::Required, "Responsible Party Address Line", b::MaxLength(55)),
449
+ b::Element(e::Situational, "Responsible Party Address Line", b::MaxLength(55))
450
+ ),
451
+ b::Segment(600, s::N4, "Responsible Person City, State, Zip Code", r::Situational, d::RepeatCount.bounded(1),
452
+ b::Element(e::Required, "Responsible Person City Name"),
453
+ b::Element(e::Situational, "Responsible Person State Code"),
454
+ b::Element(e::Situational, "Responsible Person Postal Zone or Zip Code"),
455
+ b::Element(e::Situational, "Country Code"),
456
+ b::Element(e::NotUsed, "Location Qualifier"),
457
+ b::Element(e::NotUsed, "Location Identifier"),
458
+ b::Element(e::Situational, "Country Subdivision Code")
459
+ )
460
+ ),
461
+ d::LoopDef.build("2100H - DROP OFF LOCATION", d::RepeatCount.bounded(1),
462
+ b::Segment(300, s::NM1, "Drop Off Location", r::Situational, d::RepeatCount.bounded(1),
463
+ b::Element(e::Required, "Entity Identifier Code", b::Values("45")),
464
+ b::Element(e::Required, "Entity Type Qualifier", b::Values("1")),
465
+ b::Element(e::Situational, "Name Last or Organization Name"),
466
+ b::Element(e::Situational, "Name First"),
467
+ b::Element(e::Situational, "Name Middle"),
468
+ b::Element(e::Situational, "Name Prefix"),
469
+ b::Element(e::Situational, "Name Suffix"),
470
+ b::Element(e::NotUsed, "Identification Code Qualifier"),
471
+ b::Element(e::NotUsed, "Identification Code"),
472
+ b::Element(e::NotUsed, "Entity Relationship Code"),
473
+ b::Element(e::NotUsed, "Entity Identifier Code"),
474
+ b::Element(e::NotUsed, "Name Last or Organization Name")
475
+ ),
476
+ b::Segment(500, s::N3, "Drop Off Location Street Address", r::Situational, d::RepeatCount.bounded(1),
477
+ b::Element(e::Required, "Drop Off Location Address Line", b::MaxLength(55)),
478
+ b::Element(e::Situational, "Drop Off Location Address Line", b::MaxLength(55))
479
+ ),
480
+ b::Segment(600, s::N4, "Drop Off Location City, State, Zip Code", r::Situational, d::RepeatCount.bounded(1),
481
+ b::Element(e::Required, "Drop Off Location City Name"),
482
+ b::Element(e::Situational, "Drop Off Location State Code"),
483
+ b::Element(e::Situational, "Drop Off Location Postal Zone or Zip Code"),
484
+ b::Element(e::Situational, "Country Code"),
485
+ b::Element(e::NotUsed, "Location Qualifier"),
486
+ b::Element(e::NotUsed, "Location Identifier"),
487
+ b::Element(e::Situational, "Country Subdivision Code")
488
+ )
489
+ ),
490
+ d::LoopDef.build("2200 - DISABILITY INFORMATION", d::RepeatCount.unbounded,
491
+ b::Segment(2000, s::DSB, "Disability Information", r::Situational, d::RepeatCount.bounded(1),
492
+ b::Element(e::Required, "Disability Type Code", b::Values("1", "2", "3", "4")),
493
+ b::Element(e::NotUsed, "Quantity"),
494
+ b::Element(e::NotUsed, "Occupation Code"),
495
+ b::Element(e::NotUsed, "Work Intensity Code"),
496
+ b::Element(e::NotUsed, "Product Option Code"),
497
+ b::Element(e::NotUsed, "Monetary Amount"),
498
+ b::Element(e::Situational, "Product or Service ID Qualifier", b::Values("DX", "ZZ")),
499
+ b::Element(e::Situational, "Diagnosis Code")
500
+ ),
501
+ b::Segment(2100, s::DTP, "Disability Eligibility Dates", r::Situational, d::RepeatCount.bounded(2),
502
+ b::Element(e::Required, "Date Time Qualifier", b::Values("360", "361")),
503
+ b::Element(e::Required, "Date Time Period Format Qualifier", b::Values("D8")),
504
+ b::Element(e::Required, "Disability Eligibility Date")
505
+ )
506
+ ),
507
+ d::LoopDef.build("2300 - HEALTH COVERAGE", d::RepeatCount.bounded(99),
508
+ b::Segment(2600, s::HD, "Health Coverage", r::Situational, d::RepeatCount.bounded(1),
509
+ b::Element(e::Required, "Maintenance Type Code", b::Values("001", "002", "021", "024", "025", "026", "030", "032")),
510
+ b::Element(e::NotUsed, "Maintenance Reason Code"),
511
+ 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")),
512
+ b::Element(e::Situational, "Plan Coverage Description"),
513
+ 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")),
514
+ b::Element(e::NotUsed, "Count"),
515
+ b::Element(e::NotUsed, "Count"),
516
+ b::Element(e::NotUsed, "Underwriting Decision Code"),
517
+ b::Element(e::Situational, "Late Enrollment Indicator"),
518
+ b::Element(e::NotUsed, "Drug House Code"),
519
+ b::Element(e::NotUsed, "Yes/No Condition or Response Code")
520
+ ),
521
+ b::Segment(2700, s::DTP, "Health Coverage Dates", r::Required, d::RepeatCount.bounded(6),
522
+ b::Element(e::Required, "Date Time Qualifier", b::Values("300", "303", "343", "348", "349", "543", "695")),
523
+ b::Element(e::Required, "Date Time Period Format Qualifier", b::Values("D8", "RD8")),
524
+ b::Element(e::Required, "Coverage Period")
525
+ ),
526
+ b::Segment(2800, s::AMT, "Health Coverage Policy", r::Situational, d::RepeatCount.bounded(9),
527
+ b::Element(e::Required, "Amount Qualifier Code", b::Values("B9", "C1", "D2", "EBA", "FK", "P3", "R")),
528
+ b::Element(e::Required, "Contract Amount"),
529
+ b::Element(e::NotUsed, "Credit/Debit Flag Code")
530
+ ),
531
+ b::Segment(2900, s::REF, "Health Coverage Policy Number", r::Situational, d::RepeatCount.bounded(14),
532
+ b::Element(e::Required, "Reference Identification Qualifier", b::Values("17", "1L", "9V", "CE", "E8", "M7", "PID", "RB", "X9", "XM", "XX1", "XX2", "ZX", "ZZ")),
533
+ b::Element(e::Required, "Member Group or Policy Number", b::MaxLength(50)),
534
+ b::Element(e::NotUsed, "Description"),
535
+ b::Element(e::NotUsed, "REFERENCE IDENTIFIER")
536
+ ),
537
+ b::Segment(2900, s::REF, "Prior Coverage Months", r::Situational, d::RepeatCount.bounded(1),
538
+ b::Element(e::Required, "Reference Identification Qualifier", b::Values("QQ")),
539
+ b::Element(e::Required, "Prior Coverage Month Count", b::MaxLength(50)),
540
+ b::Element(e::NotUsed, "Description"),
541
+ b::Element(e::NotUsed, "REFERENCE IDENTIFIER")
542
+ ),
543
+ b::Segment(3000, s::IDC, "Identification Card", r::Situational, d::RepeatCount.bounded(3),
544
+ b::Element(e::Required, "Plan Coverage Description"),
545
+ b::Element(e::Required, "Identification Card Type Code", b::Values("D", "H", "P")),
546
+ b::Element(e::Situational, "Identification Card Count"),
547
+ b::Element(e::Situational, "Action Code", b::Values("1", "2", "RX"))
548
+ ),
549
+ d::LoopDef.build("2310 - PROVIDER INFORMATION", d::RepeatCount.bounded(30),
550
+ b::Segment(3100, s::LX, "Provider Information", r::Situational, d::RepeatCount.bounded(1),
551
+ b::Element(e::Required, "Assigned Number")
552
+ ),
553
+ b::Segment(3200, s::NM1, "Provider Name", r::Required, d::RepeatCount.bounded(1),
554
+ b::Element(e::Required, "Entity Identifier Code", b::Values("1X", "3D", "80", "FA", "OD", "P3", "QA", "QN", "Y2")),
555
+ b::Element(e::Required, "Entity Type Qualifier", b::Values("1", "2")),
556
+ b::Element(e::Situational, "Provider Last or Organization Name"),
557
+ b::Element(e::Situational, "Provider First Name"),
558
+ b::Element(e::Situational, "Provider Middle Name"),
559
+ b::Element(e::Situational, "Provider Name Prefix"),
560
+ b::Element(e::Situational, "Provider Name Suffix"),
561
+ b::Element(e::Situational, "Identification Code Qualifier", b::Values("34", "FI", "SV", "XX")),
562
+ b::Element(e::Situational, "Provider Identifier"),
563
+ b::Element(e::Required, "Entity Relationship Code", b::Values("25", "26", "72")),
564
+ b::Element(e::NotUsed, "Entity Identifier Code"),
565
+ b::Element(e::NotUsed, "Name Last or Organization Name")
566
+ ),
567
+ b::Segment(3500, s::N3, "Provider Address", r::Situational, d::RepeatCount.bounded(2),
568
+ b::Element(e::Required, "Provider Address Line", b::MaxLength(55)),
569
+ b::Element(e::Situational, "Provider Address Line", b::MaxLength(55))
570
+ ),
571
+ b::Segment(3600, s::N4, "Provider City, State, Zip Code", r::Situational, d::RepeatCount.bounded(1),
572
+ b::Element(e::Required, "Provider City Name"),
573
+ b::Element(e::Situational, "Provider State Code"),
574
+ b::Element(e::Situational, "Provider Postal Zone or Zip Code"),
575
+ b::Element(e::Situational, "Country Code"),
576
+ b::Element(e::NotUsed, "Location Qualifier"),
577
+ b::Element(e::NotUsed, "Location Identifier"),
578
+ b::Element(e::Situational, "Country Subdivision Code")
579
+ ),
580
+ b::Segment(3700, s::PER, "Provider Communications Numbers", r::Situational, d::RepeatCount.bounded(2),
581
+ b::Element(e::Required, "Contact Function Code", b::Values("IC")),
582
+ b::Element(e::NotUsed, "Name"),
583
+ b::Element(e::Required, "Communication Number Qualifier", b::Values("AP", "BN", "CP", "EM", "EX", "FX", "HP", "TE", "WP")),
584
+ b::Element(e::Required, "Communication Number", b::MaxLength(256)),
585
+ b::Element(e::Situational, "Communication Number Qualifier", b::Values("AP", "BN", "CP", "EM", "EX", "FX", "HP", "TE", "WP")),
586
+ b::Element(e::Situational, "Communication Number", b::MaxLength(256)),
587
+ b::Element(e::Situational, "Communication Number Qualifier", b::Values("AP", "BN", "CP", "EM", "EX", "FX", "HP", "TE", "WP")),
588
+ b::Element(e::Situational, "Communication Number", b::MaxLength(256)),
589
+ b::Element(e::NotUsed, "Contact Inquiry Reference")
590
+ ),
591
+ b::Segment(3950, s::PLA, "Provider Change Reason", r::Situational, d::RepeatCount.bounded(1),
592
+ b::Element(e::Required, "Action Code", b::Values("2")),
593
+ b::Element(e::Required, "Entity Identifier Code", b::Values("1P")),
594
+ b::Element(e::Required, "Provider Effective Date"),
595
+ b::Element(e::NotUsed, "Time"),
596
+ b::Element(e::Required, "Maintenance Reason Code", b::Values("14", "22", "46", "AA", "AB", "AC", "AD", "AE", "AF", "AG", "AH", "AI", "AJ"))
597
+ )
598
+ ),
599
+ d::LoopDef.build("2320 - COORDINATION OF BENEFITS", d::RepeatCount.bounded(5),
600
+ b::Segment(4000, s::COB, "Coordination of Benefits", r::Situational, d::RepeatCount.bounded(1),
601
+ b::Element(e::Required, "Payer Responsibility Sequence Number Code", b::Values("P", "S", "T", "U")),
602
+ b::Element(e::Situational, "Member Group or Policy Number", b::MaxLength(50)),
603
+ b::Element(e::Required, "Coordination of Benefits Code", b::Values("1", "5", "6")),
604
+ b::Element(e::Situational, "Service Code", b::Values("1", "35", "48", "50", "54", "89", "90", "A4", "AG", "AL", "BB"))
605
+ ),
606
+ b::Segment(4050, s::REF, "Additional Coordination of Benefits Identifiers", r::Situational, d::RepeatCount.bounded(4),
607
+ b::Element(e::Required, "Reference Identification Qualifier", b::Values("60", "6P", "SY", "ZZ")),
608
+ b::Element(e::Required, "Member Group or Policy Number", b::MaxLength(50)),
609
+ b::Element(e::NotUsed, "Description"),
610
+ b::Element(e::NotUsed, "REFERENCE IDENTIFIER")
611
+ ),
612
+ b::Segment(4070, s::DTP, "Coordination of Benefits Eligibility Dates", r::Situational, d::RepeatCount.bounded(2),
613
+ b::Element(e::Required, "Date Time Qualifier", b::Values("344", "345")),
614
+ b::Element(e::Required, "Date Time Period Format Qualifier", b::Values("D8")),
615
+ b::Element(e::Required, "Coordination of Benefits Date")
616
+ ),
617
+ d::LoopDef.build("2330 - COORDINATION OF BENEFITS RELATED ENTITY", d::RepeatCount.bounded(3),
618
+ b::Segment(4100, s::NM1, "Coordination of Benefits Related Entity", r::Situational, d::RepeatCount.bounded(1),
619
+ b::Element(e::Required, "Entity Identifier Code", b::Values("36", "GW", "IN")),
620
+ b::Element(e::Required, "Entity Type Qualifier", b::Values("2")),
621
+ b::Element(e::Situational, "Coordination of Benefits Insurer Name"),
622
+ b::Element(e::NotUsed, "Name First"),
623
+ b::Element(e::NotUsed, "Name Middle"),
624
+ b::Element(e::NotUsed, "Name Prefix"),
625
+ b::Element(e::NotUsed, "Name Suffix"),
626
+ b::Element(e::Situational, "Identification Code Qualifier", b::Values("FI", "NI", "XV")),
627
+ b::Element(e::Situational, "Coordination of Benefits Insurer Identification Code"),
628
+ b::Element(e::NotUsed, "Entity Relationship Code"),
629
+ b::Element(e::NotUsed, "Entity Identifier Code"),
630
+ b::Element(e::NotUsed, "Name Last or Organization Name")
631
+ ),
632
+ b::Segment(4300, s::N3, "Coordination of Benefits Related Entity Address", r::Situational, d::RepeatCount.bounded(1),
633
+ b::Element(e::Required, "Address Information", b::MaxLength(55)),
634
+ b::Element(e::Situational, "Address Information", b::MaxLength(55))
635
+ ),
636
+ b::Segment(4400, s::N4, "Coordination of Benefits Other Insurance Company City, State, Zip Code", r::Situational, d::RepeatCount.bounded(1),
637
+ b::Element(e::Required, "Coordination of Benefits Other Insurance Company City Name"),
638
+ b::Element(e::Situational, "Coordination of Benefits Other Insurance Company State Code"),
639
+ b::Element(e::Situational, "Coordination of Benefits Other Insurance Company Postal Zone or Zip Code"),
640
+ b::Element(e::Situational, "Country Code"),
641
+ b::Element(e::NotUsed, "Location Qualifier"),
642
+ b::Element(e::NotUsed, "Location Identifier"),
643
+ b::Element(e::Situational, "Country Subdivision Code")
644
+ ),
645
+ b::Segment(4500, s::PER, "Administrative Communications Contact", r::Situational, d::RepeatCount.bounded(1),
646
+ b::Element(e::Required, "Contact Function Code", b::Values("CN")),
647
+ b::Element(e::NotUsed, "Name"),
648
+ b::Element(e::Required, "Communication Number Qualifier", b::Values("TE")),
649
+ b::Element(e::Required, "Communication Number", b::MaxLength(256)),
650
+ b::Element(e::NotUsed, "Communication Number Qualifier"),
651
+ b::Element(e::NotUsed, "Communication Number"),
652
+ b::Element(e::NotUsed, "Communication Number Qualifier"),
653
+ b::Element(e::NotUsed, "Communication Number"),
654
+ b::Element(e::NotUsed, "Contact Inquiry Reference")
655
+ )
656
+ )
657
+ )
658
+ ),
659
+ d::LoopDef.build("2700 - ADDITIONAL REPORTING CATEGORIES", d::RepeatCount.bounded(1),
660
+ b::Segment(6880, s::LS, "Additional Reporting Categories", r::Situational, d::RepeatCount.bounded(1),
661
+ b::Element(e::Required, "Loop Identifier Code", b::Values("2700"))
662
+ ),
663
+ d::LoopDef.build("2710 - MEMBER REPORTING CATEGORIES", d::RepeatCount.unbounded,
664
+ b::Segment(6881, s::LX, "Member Reporting Categories", r::Situational, d::RepeatCount.bounded(1),
665
+ b::Element(e::Required, "Assigned Number")
666
+ ),
667
+ d::LoopDef.build("2750 - REPORTING CATEGORY", d::RepeatCount.bounded(1),
668
+ b::Segment(6882, s::N1, "Reporting Category", r::Situational, d::RepeatCount.bounded(1),
669
+ b::Element(e::Required, "Entity Identifier Code", b::Values("75")),
670
+ b::Element(e::Required, "Member Reporting Category Name", b::MaxLength(60)),
671
+ b::Element(e::NotUsed, "Identification Code Qualifier"),
672
+ b::Element(e::NotUsed, "Identification Code"),
673
+ b::Element(e::NotUsed, "Entity Relationship Code"),
674
+ b::Element(e::NotUsed, "Entity Identifier Code")
675
+ ),
676
+ b::Segment(6883, s::REF, "Reporting Category Reference", r::Situational, d::RepeatCount.bounded(16),
677
+ b::Element(e::Required, "Reference Identification Qualifier", b::Values("00", "17", "18", "19", "26", "3L", "6M", "9V", "9X", "GE", "LU", "PID", "XX1", "XX2", "YY", "ZZ")),
678
+ b::Element(e::Required, "Member Reporting Category Reference ID", b::MaxLength(50)),
679
+ b::Element(e::NotUsed, "Description"),
680
+ b::Element(e::NotUsed, "REFERENCE IDENTIFIER")
681
+ ),
682
+ b::Segment(6884, s::DTP, "Reporting Category Date", r::Situational, d::RepeatCount.bounded(1),
683
+ b::Element(e::Required, "Date Time Qualifier", b::Values("007")),
684
+ b::Element(e::Required, "Date Time Period Format Qualifier", b::Values("D8", "RD8")),
685
+ b::Element(e::Required, "Member Reporting Category Effective Date(s)", b::MaxLength(35))
686
+ )
687
+ )
688
+ ),
689
+ b::Segment(6885, s::LE, "Additional Reporting Categories Loop Termination", r::Situational, d::RepeatCount.bounded(1),
690
+ b::Element(e::Required, "Loop Identifier Code", b::Values("2700"))
691
+ )
692
+ )
693
+ ),
694
+ repeatable: false
695
+ ),
696
+
697
+ # This structure doesn't match the specification, but it does ensure
698
+ # that the first occurrence of SE terminates the transaction set.
699
+ d::TableDef.summary("Table 3 - Summary",
700
+ b::Segment(6900, s::SE, "Transaction Set Trailer", r::Required, d::RepeatCount.bounded(1),
701
+ b::Element(e::Required, "Transaction Segment Count"),
702
+ b::Element(e::Required, "Transaction Set Control Number")
703
+ )
704
+ )
705
+ )
706
+ end
707
+ end
708
+ end
709
+ end