pd_x12 1.4.6 → 1.4.7
Sign up to get free protection for your applications and to get access to all the features.
- data/README.md +6 -2
- data/lib/x12/version.rb +1 -1
- data/misc/276.xml +93 -0
- data/misc/277.xml +95 -0
- data/misc/835.xml +20 -18
- data/misc/997.xml +3 -3
- data/test/tc_factory_276.rb +42 -0
- data/test/tc_factory_277.rb +43 -0
- data/test/tc_parse_276.rb +151 -0
- data/test/tc_parse_277.rb +128 -0
- metadata +17 -6
- checksums.yaml +0 -15
- data/misc/835oa.xml +0 -83
data/README.md
CHANGED
@@ -57,9 +57,13 @@ The authors of the project were inspired by the following works:
|
|
57
57
|
|
58
58
|
|
59
59
|
# Change Log
|
60
|
+
9/14/13 - release 1.4.7
|
61
|
+
* Added 276 / 277 transaction messages
|
62
|
+
* Fixed issue with 835.xml file
|
63
|
+
|
60
64
|
4/15/13 - release 1.4.5
|
61
|
-
*
|
62
|
-
*
|
65
|
+
* Factories now enforce minimum sizes - wbajzek contributed
|
66
|
+
* 270Interchange.xml updated ST segment's field list - wbajzek contributed
|
63
67
|
* Test updated for minimum size - wbajzek contributed
|
64
68
|
|
65
69
|
3/22/13 - releases 1.4.1 - 1.4.3
|
data/lib/x12/version.rb
CHANGED
data/misc/276.xml
ADDED
@@ -0,0 +1,93 @@
|
|
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) 2012, 2013 P&D Technical 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: 835.xml 2013-06-08 mjp using version 5010 $
|
22
|
+
Non-standard implementation of the 835 transaction
|
23
|
+
Allows for multiple ST/SE segments
|
24
|
+
-->
|
25
|
+
|
26
|
+
<Definition>
|
27
|
+
<Loop name="276" required="y">
|
28
|
+
<Segment name="ISA" max="1" required="y"/>
|
29
|
+
<Segment name="GS" max="1" required="y"/>
|
30
|
+
<Loop name="L276" max="inf" comment="This X12 Transaction Set contains the format and establishes the data contents of the Professional Healthcare Status Request and Response (276) for use within the context of an Electronic Data Interchange (EDI) environment.">
|
31
|
+
<Segment name="ST" max="1" required="y"/>
|
32
|
+
<Segment name="BHT" max="1" required="y" comment="Beginning Hierarchical Transaction"/>
|
33
|
+
<Loop name="L2000A" max="inf" required="y" comment="Information Source Level">
|
34
|
+
<Segment name="HL" max="1" required="y" comment="Information Source Level"/>
|
35
|
+
<Loop name="L2100A" max="1" required="y" comment="Payer Name">
|
36
|
+
<Segment name="NM1" max="1" required="y" comment="Payer Name" />
|
37
|
+
<Segment name="PER" max="1" required="n" comment="Payer Contact information" />
|
38
|
+
</Loop>
|
39
|
+
</Loop>
|
40
|
+
<Loop name="L2000B" max="inf" comment="Information Receiver Level">
|
41
|
+
<Segment name="HL" max="1" required="y" comment="Information Receiver Level" />
|
42
|
+
<Loop name="L2100B" max="inf" comment="Information Receiver Name">
|
43
|
+
<Segment name="NM1" max="1" required="y" comment="Information Receiver Name" />
|
44
|
+
</Loop>
|
45
|
+
</Loop>
|
46
|
+
<Loop name="L2000C" max="inf" comment="Service Provider Level">
|
47
|
+
<Segment name="HL" max="1" required="y" comment="Service Provider Level" />
|
48
|
+
<Loop name="L2100C" max="inf" comment="Provider Name" >
|
49
|
+
<Segment name="NM1" max="1" required="y" comment="Provider Name" />
|
50
|
+
</Loop>
|
51
|
+
</Loop>
|
52
|
+
<Loop name="L2000D" max="inf" comment="Subscriber Level">
|
53
|
+
<Segment name="HL" max="1" required="y" comment="Subscriber Level" />
|
54
|
+
<Segment name="DMG" max="1" required="n" comment="Subscriber Demographic Information" />
|
55
|
+
<Loop name="L2100D" max="inf" comment="Subscriber Name">
|
56
|
+
<Segment name="NM1" max="1" required="y" comment="Subscriber Name" />
|
57
|
+
</Loop>
|
58
|
+
<Loop name="L2200D" max="inf" comment="Claim Submitter Trace">
|
59
|
+
<Segment name="TRN" max="1" required="y" comment="Claim Submitter Trace Number" />
|
60
|
+
<Segment name="REF" max="3" required="n" />
|
61
|
+
<Segment name="AMT" max="1" required="n" comment="Claim Submitted Charges" />
|
62
|
+
<Segment name="DTP" max="1" required="n" comment="Claim Service Date" />
|
63
|
+
<Loop name="L2210D" max="inf" comment="Service Line Information">
|
64
|
+
<Segment name="SVC" max="1" required="n" comment="Service Line Information" />
|
65
|
+
<Segment name="REF" max="1" required="n" comment="Service Line Item Identifiaction" />
|
66
|
+
<Segment name="DTP" max="1" required="Y" comment="Service Line Date" />
|
67
|
+
</Loop>
|
68
|
+
</Loop>
|
69
|
+
</Loop>
|
70
|
+
<Loop name="L2000E" max="inf" comment="Dependent Level">
|
71
|
+
<Segment name="HL" max="1" required="y" comment="Dependent Level" />
|
72
|
+
<Segment name="DMG" max="1" required="n" comment="Dependent Demographic Information" />
|
73
|
+
<Loop name="L2100E" max="inf" comment="Dependent Name">
|
74
|
+
<Segment name="NM1" max="1" required="y" comment="Dependent Name" />
|
75
|
+
</Loop>
|
76
|
+
<Loop name="L2200E" max="inf" comment="Claim Submitter Trace Number">
|
77
|
+
<Segment name="TRN" max="1" required="y" comment="Claim Subimtter Trace Number" />
|
78
|
+
<Segment name="REF" max="3" required="n" />
|
79
|
+
<Segment name="AMT" max="1" required="n" comment="Claim Submitted Charges" />
|
80
|
+
<Segment name="DTP" max="1" required="n" comment="CLaim Service Date" />
|
81
|
+
<Loop name="L2210E" max="inf" comment="Service Line Information">
|
82
|
+
<Segment name="SVC" max="1" required="n" comment="Service Line Information" />
|
83
|
+
<Segment name="REF" max="1" required="n" comment="Service Line Item Identification" />
|
84
|
+
<Segment name="DTP" max="1" required="y" comment="Service Line Date" />
|
85
|
+
</Loop>
|
86
|
+
</Loop>
|
87
|
+
</Loop>
|
88
|
+
<Segment name="SE" required="y" />
|
89
|
+
</Loop>
|
90
|
+
<Segment name="GE" max="1" required="y"/>
|
91
|
+
<Segment name="IEA" max="1" required="y"/>
|
92
|
+
</Loop>
|
93
|
+
</Definition>
|
data/misc/277.xml
ADDED
@@ -0,0 +1,95 @@
|
|
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) 2012, 2013 P&D Technical 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: 835OA.xml 2013-06-08 mjp using version 5010 $
|
22
|
+
Non-standard implementation of the 835 transaction
|
23
|
+
Allows for multiple ST/SE segments
|
24
|
+
-->
|
25
|
+
|
26
|
+
<Definition>
|
27
|
+
<Loop name="277" required="y">
|
28
|
+
<Segment name="ISA" max="1" required="y" />
|
29
|
+
<Segment name="GS" max="1" required="y" />
|
30
|
+
<Loop name="L277" max="inf" comment="This X12 Transaction Set contains the format and establishes the data contents of the Professional Healthcare Status Request and Response (277) for use within the context of an Electronic Data Interchange (EDI) environment.">
|
31
|
+
<Segment name="ST" max="1" required="y" />
|
32
|
+
<Segment name="BHT" max="1" required="y" comment="Beginning Hierarchical Transaction"/>
|
33
|
+
<Loop name="L2000A" max="inf" required="y" comment="Information Source Level">
|
34
|
+
<Segment name="HL" max="1" required="y" comment="Information Source Level" />
|
35
|
+
<Loop name="L2100A" max="1" required="y" comment="Payer Name">
|
36
|
+
<Segment name="NM1" max="1" required="y" comment="Payer Name" />
|
37
|
+
<Segment name="PER" max="1" required="n" comment="Payer Contact information" />
|
38
|
+
</Loop>
|
39
|
+
</Loop>
|
40
|
+
<Loop name="L2000B" max="inf" comment="Information Receiver Level">
|
41
|
+
<Segment name="HL" max="1" required="y" comment="Information Receiver Level" />
|
42
|
+
<Loop name="L2100B" max="inf" comment="Information Receiver Name">
|
43
|
+
<Segment name="NM1" max="1" required="y" comment="Information Receiver Name" />
|
44
|
+
</Loop>
|
45
|
+
</Loop>
|
46
|
+
<Loop name="L2000C" max="inf" comment="Service Provider Level">
|
47
|
+
<Segment name="HL" max="1" required="y" comment="Service Provider Level" />
|
48
|
+
<Loop name="L2100C" max="inf" comment="Provider Name" >
|
49
|
+
<Segment name="NM1" max="1" required="y" comment="Provider Name" />
|
50
|
+
</Loop>
|
51
|
+
</Loop>
|
52
|
+
<Loop name="L2000D" max="inf" comment="Subscriber Level">
|
53
|
+
<Segment name="HL" max="1" required="y" comment="Subscriber Level" />
|
54
|
+
<Segment name="DMG" max="1" required="y" comment="Subscriber Demographic Information" />
|
55
|
+
<Loop name="L2100D" max="inf" comment="Subscriber Name">
|
56
|
+
<Segment name="NM1" max="1" required="y" comment="Subscriber Name" />
|
57
|
+
</Loop>
|
58
|
+
<Loop name="L2200D" max="inf" comment="Claim Submitter Trace">
|
59
|
+
<Segment name="TRN" max="1" required="y" comment="Claim Submitter Trace Number" />
|
60
|
+
<Segment name="STC" max="1" required="y" comment="Claim Level Status Information" />
|
61
|
+
<Segment name="REF" max="3" required="n" />
|
62
|
+
<Segment name="DTP" max="1" required="n" comment="Claim Service Date" />
|
63
|
+
<Loop name="L2220D" max="inf" comment="Service Line Information">
|
64
|
+
<Segment name="SVC" max="1" required="n" comment="Service Line Information" />
|
65
|
+
<Segment name="STC" max="1" required="n" comment="Service Line Status Information" />
|
66
|
+
<Segment name="REF" max="1" required="n" comment="Service Line Item Identifiaction" />
|
67
|
+
<Segment name="DTP" max="1" required="Y" comment="Service Line Date" />
|
68
|
+
</Loop>
|
69
|
+
</Loop>
|
70
|
+
</Loop>
|
71
|
+
<Loop name="L2000E" max="inf" comment="Dependent Level">
|
72
|
+
<Segment name="HL" max="1" required="n" comment="Dependent Level" />
|
73
|
+
<Segment name="DMG" max="1" required="y" comment="Dependent Demographic Information" />
|
74
|
+
<Loop name="L2100E" max="inf" comment="Dependent Name">
|
75
|
+
<Segment name="NM1" max="1" required="y" comment="Dependent Name" />
|
76
|
+
</Loop>
|
77
|
+
<Loop name="L2200E" max="inf" comment="Claim Submitter Trace Number">
|
78
|
+
<Segment name="TRN" max="1" required="y" comment="Claim Subimtter Trace Number" />
|
79
|
+
<Segment name="STC" max="1" required="y" comment="Claim Level Status Information" />
|
80
|
+
<Segment name="REF" max="3" required="y" />
|
81
|
+
<Segment name="DTP" max="1" required="n" comment="CLaim Service Date" />
|
82
|
+
<Loop name="L2220E" max="inf" comment="Service Line Information">
|
83
|
+
<Segment name="SVC" max="1" required="n" comment="Service Line Information" />
|
84
|
+
<Segment name="STC" max="1" required="n" comment="Service Line Status Information" />
|
85
|
+
<Segment name="REF" max="1" required="n" comment="Service Line Item Identification" />
|
86
|
+
<Segment name="DTP" max="1" required="n" comment="Service Line Date" />
|
87
|
+
</Loop>
|
88
|
+
</Loop>
|
89
|
+
</Loop>
|
90
|
+
<Segment name="SE" required="y" />
|
91
|
+
</Loop>
|
92
|
+
<Segment name="GE" max="1" required="y"/>
|
93
|
+
<Segment name="IEA" max="1" required="y"/>
|
94
|
+
</Loop>
|
95
|
+
</Definition>
|
data/misc/835.xml
CHANGED
@@ -18,17 +18,20 @@
|
|
18
18
|
License along with this library; if not, write to the Free Software
|
19
19
|
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
20
20
|
|
21
|
-
$Id:
|
21
|
+
$Id: 835OA.xml 2013-06-08 mjp using version 5010 $
|
22
|
+
Non-standard implementation of the 835 transaction
|
23
|
+
Allows for multiple ST/SE segments
|
22
24
|
-->
|
23
25
|
|
24
26
|
<Definition>
|
25
27
|
<Loop name="835" required="y">
|
26
28
|
<Segment name="ISA" max="1" required="y" />
|
27
29
|
<Segment name="GS" max="1" required="y" />
|
28
|
-
<Loop name="L835" max="
|
30
|
+
<Loop name="L835" max="inf" comment="This X12 Transaction Set contains the format and establishes the data contents of the Professional Healthcare Claim Transaction Set (837p) for use within the context of an Electronic Data Interchange (EDI) environment.">
|
29
31
|
<Segment name="ST" max="1" required="y" />
|
30
|
-
<Segment name="BPR" max="1" required="y"
|
31
|
-
<Segment name=
|
32
|
+
<Segment name="BPR" max="1" required="y" comment="Fianancial Information" />
|
33
|
+
<Segment name='NTE' max='inf' required='n' comment="Note / Special Instruction" />
|
34
|
+
<Segment name="TRN" max="1" required="y" comment="Re-association Trace Number" />
|
32
35
|
<Segment name="CUR" max="1" required="n" />
|
33
36
|
<Segment name="REF" max="2" required="n" />
|
34
37
|
<Segment name="DTM" max="1" required="n" comment="Production Date" />
|
@@ -37,14 +40,13 @@
|
|
37
40
|
<Segment name="N3" max="1" required="y" />
|
38
41
|
<Segment name="N4" max="1" required="y" />
|
39
42
|
<Segment name="REF" max="4" required="n" />
|
40
|
-
<Segment name="PER"
|
43
|
+
<Segment name="PER" max="inf" required="n" comment="4010 allows for 1 segment, 5010 allows for more than 1 segment"/>
|
41
44
|
</Loop>
|
42
45
|
<Loop name="L1000B" max="1" required="y" comment="Payee Identification" >
|
43
46
|
<Segment name="N1" max="1" required="y" />
|
44
47
|
<Segment name="N3" max="1" required="n" />
|
45
|
-
<Segment name="N4" max="1" required="
|
48
|
+
<Segment name="N4" max="1" required="n" />
|
46
49
|
<Segment name="REF" max="inf" required="n" />
|
47
|
-
<Segment name="RDM" max="1" required="n" />
|
48
50
|
</Loop>
|
49
51
|
<Loop name="L2000" required="n" comment="Claim Payment Information" >
|
50
52
|
<Segment name="LX" max="1" required="n" />
|
@@ -54,21 +56,21 @@
|
|
54
56
|
<Segment name="CLP" max="1" required="y" />
|
55
57
|
<Segment name="CAS" max="99" required="n" />
|
56
58
|
<Segment name="NM1" min="1" max="7" required="y" />
|
57
|
-
<Segment name="MIA" max="1"
|
58
|
-
<Segment name="MOA" max="1"
|
59
|
+
<Segment name="MIA" max="1" required="n" />
|
60
|
+
<Segment name="MOA" max="1" required="n" />
|
59
61
|
<Segment name="REF" max="15" required="n" />
|
60
|
-
<Segment name="DTM" max="4"
|
61
|
-
<Segment name="PER" max="
|
62
|
-
<Segment name="AMT" max="
|
63
|
-
<Segment name="QTY" max="
|
62
|
+
<Segment name="DTM" max="4" required="n" />
|
63
|
+
<Segment name="PER" max="3" required="n" />
|
64
|
+
<Segment name="AMT" max="14" required="n" />
|
65
|
+
<Segment name="QTY" max="15" required="n" />
|
64
66
|
<Loop name="L2110" max="999" required="n" comment="Service Payment Information">
|
65
|
-
<Segment name="SVC" max="1"
|
66
|
-
<Segment name="DTM" max="
|
67
|
+
<Segment name="SVC" max="1" required="n" />
|
68
|
+
<Segment name="DTM" max="3" required="n" />
|
67
69
|
<Segment name="CAS" max="99" required="n" />
|
68
70
|
<Segment name="REF" max="24" required="n" />
|
69
|
-
<Segment name="AMT" max="
|
70
|
-
<Segment name="QTY" max="6"
|
71
|
-
<Segment name="LQ" max="99"
|
71
|
+
<Segment name="AMT" max="12" required="n" />
|
72
|
+
<Segment name="QTY" max="6" required="n" />
|
73
|
+
<Segment name="LQ" max="99" required="n" />
|
72
74
|
</Loop>
|
73
75
|
</Loop>
|
74
76
|
</Loop>
|
data/misc/997.xml
CHANGED
@@ -38,10 +38,10 @@
|
|
38
38
|
<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"/>
|
39
39
|
</Segment>
|
40
40
|
<Segment name="AK1" max="1"/>
|
41
|
-
<Loop name="L1000" max="
|
41
|
+
<Loop name="L1000" max="inf" required="y">
|
42
42
|
<Segment name="AK2" max="1" required="n"/>
|
43
|
-
<Loop name="L1010" max="
|
44
|
-
<Segment name="AK3" max="1"
|
43
|
+
<Loop name="L1010" max="inf" required="n">
|
44
|
+
<Segment name="AK3" max="1" required="n"/>
|
45
45
|
<Segment name="AK4" max="99" required="n"/>
|
46
46
|
</Loop>
|
47
47
|
<Segment name="AK5" max="1" required="y"/>
|
@@ -0,0 +1,42 @@
|
|
1
|
+
#--
|
2
|
+
# This file is part of the X12Parser library that provides tools to
|
3
|
+
# manipulate X12 messages using Ruby native syntax.
|
4
|
+
#
|
5
|
+
# http://x12parser.rubyforge.org
|
6
|
+
#
|
7
|
+
# Copyright (C) 2012, 2013 P&D Technical Solutions, LLC.
|
8
|
+
#
|
9
|
+
# This library is free software; you can redistribute it and/or
|
10
|
+
# modify it under the terms of the GNU Lesser General Public
|
11
|
+
# License as published by the Free Software Foundation; either
|
12
|
+
# version 2.1 of the License, or (at your option) any later version.
|
13
|
+
#
|
14
|
+
# This library is distributed in the hope that it will be useful,
|
15
|
+
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
16
|
+
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
17
|
+
# Lesser General Public License for more details.
|
18
|
+
#
|
19
|
+
# You should have received a copy of the GNU Lesser General Public
|
20
|
+
# License along with this library; if not, write to the Free Software
|
21
|
+
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
22
|
+
#++
|
23
|
+
#
|
24
|
+
|
25
|
+
require 'x12'
|
26
|
+
require 'test/unit'
|
27
|
+
|
28
|
+
class Test276Factory < Test::Unit::TestCase
|
29
|
+
|
30
|
+
def setup
|
31
|
+
#nothing
|
32
|
+
end
|
33
|
+
|
34
|
+
def teardown
|
35
|
+
#nothing
|
36
|
+
end
|
37
|
+
|
38
|
+
def test_basic
|
39
|
+
puts "Factory 276 - Need to build tests"
|
40
|
+
end
|
41
|
+
|
42
|
+
end
|
@@ -0,0 +1,43 @@
|
|
1
|
+
#--
|
2
|
+
# This file is part of the X12Parser library that provides tools to
|
3
|
+
# manipulate X12 messages using Ruby native syntax.
|
4
|
+
#
|
5
|
+
# http://x12parser.rubyforge.org
|
6
|
+
#
|
7
|
+
# Copyright (C) 2012, 2013 P&D Technical Solutions, LLC.
|
8
|
+
#
|
9
|
+
# This library is free software; you can redistribute it and/or
|
10
|
+
# modify it under the terms of the GNU Lesser General Public
|
11
|
+
# License as published by the Free Software Foundation; either
|
12
|
+
# version 2.1 of the License, or (at your option) any later version.
|
13
|
+
#
|
14
|
+
# This library is distributed in the hope that it will be useful,
|
15
|
+
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
16
|
+
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
17
|
+
# Lesser General Public License for more details.
|
18
|
+
#
|
19
|
+
# You should have received a copy of the GNU Lesser General Public
|
20
|
+
# License along with this library; if not, write to the Free Software
|
21
|
+
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
22
|
+
#++
|
23
|
+
#
|
24
|
+
|
25
|
+
require 'x12'
|
26
|
+
require 'test/unit'
|
27
|
+
|
28
|
+
class Test277Factory < Test::Unit::TestCase
|
29
|
+
|
30
|
+
def setup
|
31
|
+
#nothing
|
32
|
+
end
|
33
|
+
|
34
|
+
def teardown
|
35
|
+
#nothing
|
36
|
+
end
|
37
|
+
|
38
|
+
def test_basic
|
39
|
+
puts "Factory 277 - Need to build tests"
|
40
|
+
end
|
41
|
+
|
42
|
+
|
43
|
+
end
|
@@ -0,0 +1,151 @@
|
|
1
|
+
#--
|
2
|
+
# This file is part of the X12Parser library that provides tools to
|
3
|
+
# manipulate X12 messages using Ruby native syntax.
|
4
|
+
#
|
5
|
+
# http://x12parser.rubyforge.org
|
6
|
+
#
|
7
|
+
# Copyright (C) 2012, 2013 P&D Technical Solutions, LLC.
|
8
|
+
#
|
9
|
+
# This library is free software; you can redistribute it and/or
|
10
|
+
# modify it under the terms of the GNU Lesser General Public
|
11
|
+
# License as published by the Free Software Foundation; either
|
12
|
+
# version 2.1 of the License, or (at your option) any later version.
|
13
|
+
#
|
14
|
+
# This library is distributed in the hope that it will be useful,
|
15
|
+
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
16
|
+
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
17
|
+
# Lesser General Public License for more details.
|
18
|
+
#
|
19
|
+
# You should have received a copy of the GNU Lesser General Public
|
20
|
+
# License along with this library; if not, write to the Free Software
|
21
|
+
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
22
|
+
#++
|
23
|
+
#
|
24
|
+
|
25
|
+
require 'x12'
|
26
|
+
require 'test/unit'
|
27
|
+
|
28
|
+
class Test276Parse < Test::Unit::TestCase
|
29
|
+
|
30
|
+
# patient is the subscriber
|
31
|
+
MESSAGE1 = "ISA*00*0000000000*00*0000000000*ZZ*610017 *ZZ*T0001799 *030430*1700*U*00401*000000157*0*P*:~
|
32
|
+
GS*HB*610017*T0001799*20030430*1700190*1570001*X*004010X092A1~ST*276*0046~
|
33
|
+
BHT*0010*13**20030109~
|
34
|
+
HL*1**20*1~
|
35
|
+
NM1*PR*2*PAYER NAME*****21*9012345918341~
|
36
|
+
PER*IC*PROVIDER CONTACT INFO*TE*6145551212~
|
37
|
+
HL*2*1*21*1~
|
38
|
+
NM1*41*2******46*111222333~
|
39
|
+
HL*3*2*19*1~
|
40
|
+
NM1*1P*2*PROVIDER NAME*****FI*FEDERAL TAX ID~
|
41
|
+
NM1*1P*2*PROVIDER NAME*****XX*NPI NUMBER~
|
42
|
+
NM1*1P*2*PROVIDER NAME*****SV*PROVIDER NUMBER~
|
43
|
+
HL*4*3*22*0~
|
44
|
+
DMG*D8*19191029*M~
|
45
|
+
NM1*QC*1*DOE*JOHN****MI*R11056841~
|
46
|
+
TRN*1*500~
|
47
|
+
REF*1K*940922~
|
48
|
+
REF*BLT*131~
|
49
|
+
AMT*T3*28.00~
|
50
|
+
DTP*232*RD8*20020501-20020501~
|
51
|
+
SE*18*0046~
|
52
|
+
GE*1*1570001~
|
53
|
+
IEA*1*000000157~"
|
54
|
+
|
55
|
+
# patient and subscriber are different
|
56
|
+
MESSAGE2 = "ISA*00*0000000000*00*0000000000*ZZ*610017 *ZZ*T0001799 *030430*1700*U*00401*000000157*0*P*:~
|
57
|
+
GS*HB*610017*T0001799*20030430*1700190*1570001*X*004010X092A1~
|
58
|
+
ST*276*0046~
|
59
|
+
BHT*0010*13**20030109~
|
60
|
+
HL*1**20*1~
|
61
|
+
NM1*PR*2* PAYER NAME ****21*9012345918341~
|
62
|
+
PER*IC*PROVIDER CONTACT INFO*TE*6145551212~
|
63
|
+
HL*2*1*21*1~
|
64
|
+
NM1*41*2******46*111222333~
|
65
|
+
HL*3*2*19*1~
|
66
|
+
NM1*1P*2*PROVIDER NAME*****FI*FEDERAL TAX ID~
|
67
|
+
NM1*1P*2*PROVIDER NAME*****XX*NPI NUMBER~
|
68
|
+
NM1*1P*2*PROVIDER NAME*****SV*PROVIDER NUMBER~
|
69
|
+
HL*4*3*22*1~
|
70
|
+
NM1*IL*1*DOE*JOHN****MI*MEMBER ID~
|
71
|
+
TRN*1*500~
|
72
|
+
HL*5*4*23~
|
73
|
+
DMG*D8*DATE OF BIRTH*F~
|
74
|
+
NM1*QC*1*DOE*JANE~
|
75
|
+
TRN*1*500~
|
76
|
+
AMT*T3*68.69~
|
77
|
+
DTP*232*RD8*20021016-20021016~
|
78
|
+
SE*18*0046~
|
79
|
+
GE*1*1570001~
|
80
|
+
IEA*1*000000157~"
|
81
|
+
|
82
|
+
def setup
|
83
|
+
# result message that we are building and will test against
|
84
|
+
@message1 = MESSAGE1
|
85
|
+
# make the result usable in the tests
|
86
|
+
@message1.gsub!(/\n/,'')
|
87
|
+
|
88
|
+
@parser = X12::Parser.new('276.xml')
|
89
|
+
@r = @parser.parse('276', @message1)
|
90
|
+
end
|
91
|
+
|
92
|
+
|
93
|
+
def teardown
|
94
|
+
#nothing
|
95
|
+
end
|
96
|
+
|
97
|
+
|
98
|
+
def test_basic
|
99
|
+
|
100
|
+
end
|
101
|
+
|
102
|
+
def test_header
|
103
|
+
assert_equal("00", @r.ISA.AuthorizationInformationQualifier)
|
104
|
+
assert_equal("0000000000", @r.ISA.AuthorizationInformation)
|
105
|
+
assert_equal("00", @r.ISA.SecurityInformationQualifier)
|
106
|
+
assert_equal("0000000000", @r.ISA.SecurityInformation)
|
107
|
+
assert_equal("ZZ", @r.ISA.InterchangeIdQualifier1)
|
108
|
+
assert_equal("610017 ", @r.ISA.InterchangeSenderId)
|
109
|
+
assert_equal("ZZ", @r.ISA.InterchangeIdQualifier2)
|
110
|
+
assert_equal("T0001799 ", @r.ISA.InterchangeReceiverId)
|
111
|
+
assert_equal("030430", @r.ISA.InterchangeDate)
|
112
|
+
assert_equal("1700", @r.ISA.InterchangeTime)
|
113
|
+
assert_equal("U", @r.ISA.InterchangeControlStandardsIdentifier)
|
114
|
+
assert_equal("00401", @r.ISA.InterchangeControlVersionNumber)
|
115
|
+
assert_equal("000000157", @r.ISA.InterchangeControlNumber)
|
116
|
+
assert_equal("0", @r.ISA.AcknowledgmentRequested)
|
117
|
+
assert_equal("P", @r.ISA.UsageIndicator)
|
118
|
+
assert_equal(":", @r.ISA.ComponentElementSeparator)
|
119
|
+
|
120
|
+
assert_equal("HB", @r.GS.FunctionalIdentifierCode)
|
121
|
+
assert_equal("610017", @r.GS.ApplicationSendersCode)
|
122
|
+
assert_equal("T0001799", @r.GS.ApplicationReceiversCode)
|
123
|
+
assert_equal("20030430", @r.GS.Date)
|
124
|
+
assert_equal("1700190", @r.GS.Time)
|
125
|
+
assert_equal("1570001", @r.GS.GroupControlNumber)
|
126
|
+
assert_equal("X", @r.GS.ResponsibleAgencyCode)
|
127
|
+
assert_equal("004010X092A1", @r.GS.VersionReleaseIndustryIdentifierCode)
|
128
|
+
|
129
|
+
assert_equal("276", @r.ST.TransactionSetIdentifierCode)
|
130
|
+
assert_equal("0046", @r.ST.TransactionSetControlNumber)
|
131
|
+
end
|
132
|
+
|
133
|
+
def test_trailer
|
134
|
+
assert_equal("18", @r.SE.NumberOfIncludedSegments)
|
135
|
+
assert_equal("0046", @r.SE.TransactionSetControlNumber)
|
136
|
+
assert_equal("1", @r.GE.NumberOfTransactionSetsIncluded)
|
137
|
+
assert_equal("1570001", @r.GE.GroupControlNumber)
|
138
|
+
assert_equal("1", @r.IEA.NumberOfIncludedFunctionalGroups)
|
139
|
+
assert_equal("000000157", @r.IEA.InterchangeControlNumber)
|
140
|
+
end
|
141
|
+
|
142
|
+
def test_timing
|
143
|
+
start = Time::now
|
144
|
+
X12::TEST_REPEAT.times do
|
145
|
+
@r = @parser.parse('276', @message1)
|
146
|
+
end
|
147
|
+
finish = Time::now
|
148
|
+
puts sprintf("Parses per second, 276: %.2f, elapsed: %.1f", X12::TEST_REPEAT.to_f/(finish-start), finish-start)
|
149
|
+
end # test_timing
|
150
|
+
|
151
|
+
end
|
@@ -0,0 +1,128 @@
|
|
1
|
+
#--
|
2
|
+
# This file is part of the X12Parser library that provides tools to
|
3
|
+
# manipulate X12 messages using Ruby native syntax.
|
4
|
+
#
|
5
|
+
# http://x12parser.rubyforge.org
|
6
|
+
#
|
7
|
+
# Copyright (C) 2012, 2013 P&D Technical Solutions, LLC.
|
8
|
+
#
|
9
|
+
# This library is free software; you can redistribute it and/or
|
10
|
+
# modify it under the terms of the GNU Lesser General Public
|
11
|
+
# License as published by the Free Software Foundation; either
|
12
|
+
# version 2.1 of the License, or (at your option) any later version.
|
13
|
+
#
|
14
|
+
# This library is distributed in the hope that it will be useful,
|
15
|
+
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
16
|
+
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
17
|
+
# Lesser General Public License for more details.
|
18
|
+
#
|
19
|
+
# You should have received a copy of the GNU Lesser General Public
|
20
|
+
# License along with this library; if not, write to the Free Software
|
21
|
+
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
22
|
+
#++
|
23
|
+
#
|
24
|
+
|
25
|
+
require 'x12'
|
26
|
+
require 'test/unit'
|
27
|
+
|
28
|
+
class Test277Parse < Test::Unit::TestCase
|
29
|
+
|
30
|
+
MESSAGE = "ISA*00*0000000000*00*0000000000*01*091712414000000*ZZ*Trading Partner*020808*0931*U*00401*000000002*0*T*:~
|
31
|
+
GS*HN*952931460*Trading Partner*20020808*0931*2*X*004010X093~
|
32
|
+
ST*277*0002~
|
33
|
+
BHT*0010*08*3920394930203*20020808**DG~
|
34
|
+
HL*1**20*1~
|
35
|
+
NM1*PR*2*PACIFICARE/SECURE HORIZONS*****PI*952931460~
|
36
|
+
PER*IC**TE*8002037729~
|
37
|
+
HL*2*1*21*1~
|
38
|
+
NM1*41*2*Clearing House USA*****46*X67E~
|
39
|
+
HL*3*2*19*1~
|
40
|
+
NM1*1P*2*CURE ALL*****XX*1122334455~
|
41
|
+
HL*4*3*22*0~
|
42
|
+
DMG*D8*19650625*F~
|
43
|
+
NM1*QC*1*POPPINS*MARY****MI*111222301~
|
44
|
+
TRN*2*000000001~
|
45
|
+
STC*P1:20*20020808**550.00*550.00~
|
46
|
+
REF*1K*1112223010001~
|
47
|
+
REF*BLT*111~
|
48
|
+
REF*EA*3920394930203~
|
49
|
+
DTP*232*RD8*20020228-20020228~
|
50
|
+
SVC*HC:99291*550.00*550.00~
|
51
|
+
STC*P1:20*20020808**550.00*550.00~
|
52
|
+
REF*FJ*1~
|
53
|
+
DTP*472*RD8*20020228-20020228~
|
54
|
+
SE*23*0002~
|
55
|
+
GE*1*2~
|
56
|
+
IEA*1*000000002~"
|
57
|
+
|
58
|
+
def setup
|
59
|
+
# result message that we are building and will test against
|
60
|
+
@message = MESSAGE
|
61
|
+
# make the result usable in the tests
|
62
|
+
@message.gsub!(/\n/,'')
|
63
|
+
|
64
|
+
@parser = X12::Parser.new('277.xml')
|
65
|
+
@r = @parser.parse('277', @message)
|
66
|
+
end
|
67
|
+
|
68
|
+
def teardown
|
69
|
+
#nothing
|
70
|
+
end
|
71
|
+
|
72
|
+
|
73
|
+
def test_basic
|
74
|
+
|
75
|
+
end
|
76
|
+
|
77
|
+
def test_header
|
78
|
+
assert_equal("00", @r.ISA.AuthorizationInformationQualifier)
|
79
|
+
assert_equal("0000000000", @r.ISA.AuthorizationInformation)
|
80
|
+
assert_equal("00", @r.ISA.SecurityInformationQualifier)
|
81
|
+
assert_equal("0000000000", @r.ISA.SecurityInformation)
|
82
|
+
assert_equal("01", @r.ISA.InterchangeIdQualifier1)
|
83
|
+
assert_equal("091712414000000", @r.ISA.InterchangeSenderId)
|
84
|
+
assert_equal("ZZ", @r.ISA.InterchangeIdQualifier2)
|
85
|
+
assert_equal("Trading Partner", @r.ISA.InterchangeReceiverId)
|
86
|
+
assert_equal("020808", @r.ISA.InterchangeDate)
|
87
|
+
assert_equal("0931", @r.ISA.InterchangeTime)
|
88
|
+
assert_equal("U", @r.ISA.InterchangeControlStandardsIdentifier)
|
89
|
+
assert_equal("00401", @r.ISA.InterchangeControlVersionNumber)
|
90
|
+
assert_equal("000000002", @r.ISA.InterchangeControlNumber)
|
91
|
+
assert_equal("0", @r.ISA.AcknowledgmentRequested)
|
92
|
+
assert_equal("T", @r.ISA.UsageIndicator)
|
93
|
+
assert_equal(":", @r.ISA.ComponentElementSeparator)
|
94
|
+
|
95
|
+
assert_equal("HN", @r.GS.FunctionalIdentifierCode)
|
96
|
+
assert_equal("952931460", @r.GS.ApplicationSendersCode)
|
97
|
+
assert_equal("Trading Partner", @r.GS.ApplicationReceiversCode)
|
98
|
+
assert_equal("20020808", @r.GS.Date)
|
99
|
+
assert_equal("0931", @r.GS.Time)
|
100
|
+
assert_equal("2", @r.GS.GroupControlNumber)
|
101
|
+
assert_equal("X", @r.GS.ResponsibleAgencyCode)
|
102
|
+
assert_equal("004010X093", @r.GS.VersionReleaseIndustryIdentifierCode)
|
103
|
+
|
104
|
+
assert_equal("277", @r.ST.TransactionSetIdentifierCode)
|
105
|
+
assert_equal("0002", @r.ST.TransactionSetControlNumber)
|
106
|
+
end
|
107
|
+
|
108
|
+
def test_trailer
|
109
|
+
assert_equal("23", @r.SE.NumberOfIncludedSegments)
|
110
|
+
assert_equal("0002", @r.SE.TransactionSetControlNumber)
|
111
|
+
assert_equal("1", @r.GE.NumberOfTransactionSetsIncluded)
|
112
|
+
assert_equal("2", @r.GE.GroupControlNumber)
|
113
|
+
assert_equal("1", @r.IEA.NumberOfIncludedFunctionalGroups)
|
114
|
+
assert_equal("000000002", @r.IEA.InterchangeControlNumber)
|
115
|
+
end
|
116
|
+
|
117
|
+
|
118
|
+
def test_timing
|
119
|
+
start = Time::now
|
120
|
+
X12::TEST_REPEAT.times do
|
121
|
+
@r = @parser.parse('277', @message)
|
122
|
+
end
|
123
|
+
finish = Time::now
|
124
|
+
puts sprintf("Parses per second, 277: %.2f, elapsed: %.1f", X12::TEST_REPEAT.to_f/(finish-start), finish-start)
|
125
|
+
end # test_timing
|
126
|
+
|
127
|
+
|
128
|
+
end
|
metadata
CHANGED
@@ -1,7 +1,8 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: pd_x12
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.4.
|
4
|
+
version: 1.4.7
|
5
|
+
prerelease:
|
5
6
|
platform: ruby
|
6
7
|
authors:
|
7
8
|
- App Design, Inc.
|
@@ -11,7 +12,7 @@ authors:
|
|
11
12
|
autorequire:
|
12
13
|
bindir: bin
|
13
14
|
cert_chain: []
|
14
|
-
date: 2013-
|
15
|
+
date: 2013-09-14 00:00:00.000000000 Z
|
15
16
|
dependencies: []
|
16
17
|
description: ! 'A gem to handle parsing and generation of ANSI X12 documents. Currently
|
17
18
|
tested with Ruby >= 1.9.2. Gem supports X12 EDI transactions 270, 997, 837p and
|
@@ -47,8 +48,9 @@ files:
|
|
47
48
|
- misc/270.xml
|
48
49
|
- misc/270interchange.xml
|
49
50
|
- misc/271.xml
|
51
|
+
- misc/276.xml
|
52
|
+
- misc/277.xml
|
50
53
|
- misc/835.xml
|
51
|
-
- misc/835oa.xml
|
52
54
|
- misc/837p.xml
|
53
55
|
- misc/850.xml
|
54
56
|
- misc/850dsd.xml
|
@@ -1869,12 +1871,16 @@ files:
|
|
1869
1871
|
- test/tc_factory_270.rb
|
1870
1872
|
- test/tc_factory_270interchange.rb
|
1871
1873
|
- test/tc_factory_271.rb
|
1874
|
+
- test/tc_factory_276.rb
|
1875
|
+
- test/tc_factory_277.rb
|
1872
1876
|
- test/tc_factory_837p.rb
|
1873
1877
|
- test/tc_factory_997.rb
|
1874
1878
|
- test/tc_factory_999.rb
|
1875
1879
|
- test/tc_parse_270.rb
|
1876
1880
|
- test/tc_parse_270interchange.rb
|
1877
1881
|
- test/tc_parse_271.rb
|
1882
|
+
- test/tc_parse_276.rb
|
1883
|
+
- test/tc_parse_277.rb
|
1878
1884
|
- test/tc_parse_835.rb
|
1879
1885
|
- test/tc_parse_837p.rb
|
1880
1886
|
- test/tc_parse_997.rb
|
@@ -1883,37 +1889,42 @@ files:
|
|
1883
1889
|
homepage: https://github.com/mjpete3/x12
|
1884
1890
|
licenses:
|
1885
1891
|
- GPL-2
|
1886
|
-
metadata: {}
|
1887
1892
|
post_install_message:
|
1888
1893
|
rdoc_options: []
|
1889
1894
|
require_paths:
|
1890
1895
|
- lib
|
1891
1896
|
required_ruby_version: !ruby/object:Gem::Requirement
|
1897
|
+
none: false
|
1892
1898
|
requirements:
|
1893
1899
|
- - ! '>='
|
1894
1900
|
- !ruby/object:Gem::Version
|
1895
1901
|
version: '0'
|
1896
1902
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
1903
|
+
none: false
|
1897
1904
|
requirements:
|
1898
1905
|
- - ! '>='
|
1899
1906
|
- !ruby/object:Gem::Version
|
1900
1907
|
version: '0'
|
1901
1908
|
requirements: []
|
1902
1909
|
rubyforge_project:
|
1903
|
-
rubygems_version:
|
1910
|
+
rubygems_version: 1.8.24
|
1904
1911
|
signing_key:
|
1905
|
-
specification_version:
|
1912
|
+
specification_version: 3
|
1906
1913
|
summary: A gem to handle parsing and generation of ANSI X12 documents
|
1907
1914
|
test_files:
|
1908
1915
|
- test/tc_factory_270.rb
|
1909
1916
|
- test/tc_factory_270interchange.rb
|
1910
1917
|
- test/tc_factory_271.rb
|
1918
|
+
- test/tc_factory_276.rb
|
1919
|
+
- test/tc_factory_277.rb
|
1911
1920
|
- test/tc_factory_837p.rb
|
1912
1921
|
- test/tc_factory_997.rb
|
1913
1922
|
- test/tc_factory_999.rb
|
1914
1923
|
- test/tc_parse_270.rb
|
1915
1924
|
- test/tc_parse_270interchange.rb
|
1916
1925
|
- test/tc_parse_271.rb
|
1926
|
+
- test/tc_parse_276.rb
|
1927
|
+
- test/tc_parse_277.rb
|
1917
1928
|
- test/tc_parse_835.rb
|
1918
1929
|
- test/tc_parse_837p.rb
|
1919
1930
|
- test/tc_parse_997.rb
|
checksums.yaml
DELETED
@@ -1,15 +0,0 @@
|
|
1
|
-
---
|
2
|
-
!binary "U0hBMQ==":
|
3
|
-
metadata.gz: !binary |-
|
4
|
-
NzkzZThjNjExNzNkMTk0NmYxNjI1ZGZiNzg2YTVkNWE3ZTEyNDJhZg==
|
5
|
-
data.tar.gz: !binary |-
|
6
|
-
MDIyZTY2MWI1ZDkwMzZmNGQ3NmUxZGM5ODg5YjVhZmZjZGZkNmNmZA==
|
7
|
-
!binary "U0hBNTEy":
|
8
|
-
metadata.gz: !binary |-
|
9
|
-
MzI5NDUxMjhiZDZjZjYzYzc0Yzc0NTU2MDQzZTBkYzE4NzU3ZGZhYTE4YWMz
|
10
|
-
YzFiYzQwZTZmYWIyNDM1OTM0OTlhMDE3ZTM0YTAwYzY3ZTRiMTczYWZiNmY2
|
11
|
-
YzM2M2ZlMWQ3YTI0ZTdiZjIxODNiM2FmYzFiNGU3NTY1NGI3ZGQ=
|
12
|
-
data.tar.gz: !binary |-
|
13
|
-
ZmJmZmExN2VhYzIwMTE2OGRiYWExNWI4MDY1YmZlMmJjYzkyZGJmODRiODdl
|
14
|
-
YzljOWZjMDY5ZmVhYzA4YTkzZjgzZWFlZDgyYmE5MTBjZDAxNDBlZWNkODY4
|
15
|
-
N2E0YTFmZTkyZWRjMjMxOGE4NDMzZjUyNjAwN2VlNzFkZDc0YzA=
|
data/misc/835oa.xml
DELETED
@@ -1,83 +0,0 @@
|
|
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) 2012 P&D Technical 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: 835OA.xml 2013-06-08 mjp using version 5010 $
|
22
|
-
Non-standard implementation of the 835 transaction
|
23
|
-
Allows for multiple ST/SE segments
|
24
|
-
-->
|
25
|
-
|
26
|
-
<Definition>
|
27
|
-
<Loop name="835" required="y">
|
28
|
-
<Segment name="ISA" max="1" required="y" />
|
29
|
-
<Segment name="GS" max="1" required="y" />
|
30
|
-
<Loop name="L835" max="5000" comment="This X12 Transaction Set contains the format and establishes the data contents of the Professional Healthcare Claim Transaction Set (837p) for use within the context of an Electronic Data Interchange (EDI) environment.">
|
31
|
-
<Segment name="ST" max="1" required="y" />
|
32
|
-
<Segment name="BPR" max="1" required="y" comment="Fianancial Information" />
|
33
|
-
<Segment name="TRN" max="1" required="y" comment="Re-association Trace Number" />
|
34
|
-
<Segment name="CUR" max="1" required="n" />
|
35
|
-
<Segment name="REF" max="2" required="n" />
|
36
|
-
<Segment name="DTM" max="1" required="n" comment="Production Date" />
|
37
|
-
<Loop name="L1000A" max="1" required="y" comment="Payer Identification">
|
38
|
-
<Segment name="N1" max="1" required="y" />
|
39
|
-
<Segment name="N3" max="1" required="y" />
|
40
|
-
<Segment name="N4" max="1" required="y" />
|
41
|
-
<Segment name="REF" max="4" required="n" />
|
42
|
-
<Segment name="PER" min="1" max="inf" required="y" comment="4010 allows for 1 segment, 5010 allows for more than 1 segment"/>
|
43
|
-
</Loop>
|
44
|
-
<Loop name="L1000B" max="1" required="y" comment="Payee Identification" >
|
45
|
-
<Segment name="N1" max="1" required="y" />
|
46
|
-
<Segment name="N3" max="1" required="n" />
|
47
|
-
<Segment name="N4" max="1" required="y" />
|
48
|
-
<Segment name="REF" max="inf" required="n" />
|
49
|
-
<Segment name="RDM" max="1" required="n" />
|
50
|
-
</Loop>
|
51
|
-
<Loop name="L2000" required="n" comment="Claim Payment Information" >
|
52
|
-
<Segment name="LX" max="1" required="n" />
|
53
|
-
<Segment name="TS3" max="1" required="n" />
|
54
|
-
<Segment name="TS2" max="1" required="n" />
|
55
|
-
<Loop name="L2100" min="1" comment="The Loop 2100 CLP Claim Payment Information Segment begins data on each individual claim for a service provider within the 835 Transaction." >
|
56
|
-
<Segment name="CLP" max="1" required="y" />
|
57
|
-
<Segment name="CAS" max="99" required="n" />
|
58
|
-
<Segment name="NM1" min="1" max="7" required="y" />
|
59
|
-
<Segment name="MIA" max="1" required="n" />
|
60
|
-
<Segment name="MOA" max="1" required="n" />
|
61
|
-
<Segment name="REF" max="15" required="n" />
|
62
|
-
<Segment name="DTM" max="4" required="n" />
|
63
|
-
<Segment name="PER" max="2" required="n" />
|
64
|
-
<Segment name="AMT" max="13" required="n" />
|
65
|
-
<Segment name="QTY" max="14" required="n" />
|
66
|
-
<Loop name="L2110" max="999" required="n" comment="Service Payment Information">
|
67
|
-
<Segment name="SVC" max="1" required="n" />
|
68
|
-
<Segment name="DTM" max="2" required="n" />
|
69
|
-
<Segment name="CAS" max="99" required="n" />
|
70
|
-
<Segment name="REF" max="24" required="n" />
|
71
|
-
<Segment name="AMT" max="9" required="n" />
|
72
|
-
<Segment name="QTY" max="6" required="n" />
|
73
|
-
<Segment name="LQ" max="99" required="n" />
|
74
|
-
</Loop>
|
75
|
-
</Loop>
|
76
|
-
</Loop>
|
77
|
-
<Segment name="PLB" max="inf" required="n" comment="Provider Level Adjustment" />
|
78
|
-
<Segment name="SE" required="y" />
|
79
|
-
</Loop>
|
80
|
-
<Segment name="GE" max="1" required="y"/>
|
81
|
-
<Segment name="IEA" max="1" required="y"/>
|
82
|
-
</Loop>
|
83
|
-
</Definition>
|