pd_x12 1.4.3 → 1.4.4

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml ADDED
@@ -0,0 +1,15 @@
1
+ ---
2
+ !binary "U0hBMQ==":
3
+ metadata.gz: !binary |-
4
+ ZGYwMjJhMzE3ZTllNDU4MzI5N2NlZDhhYjY5MDE1ZGUzNmU4YWMzMQ==
5
+ data.tar.gz: !binary |-
6
+ MjlhMWRiMDgyZmRhMWMzOTlhZWEzNmQwZmI3NjhhZTc0ZmI1NjRiMQ==
7
+ !binary "U0hBNTEy":
8
+ metadata.gz: !binary |-
9
+ NWJmY2IxY2MxZjJjY2Q4OTdmYjk3YWYzNTE2YzJhMDkwMWFkZDM4MTNiZmEx
10
+ YzA2MjMzNmQwNjVhNjY4YzRhNjk1MmI0ZjJjMzY3NGRiMTdlN2M1ODY1MGE0
11
+ NTc1ZWEyOWU1MjlhYTc1OWIxMWRjMjQyNGVlYzQxODg0OTIyMDY=
12
+ data.tar.gz: !binary |-
13
+ YmIyNjVmNmVmYzU0YjA0MTg2ZGIxMDVlODMyMjhmOTY0MWM2OGE4ZWM3Yjgx
14
+ OGJjNDRkYjMwYjQ1YzUxMWIxZWE1YjYxMDMxOThjNjU5YzNhYjU5YThhM2Q3
15
+ NDVjZGQ5MTZhOTkzZTA5NjYxNDNiYTI2YjA1MDQ4MDZmMzk1MzQ=
data/README.md CHANGED
@@ -24,7 +24,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
24
24
 
25
25
  Add this line to your application's Gemfile:
26
26
 
27
- gem 'PD_x12'
27
+ gem 'pd_x12'
28
28
 
29
29
  And then execute:
30
30
 
@@ -32,9 +32,9 @@ And then execute:
32
32
 
33
33
  Or install it yourself as:
34
34
 
35
- $ gem install PD_x12
35
+ $ gem install pd_x12
36
+
36
37
 
37
- To initialize in Rails 3.2 application, in your config/initializers directory, create a file called x12.rb and add the line: require 'x12' to it.
38
38
 
39
39
  ## Documentation
40
40
  ### Wiki Page: https://github.com/mjpete3/x12/wiki
@@ -52,10 +52,19 @@ The authors of the project were inspired by the following works:
52
52
  * The Perl X12 parser by Prasad Poruporuthan, search.cpan.org/~prasad/X12-0.09/lib/X12/Parser.pm
53
53
  * The Ruby port of the above by Chris Parker, rubyforge.org/projects/x12-parser/
54
54
  * This project originated from App Design's X12 parser.
55
- * Project was forked by Sean Walberg, creating version 1.2.0 in April 2012.
55
+ * Project was forked by Sean Walberg, creating version 1.2.0 in April 2012.
56
+ * Project was forked by Marty Petersen in November 2012, creating pd_x12.
56
57
 
57
58
 
58
59
  # Change Log
60
+ 3/22/13 - releases 1.4.1 - 1.4.3
61
+ * Fix errors in the 835.xml file
62
+
63
+ 3/11/13 - release 1.4.0
64
+ * Added X12 definitions for 271 transaction
65
+ * Renamed the gem to be all lower case so Rails and other frameworks autoload the project as a gem
66
+ * Added an each method to segments to simplify looping through repeating segments
67
+
59
68
  1/26/13 - relesase 1.3.6
60
69
  * changed the referencing of the misc directory so that local copies of the xml definitions are not required
61
70
  * added an init.rb file in the root
data/lib/x12/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module X12
2
- VERSION = "1.4.3"
2
+ VERSION = "1.4.4"
3
3
  end
data/misc/837p.xml CHANGED
@@ -61,190 +61,188 @@
61
61
  <Segment name="REF" max="1" required="n" comment="Pay-to plan secondary id"/>
62
62
  <Segment name="REF" max="1" required="y" comment="Pay-to plan tax id"/>
63
63
  </Loop>
64
-
65
- <Loop name="L2000B" required="y">
66
- <Segment name="HL" max="1" required="y" comment="Subscriber heiarchical level"/>
67
- <Segment name="SBR" max="1" required="y" comment="subscriber information"/>
68
- <Segment name="PAT" max="1" required="n" comment="Patient information"/>
69
-
70
- <Loop name="L2010BA" max="1" required="y">
71
- <Segment name="NM1" max="1" required="y" comment="Subscriber name"/>
72
- <Segment name="N3" max="1" required="n" comment="Subscriber address"/>
73
- <Segment name="N4" max="1" required="n" comment="Subscriber city/state/zip"/>
74
- <Segment name="DMG" max="1" required="n" comment="Subscriber demographic information"/>
75
- <Segment name="REF" max="2" required="n"/>
76
- <Segment name="PER" max="1" required="n" comment="Property and casualty subscriber contact information"/>
77
- </Loop>
78
- <Loop name="L2010BB" max="1" required="y">
79
- <Segment name="NM1" max="1" required="y" comment="Payer name"/>
80
- <Segment name="N3" max="1" required="n" comment="Payer address"/>
81
- <Segment name="N4" max="1" required="n" comment="Payer city/state/zip code"/>
82
- <Segment name="REF" max="5" required="n" />
83
- </Loop>
64
+ </Loop>
65
+ <Loop name="L2000B" required="y">
66
+ <Segment name="HL" max="1" required="y" comment="Subscriber heiarchical level"/>
67
+ <Segment name="SBR" max="1" required="y" comment="subscriber information"/>
68
+ <Segment name="PAT" max="1" required="n" comment="Patient information"/>
84
69
 
85
- <Loop name="L2000C" required="n">
86
- <Segment name="HL" required="y" comment="Patient heirarchical level"/>
87
- <Segment name="PAT" required="y" comment="Patient information"/>
88
- <Loop name="L2010CA" max="1" required="n">
89
- <Segment name="NM1" max="1" required="y" comment="Patient name"/>
90
- <Segment name="N3" max="1" required="y" comment="Patient address"/>
91
- <Segment name="N4" max="1" required="y" comment="Patient city/state/zip"/>
92
- <Segment name="DMG" max="1" required="y" comment="Patient demographic information"/>
93
- <Segment name="REF" max="1" required="n" comment="Property and casualty claim number"/>
94
- <Segment name="PER" max="1" required="n" comment="Property and casualty subscriber contact information"/>
95
- </Loop>
96
- </Loop>
97
- <Loop name="L2300" max="100" required="y">
98
- <Segment name="CLM" max="1" required="y" comment="Claim information"/>
99
- <Segment name="DTP" max="16" required="n" comment="Claim Dates. Up to 16 different dates can be set for a 837p" />
100
- <Segment name="PWK" max="10" required="n" comment="Claim supplemental information" />
101
- <Segment name="CN1" max="1" required="n" comment="Contract information" />
102
- <Segment name="AMT" max="1" required="n" comment="Patient amount paid" />
103
- <Segment name="REF" max="14" required="n" comment="Claim References. Up to 14 different claim references can be set for a 837p" />
104
- <Segment name="K3" max="10" required="n" comment="File information" />
105
- <Segment name="NTE" max="1" required="n" comment="Claim note" />
106
- <Segment name="CR1" max="1" required="n" comment="Ambulance transport information" />
107
- <Segment name="CR2" max="1" required="n" comment="Spinal manipulation service information" />
108
- <Segment name="CRC" max="8" required="n" comment="Code Category. Up to 8 different CRC categories can be set for an 837p" />
109
- <Segment name="HI" max="1" required="y" comment="Healthcare diagnostic code" />
110
- <Segment name="HI" max="1" required="n" comment="Anesthesia related procedure code" />
111
- <Segment name="HI" max="2" required="n" comment="Condition information" />
112
- <Segment name="HCP" max="1" required="n" comment="Claim pricing / repricing information" />
113
-
114
- <Loop name="L2310A" max="1" required="n">
115
- <Segment name="NM1" max="1" required="y" comment="Referring provider name"/>
116
- <Segment name="REF" max="3" required="n" comment="Referring provider secondary id"/>
117
- </Loop>
118
- <Loop name="L2310B" max="1" required="n">
119
- <Segment name="NM1" max="1" required="n" comment="Rendering provider name"/>
120
- <Segment name="PRV" max="1" required="n" comment="Rendering provider specialty information"/>
121
- <Segment name="REF" max="4" required="n" comment="Rendering provider secondary id"/>
122
- </Loop>
123
- <Loop name="L2310C" required="n">
124
- <Segment name="NM1" max="1" required="y" comment="Service facility location"/>
125
- <Segment name="N3" max="1" required="y" comment="Service facility address"/>
126
- <Segment name="N4" max="1" required="y" comment="Service facility city/state/zip"/>
127
- <Segment name="REF" max="3" required="n" comment="Service facility location secondary id"/>
128
- <Segment name="PER" max="1" required="n" comment="Service facility contact information"/>
129
- </Loop>
130
- <Loop name="L2310D" max="1" required="n">
131
- <Segment name="NM1" max="1" required="n" comment="Supervising provider name"/>
132
- <Segment name="REF" max="4" required="n" comment="Supervising provider secondary id"/>
133
- </Loop>
134
- <Loop name="L2310E" max="1" required="n">
135
- <Segment name="NM1" max="1" required="y" comment="Ambulance pick up location"/>
136
- <Segment name="N3" max="1" required="y" comment="Ambulance pick up address"/>
137
- <Segment name="N4" max="1" required="y" comment="Ambulance pick up city/state/zip"/>
138
- </Loop>
139
- <Loop name="L2310F" max="1" required="n">
140
- <Segment name="NM1" max="1" required="y" comment="Ambulance dropoff location"/>
141
- <Segment name="N3" max="1" required="y" comment="Ambulance dropoff address"/>
142
- <Segment name="N4" max="1" required="y" comment="Ambulance dropoff city/state/zip"/>
143
- </Loop>
144
- <Loop name="L2320" max="10" required="n">
145
- <Segment name="SBR" max="1" required="n" comment="Other subscriber information" />
146
- <Segment name="CAS" max="5" required="n" comment="Claim level adjustment" />
147
- <Segment name="AMT" max="3" required="n" comment="Claim level adjustment amounts" />
148
- <Segment name="OI" max="1" required="y" comment="Other insurance coverage information" />
149
- <Segment name="MOA" max="1" required="n" comment="Medicare outpatient adjudication information" />
150
- </Loop>
151
- <Loop name="L2330A" max="1" required="n">
152
- <Segment name="NM1" max="1" required="y" comment="Other subscriber name"/>
153
- <Segment name="N3" max="1" required="n" comment="Other subscriber address"/>
154
- <Segment name="N4" max="1" required="y" comment="Other subscriber city/state/zip"/>
155
- <Segment name="REF" max="1" required="n" comment="Other subscriber location secondary id"/>
156
- </Loop>
157
- <Loop name="L2330B" max="1" required="n">
158
- <Segment name="NM1" max="1" required="y" comment="Other payer name" />
159
- <Segment name="N3" max="1" required="n" comment="Other payer address"/>
160
- <Segment name="N4" max="1" required="y" comment="Other payer city/state/zip"/>
161
- <Segment name="DTP" max="1" required="n" comment="Date - claim check or remittance date" />
162
- <Segment name="REF" max="6" required="n" comment="Other reference information. Up to 6 different references can be associated to an 837p" />
163
- </Loop>
164
- <Loop name="L2330CDEFG" max="6" required="n" comment="Loops 2330C through 2330G combined for inbound transactions, application needs to determine the correct loop being provided.">
165
- <Segment name="NM1" max="1" required="y" comment="Name" />
166
- <Segment name="REF" max="3" required="y" comment="Secondary id"/>
167
- </Loop>
168
- <Loop name="L2400" max="50" required="y">
169
- <Segment name="LX" max="1" required="y" comment="Service line" />
170
- <Segment name="SV1" max="1" required="y" comment="Professional service" />
171
- <Segment name="SV5" max="1" required="n" comment="Durable medical equipment service" />
172
- <Segment name="PWK" max="10" required="n" comment="Line supplemental informtion" />
173
- <Segment name="PWK" max="1" required="n" comment="Durable medical equipment certificate of medical necessity indicator" />
174
- <Segment name="CR1" max="1" required="n" comment="Ambulance transport information" />
175
- <Segment name="CR3" max="1" required="n" comment="Durable medical equipment certification" />
176
- <Segment name="CRC" max="3" required="n" comment="Ambulance certification" />
177
- <Segment name="CRC" max="1" required="n" comment="Hospice employee indicator" />
178
- <Segment name="CRC" max="1" required="n" comment="Condition indicator durable medical equipment" />
179
- <Segment name="DTP" max="1" required="y" comment="Date - service date; qualifier=472" />
180
- <Segment name="DTP" max="9" required="n" />
181
- <Segment name="QTY" max="1" required="n" comment="Ambulance patient count; qualifier=PT" />
182
- <Segment name="QTY" max="1" required="n" comment="Obstetric Anesthesia additional units; qualifier=FL" />
183
- <Segment name="MEA" max="5" required="n" comment="Test Results" />
184
- <Segment name="CN1" max="1" required="n" comment="Contract information" />
185
- <Segment name="REF" max="17" required="n" />
186
- <Segment name="AMT" max="2" required="n" />
187
- <Segment name="K3" max="10" required="n" comment="File information" />
188
- <Segment name="NTE" max="2" required="n" />
189
- <Segment name="PS1" max="1" required="n" comment="Purchasd service information" />
190
- <Segment name="HCP" max="1" required="n" comment="Line pricing/repricing information" />
191
- </Loop>
192
- <Loop name="L2410" max="1" required="n" >
193
- <Segment name="LIN" max="1" required="n" comment="Drug identification" />
194
- <Segment name="CTP" max="1" required="y" comment="Drug pricing" />
195
- <Segment name="REF" max="1" required="n" comment="Prescription or compound drug association number" />
196
- </Loop>
197
- <Loop name="L2420A" max="1" required="n" >
198
- <Segment name="NM1" max="1" required="n" comment="Rendering provider name" />
199
- <Segment name="PRV" max="1" required="n" comment="Rendering provider specialty information" />
200
- <Segment name="REF" max="20" required="n" comment="Rendering provider secondary id" />
201
- </Loop>
202
- <Loop name="L2420B" max="1" required="n" >
203
- <Segment name="NM1" max="1" required="n" comment="Purchased service provider name" />
204
- <Segment name="REF" max="20" required="n" comment="Purchased service provider secondary id" />
205
- </Loop>
206
- <Loop name="L2420C" max="1" required="n" >
207
- <Segment name="NM1" max="1" required="n" comment="Service facility location name" />
208
- <Segment name="N3" max="1" required="y" comment="Service facility location address" />
209
- <Segment name="N4" max="1" required="y" comment="Service facility location city/state/zip" />
210
- <Segment name="REF" max="3" required="n" comment="Service facility location secondary id" />
211
- </Loop>
212
- <Loop name="L2420D" max="1" required="n">
213
- <Segment name="NM1" max="1" required="n" comment="Supervising provider name" />
214
- <Segment name="REF" max="20" required="n" comment="Supervising provider secondary id" />
215
- </Loop>
216
- <Loop name="L2420E" required="n">
217
- <Segment name="NM1" max="1" required="n" comment="Ordering provider name" />
218
- <Segment name="N3" max="1" required="n" comment="Ordering provider address" />
219
- <Segment name="N4" max="1" required="y" comment="Ordering provider city/state/zip" />
220
- <Segment name="REF" max="20" required="n" comment="Ordering provider secondary id" />
221
- <Segment name="PER" max="1" required="n" comment="Ordering provider contact information" />
222
- </Loop>
223
- <Loop name="L2420F" max="2" required="n">
224
- <Segment name="NM1" max="1" required="n" comment="Refering provider name" />
225
- <Segment name="REF" max="20" required="n" comment="Refering provider secondary id" />
226
- </Loop>
227
- <Loop name="L2420G" max="1" required="n">
228
- <Segment name="NM1" max="1" required="n" comment="Ambulance pickup information" />
229
- <Segment name="N3" max="1" required="y" comment="Ambulance pickup address" />
230
- <Segment name="N4" max="1" required="y" comment="Ambulance pickup city/state/zip" />
231
- </Loop>
232
- <Loop name="L2420H" max="1" required="n">
233
- <Segment name="NM1" max="1" required="n" comment="Ambulance dropoff information" />
234
- <Segment name="N3" max="1" required="y" comment="Ambulance dropoff address" />
235
- <Segment name="N4" max="1" required="y" comment="Ambulance dropoff city/state/zip" />
236
- </Loop>
237
- <Loop name="L2430" max="15" required="n">
238
- <Segment name="SVD" max="1" required="n" comment="Line adjudication information" />
239
- <Segment name="CAS" max="5" required="n" comment="Line adjustment" />
240
- <Segment name="DTP" max="1" required="y" comment="Line check or remittance date" />
241
- <Segment name="AMT" max="1" required="n" comment="Remaining patient liability" />
242
- <Segment name="LQ" max="1" required="n" comment="Form identification code" />
243
- <Segment name="FRM" max="99" required="n" comment="Supporting documentation" />
244
- </Loop>
245
- </Loop>
70
+ <Loop name="L2010BA" max="1" required="y">
71
+ <Segment name="NM1" max="1" required="y" comment="Subscriber name"/>
72
+ <Segment name="N3" max="1" required="n" comment="Subscriber address"/>
73
+ <Segment name="N4" max="1" required="n" comment="Subscriber city/state/zip"/>
74
+ <Segment name="DMG" max="1" required="n" comment="Subscriber demographic information"/>
75
+ <Segment name="REF" max="2" required="n"/>
76
+ <Segment name="PER" max="1" required="n" comment="Property and casualty subscriber contact information"/>
77
+ </Loop>
78
+ <Loop name="L2010BB" max="1" required="y">
79
+ <Segment name="NM1" max="1" required="y" comment="Payer name"/>
80
+ <Segment name="N3" max="1" required="n" comment="Payer address"/>
81
+ <Segment name="N4" max="1" required="n" comment="Payer city/state/zip code"/>
82
+ <Segment name="REF" max="5" required="n" />
246
83
  </Loop>
247
84
  </Loop>
85
+ <Loop name="L2000C" required="n">
86
+ <Segment name="HL" required="y" comment="Patient heirarchical level"/>
87
+ <Segment name="PAT" required="y" comment="Patient information"/>
88
+ <Loop name="L2010CA" max="1" required="n">
89
+ <Segment name="NM1" max="1" required="y" comment="Patient name"/>
90
+ <Segment name="N3" max="1" required="y" comment="Patient address"/>
91
+ <Segment name="N4" max="1" required="y" comment="Patient city/state/zip"/>
92
+ <Segment name="DMG" max="1" required="y" comment="Patient demographic information"/>
93
+ <Segment name="REF" max="1" required="n" comment="Property and casualty claim number"/>
94
+ <Segment name="PER" max="1" required="n" comment="Property and casualty subscriber contact information"/>
95
+ </Loop>
96
+ </Loop>
97
+ <Loop name="L2300" max="100" required="y">
98
+ <Segment name="CLM" max="1" required="y" comment="Claim information"/>
99
+ <Segment name="DTP" max="16" required="n" comment="Claim Dates. Up to 16 different dates can be set for a 837p" />
100
+ <Segment name="PWK" max="10" required="n" comment="Claim supplemental information" />
101
+ <Segment name="CN1" max="1" required="n" comment="Contract information" />
102
+ <Segment name="AMT" max="1" required="n" comment="Patient amount paid" />
103
+ <Segment name="REF" max="14" required="n" comment="Claim References. Up to 14 different claim references can be set for a 837p" />
104
+ <Segment name="K3" max="10" required="n" comment="File information" />
105
+ <Segment name="NTE" max="1" required="n" comment="Claim note" />
106
+ <Segment name="CR1" max="1" required="n" comment="Ambulance transport information" />
107
+ <Segment name="CR2" max="1" required="n" comment="Spinal manipulation service information" />
108
+ <Segment name="CRC" max="8" required="n" comment="Code Category. Up to 8 different CRC categories can be set for an 837p" />
109
+ <Segment name="HI" max="1" required="y" comment="Healthcare diagnostic code" />
110
+ <Segment name="HI" max="1" required="n" comment="Anesthesia related procedure code" />
111
+ <Segment name="HI" max="2" required="n" comment="Condition information" />
112
+ <Segment name="HCP" max="1" required="n" comment="Claim pricing / repricing information" />
113
+
114
+ <Loop name="L2310A" max="1" required="n">
115
+ <Segment name="NM1" max="1" required="y" comment="Referring provider name"/>
116
+ <Segment name="REF" max="3" required="n" comment="Referring provider secondary id"/>
117
+ </Loop>
118
+ <Loop name="L2310B" max="1" required="n">
119
+ <Segment name="NM1" max="1" required="n" comment="Rendering provider name"/>
120
+ <Segment name="PRV" max="1" required="n" comment="Rendering provider specialty information"/>
121
+ <Segment name="REF" max="4" required="n" comment="Rendering provider secondary id"/>
122
+ </Loop>
123
+ <Loop name="L2310C" required="n">
124
+ <Segment name="NM1" max="1" required="y" comment="Service facility location"/>
125
+ <Segment name="N3" max="1" required="y" comment="Service facility address"/>
126
+ <Segment name="N4" max="1" required="y" comment="Service facility city/state/zip"/>
127
+ <Segment name="REF" max="3" required="n" comment="Service facility location secondary id"/>
128
+ <Segment name="PER" max="1" required="n" comment="Service facility contact information"/>
129
+ </Loop>
130
+ <Loop name="L2310D" max="1" required="n">
131
+ <Segment name="NM1" max="1" required="n" comment="Supervising provider name"/>
132
+ <Segment name="REF" max="4" required="n" comment="Supervising provider secondary id"/>
133
+ </Loop>
134
+ <Loop name="L2310E" max="1" required="n">
135
+ <Segment name="NM1" max="1" required="y" comment="Ambulance pick up location"/>
136
+ <Segment name="N3" max="1" required="y" comment="Ambulance pick up address"/>
137
+ <Segment name="N4" max="1" required="y" comment="Ambulance pick up city/state/zip"/>
138
+ </Loop>
139
+ <Loop name="L2310F" max="1" required="n">
140
+ <Segment name="NM1" max="1" required="y" comment="Ambulance dropoff location"/>
141
+ <Segment name="N3" max="1" required="y" comment="Ambulance dropoff address"/>
142
+ <Segment name="N4" max="1" required="y" comment="Ambulance dropoff city/state/zip"/>
143
+ </Loop>
144
+ <Loop name="L2320" max="10" required="n">
145
+ <Segment name="SBR" max="1" required="n" comment="Other subscriber information" />
146
+ <Segment name="CAS" max="5" required="n" comment="Claim level adjustment" />
147
+ <Segment name="AMT" max="3" required="n" comment="Claim level adjustment amounts" />
148
+ <Segment name="OI" max="1" required="y" comment="Other insurance coverage information" />
149
+ <Segment name="MOA" max="1" required="n" comment="Medicare outpatient adjudication information" />
150
+ </Loop>
151
+ <Loop name="L2330A" max="1" required="n">
152
+ <Segment name="NM1" max="1" required="y" comment="Other subscriber name"/>
153
+ <Segment name="N3" max="1" required="n" comment="Other subscriber address"/>
154
+ <Segment name="N4" max="1" required="y" comment="Other subscriber city/state/zip"/>
155
+ <Segment name="REF" max="1" required="n" comment="Other subscriber location secondary id"/>
156
+ </Loop>
157
+ <Loop name="L2330B" max="1" required="n">
158
+ <Segment name="NM1" max="1" required="y" comment="Other payer name" />
159
+ <Segment name="N3" max="1" required="n" comment="Other payer address"/>
160
+ <Segment name="N4" max="1" required="y" comment="Other payer city/state/zip"/>
161
+ <Segment name="DTP" max="1" required="n" comment="Date - claim check or remittance date" />
162
+ <Segment name="REF" max="6" required="n" comment="Other reference information. Up to 6 different references can be associated to an 837p" />
163
+ </Loop>
164
+ <Loop name="L2330CDEFG" max="6" required="n" comment="Loops 2330C through 2330G combined for inbound transactions, application needs to determine the correct loop being provided.">
165
+ <Segment name="NM1" max="1" required="y" comment="Name" />
166
+ <Segment name="REF" max="3" required="y" comment="Secondary id"/>
167
+ </Loop>
168
+ <Loop name="L2400" max="50" required="y">
169
+ <Segment name="LX" max="1" required="y" comment="Service line" />
170
+ <Segment name="SV1" max="1" required="y" comment="Professional service" />
171
+ <Segment name="SV5" max="1" required="n" comment="Durable medical equipment service" />
172
+ <Segment name="PWK" max="10" required="n" comment="Line supplemental informtion" />
173
+ <Segment name="PWK" max="1" required="n" comment="Durable medical equipment certificate of medical necessity indicator" />
174
+ <Segment name="CR1" max="1" required="n" comment="Ambulance transport information" />
175
+ <Segment name="CR3" max="1" required="n" comment="Durable medical equipment certification" />
176
+ <Segment name="CRC" max="3" required="n" comment="Ambulance certification" />
177
+ <Segment name="CRC" max="1" required="n" comment="Hospice employee indicator" />
178
+ <Segment name="CRC" max="1" required="n" comment="Condition indicator durable medical equipment" />
179
+ <Segment name="DTP" max="1" required="y" comment="Date - service date; qualifier=472" />
180
+ <Segment name="DTP" max="9" required="n" />
181
+ <Segment name="QTY" max="1" required="n" comment="Ambulance patient count; qualifier=PT" />
182
+ <Segment name="QTY" max="1" required="n" comment="Obstetric Anesthesia additional units; qualifier=FL" />
183
+ <Segment name="MEA" max="5" required="n" comment="Test Results" />
184
+ <Segment name="CN1" max="1" required="n" comment="Contract information" />
185
+ <Segment name="REF" max="17" required="n" />
186
+ <Segment name="AMT" max="2" required="n" />
187
+ <Segment name="K3" max="10" required="n" comment="File information" />
188
+ <Segment name="NTE" max="2" required="n" />
189
+ <Segment name="PS1" max="1" required="n" comment="Purchasd service information" />
190
+ <Segment name="HCP" max="1" required="n" comment="Line pricing/repricing information" />
191
+ </Loop>
192
+ <Loop name="L2410" max="1" required="n" >
193
+ <Segment name="LIN" max="1" required="n" comment="Drug identification" />
194
+ <Segment name="CTP" max="1" required="y" comment="Drug pricing" />
195
+ <Segment name="REF" max="1" required="n" comment="Prescription or compound drug association number" />
196
+ </Loop>
197
+ <Loop name="L2420A" max="1" required="n" >
198
+ <Segment name="NM1" max="1" required="n" comment="Rendering provider name" />
199
+ <Segment name="PRV" max="1" required="n" comment="Rendering provider specialty information" />
200
+ <Segment name="REF" max="20" required="n" comment="Rendering provider secondary id" />
201
+ </Loop>
202
+ <Loop name="L2420B" max="1" required="n" >
203
+ <Segment name="NM1" max="1" required="n" comment="Purchased service provider name" />
204
+ <Segment name="REF" max="20" required="n" comment="Purchased service provider secondary id" />
205
+ </Loop>
206
+ <Loop name="L2420C" max="1" required="n" >
207
+ <Segment name="NM1" max="1" required="n" comment="Service facility location name" />
208
+ <Segment name="N3" max="1" required="y" comment="Service facility location address" />
209
+ <Segment name="N4" max="1" required="y" comment="Service facility location city/state/zip" />
210
+ <Segment name="REF" max="3" required="n" comment="Service facility location secondary id" />
211
+ </Loop>
212
+ <Loop name="L2420D" max="1" required="n">
213
+ <Segment name="NM1" max="1" required="n" comment="Supervising provider name" />
214
+ <Segment name="REF" max="20" required="n" comment="Supervising provider secondary id" />
215
+ </Loop>
216
+ <Loop name="L2420E" required="n">
217
+ <Segment name="NM1" max="1" required="n" comment="Ordering provider name" />
218
+ <Segment name="N3" max="1" required="n" comment="Ordering provider address" />
219
+ <Segment name="N4" max="1" required="y" comment="Ordering provider city/state/zip" />
220
+ <Segment name="REF" max="20" required="n" comment="Ordering provider secondary id" />
221
+ <Segment name="PER" max="1" required="n" comment="Ordering provider contact information" />
222
+ </Loop>
223
+ <Loop name="L2420F" max="2" required="n">
224
+ <Segment name="NM1" max="1" required="n" comment="Refering provider name" />
225
+ <Segment name="REF" max="20" required="n" comment="Refering provider secondary id" />
226
+ </Loop>
227
+ <Loop name="L2420G" max="1" required="n">
228
+ <Segment name="NM1" max="1" required="n" comment="Ambulance pickup information" />
229
+ <Segment name="N3" max="1" required="y" comment="Ambulance pickup address" />
230
+ <Segment name="N4" max="1" required="y" comment="Ambulance pickup city/state/zip" />
231
+ </Loop>
232
+ <Loop name="L2420H" max="1" required="n">
233
+ <Segment name="NM1" max="1" required="n" comment="Ambulance dropoff information" />
234
+ <Segment name="N3" max="1" required="y" comment="Ambulance dropoff address" />
235
+ <Segment name="N4" max="1" required="y" comment="Ambulance dropoff city/state/zip" />
236
+ </Loop>
237
+ <Loop name="L2430" max="15" required="n">
238
+ <Segment name="SVD" max="1" required="n" comment="Line adjudication information" />
239
+ <Segment name="CAS" max="5" required="n" comment="Line adjustment" />
240
+ <Segment name="DTP" max="1" required="y" comment="Line check or remittance date" />
241
+ <Segment name="AMT" max="1" required="n" comment="Remaining patient liability" />
242
+ <Segment name="LQ" max="1" required="n" comment="Form identification code" />
243
+ <Segment name="FRM" max="99" required="n" comment="Supporting documentation" />
244
+ </Loop>
245
+ </Loop>
248
246
  <Segment name="SE" required="y" />
249
247
  </Loop>
250
248
  <Segment name="GE" max="1" required="y"/>
data/misc/850.xml ADDED
@@ -0,0 +1,66 @@
1
+ <!--
2
+ This file is part of the X12Parser library that provides tools to
3
+ manipulate X12 messages using Ruby native syntax.
4
+
5
+ Copyright (C) 2013 P&D Technology Solutions, LLC.
6
+
7
+ This library is free software; you can redistribute it and/or
8
+ modify it under the terms of the GNU Lesser General Public
9
+ License as published by the Free Software Foundation; either
10
+ version 2.1 of the License, or (at your option) any later version.
11
+
12
+ This library is distributed in the hope that it will be useful,
13
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
14
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15
+ Lesser General Public License for more details.
16
+
17
+ You should have received a copy of the GNU Lesser General Public
18
+ License along with this library; if not, write to the Free Software
19
+ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
20
+
21
+ $Id: 850dsd.xml 85 2013-03-22 19:17:51Z mjp $
22
+ -->
23
+
24
+ <Definition>
25
+ <Loop name="850" comment="This X12 Transaction Set contains the format and establishes the data contents of the Functional Acknowledgment Transaction Set (850) for use within the context of an Electronic Data Interchange (EDI) environment. The transaction set can be used to define the control structures for a set of acknowledgments to indicate the results of the syntactical analysis of the electronically encoded documents. The encoded documents are the transaction sets, which are grouped in functional groups, used in defining transactions for business data interchange. This standard does not cover the semantic meaning of the information encoded in the transaction sets.">
26
+ <Segment name="ISA" max="1" required="y" />
27
+ <Segment name="GS" max="1" required="y" />
28
+ <Segment name="ST" max="1" required="y">
29
+ <Field name="TransactionSetIdentifierCode" const="850" min="3" max="3" comment="Code uniquely identifying a Transaction Set"/>
30
+ <Field name="TransactionSetControlNumber" min="4" max="9" comment="Identifying control number that must be unique within the transaction set functional group assigned by the originator for a transaction set"/>
31
+ </Segment>
32
+ <Segment name="BEG" max="1" required="y" comment="Beginning segment for purchase order" />
33
+ <Segment name="PER" max="3" required="n" comment="Administrative communication contact" />
34
+ <Segment name="FOB" max="inf" required="n" comment="FOB related instructions" />
35
+ <Segment name="DTM" max="10" required="n" comment="Date/Time Reference" />
36
+ <Segment name="PKG" max="200" required="n" comment="Marking, Packaging, Loading" />
37
+ <Segment name="TD5" max="inf" required="n" comment="Carrier details (routing sequence / transit time)" />
38
+ <Loop name="N9" max="1000" required="n">
39
+ <Segment name="N9" max="1" required="n" comment="Extended reference information" />
40
+ <Segment name="MTX" max="inf" required="n" comment="Text" />
41
+ </Loop>
42
+ <Loop name="N1" max="200" required="n">
43
+ <Segment name="N1" max="1" required="n" comment="Party identification" />
44
+ <Segment name="N3" max="2" required="n" comment="Party location" />
45
+ <Segment name="N4" max="inf" required="n" comment="Geographic location" />
46
+ </Loop>
47
+ <Loop name="PO1" max="100000">
48
+ <Segment name="PO1" max="1" required="y" comment="Baseline item detail" />
49
+ <Loop name="PID" max="1000" required="n">
50
+ <Segment name="PID" max="1" required="n" comment="Product/item description" />
51
+ </Loop>
52
+ <Segment name="PO4" max="inf" required="n" comment="Item physical details" />
53
+ <Loop segment="SAC" max="25" required="n">
54
+ <Segment name="SAC" max="1" required="n" comment="Service, promotion, allowance or charge information" />
55
+ </Loop>
56
+ <Segment name="TAX" max="inf" required="n" comment="Tax reference" />
57
+ </Loop>
58
+ <Loop segment="CTT">
59
+ <Segment name="CTT" max="1" required="n" comment="Transaction totals" />
60
+ <Segment name="AMT" max="1" required="n" comment="Monetary Amount" />
61
+ </Loop>
62
+ <Segment name="SE" max="1" required="y"/>
63
+ <Segment name="GE" max="1" required="y"/>
64
+ <Segment name="IEA" max="1" required="y"/>
65
+ </Loop>
66
+ </Definition>
data/misc/850dsd.xml ADDED
@@ -0,0 +1,59 @@
1
+ <!--
2
+ This file is part of the X12Parser library that provides tools to
3
+ manipulate X12 messages using Ruby native syntax.
4
+
5
+ Copyright (C) 2013 P&D Technology Solutions, LLC.
6
+
7
+ This library is free software; you can redistribute it and/or
8
+ modify it under the terms of the GNU Lesser General Public
9
+ License as published by the Free Software Foundation; either
10
+ version 2.1 of the License, or (at your option) any later version.
11
+
12
+ This library is distributed in the hope that it will be useful,
13
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
14
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15
+ Lesser General Public License for more details.
16
+
17
+ You should have received a copy of the GNU Lesser General Public
18
+ License along with this library; if not, write to the Free Software
19
+ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
20
+
21
+ $Id: 850dsd.xml 85 2013-03-22 19:17:51Z mjp $
22
+ -->
23
+
24
+ <Definition>
25
+ <Loop name="850" comment="This X12 Transaction Set contains the format and establishes the data contents of the Functional Acknowledgment Transaction Set (850) for use within the context of an Electronic Data Interchange (EDI) environment. The transaction set can be used to define the control structures for a set of acknowledgments to indicate the results of the syntactical analysis of the electronically encoded documents. The encoded documents are the transaction sets, which are grouped in functional groups, used in defining transactions for business data interchange. This standard does not cover the semantic meaning of the information encoded in the transaction sets.">
26
+ <Segment name="ISA" max="1" required="y" />
27
+ <Segment name="GS" max="1" required="y" />
28
+ <Segment name="ST" max="1" required="y">
29
+ <Field name="TransactionSetIdentifierCode" const="850" min="3" max="3" comment="Code uniquely identifying a Transaction Set"/>
30
+ <Field name="TransactionSetControlNumber" min="4" max="9" comment="Identifying control number that must be unique within the transaction set functional group assigned by the originator for a transaction set"/>
31
+ </Segment>
32
+ <Segment name="BEG" max="1" required="y" comment="Beginning segment for purchase order" />
33
+ <Segment name="DTM" max="10" required="n" comment="Date/Time Reference" />
34
+ <Loop name="N9" max="1000" required="n">
35
+ <Segment name="N9" max="1" required="n" comment="Extended reference information" />
36
+ </Loop>
37
+ <Loop name="N1" max="200" required="n">
38
+ <Segment name="N1" max="1" required="n" comment="Party identification" />
39
+ <Segment name="N3" max="2" required="n" comment="Party location" />
40
+ <Segment name="N4" max="inf" required="n" comment="Geographic location" />
41
+ </Loop>
42
+ <Loop name="PO1" max="100000">
43
+ <Segment name="PO1" max="1" required="y" comment="Baseline item detail" />
44
+ <Loop name="PID" max="1000">
45
+ <Segment name="PID" max="1" required="n" comment="Product/item description" />
46
+ </Loop>
47
+ <Segment name="PO4" max="inf" required="n" comment="Item physical details" />
48
+ <Loop segment="N9" max="1000">
49
+ <Segment name="N9" max="1" required="n" comment="Extended reference information" />
50
+ </Loop>
51
+ </Loop>
52
+ <Loop segment="CTT">
53
+ <Segment name="CTT" max="1" required="n"comment="Transaction totals" />
54
+ </Loop>
55
+ <Segment name="SE" max="1" required="y"/>
56
+ <Segment name="GE" max="1" required="y"/>
57
+ <Segment name="IEA" max="1" required="y"/>
58
+ </Loop>
59
+ </Definition>
metadata CHANGED
@@ -1,8 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: pd_x12
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.4.3
5
- prerelease:
4
+ version: 1.4.4
6
5
  platform: ruby
7
6
  authors:
8
7
  - App Design, Inc.
@@ -11,7 +10,7 @@ authors:
11
10
  autorequire:
12
11
  bindir: bin
13
12
  cert_chain: []
14
- date: 2013-03-21 00:00:00.000000000 Z
13
+ date: 2013-03-24 00:00:00.000000000 Z
15
14
  dependencies: []
16
15
  description: ! 'A gem to handle parsing and generation of ANSI X12 documents. Currently
17
16
  tested with Ruby >= 1.9.2. Gem supports X12 EDI transactions 270, 997, 837p and
@@ -49,6 +48,8 @@ files:
49
48
  - misc/271.xml
50
49
  - misc/835.xml
51
50
  - misc/837p.xml
51
+ - misc/850.xml
52
+ - misc/850dsd.xml
52
53
  - misc/997.xml
53
54
  - misc/997single.xml
54
55
  - misc/999.xml
@@ -1880,27 +1881,26 @@ files:
1880
1881
  homepage: https://github.com/mjpete3/x12
1881
1882
  licenses:
1882
1883
  - GPL-2
1884
+ metadata: {}
1883
1885
  post_install_message:
1884
1886
  rdoc_options: []
1885
1887
  require_paths:
1886
1888
  - lib
1887
1889
  required_ruby_version: !ruby/object:Gem::Requirement
1888
- none: false
1889
1890
  requirements:
1890
1891
  - - ! '>='
1891
1892
  - !ruby/object:Gem::Version
1892
1893
  version: '0'
1893
1894
  required_rubygems_version: !ruby/object:Gem::Requirement
1894
- none: false
1895
1895
  requirements:
1896
1896
  - - ! '>='
1897
1897
  - !ruby/object:Gem::Version
1898
1898
  version: '0'
1899
1899
  requirements: []
1900
1900
  rubyforge_project:
1901
- rubygems_version: 1.8.24
1901
+ rubygems_version: 2.0.2
1902
1902
  signing_key:
1903
- specification_version: 3
1903
+ specification_version: 4
1904
1904
  summary: A gem to handle parsing and generation of ANSI X12 documents
1905
1905
  test_files:
1906
1906
  - test/tc_factory_270.rb