pd_x12 1.4.7 → 1.4.8
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +15 -0
- data/lib/x12/version.rb +1 -1
- data/misc/835.xml +12 -11
- data/misc/999.xml +5 -4
- data/misc/TA1.xml +32 -0
- data/test/tc_parse_999.rb +31 -19
- metadata +6 -7
checksums.yaml
ADDED
@@ -0,0 +1,15 @@
|
|
1
|
+
---
|
2
|
+
!binary "U0hBMQ==":
|
3
|
+
metadata.gz: !binary |-
|
4
|
+
NGMyNDQ1NzQ2MTYxNmE3ZmExY2QwNWE5MzYyNzY4MmIyYTc0OTEyYw==
|
5
|
+
data.tar.gz: !binary |-
|
6
|
+
ZjQwMmU2MmNhMDY2M2JlMWY2MTQ5OTcxMDc2MGJjY2M3MmE4OGNkZQ==
|
7
|
+
!binary "U0hBNTEy":
|
8
|
+
metadata.gz: !binary |-
|
9
|
+
MjhlZTcwYzk1YjNlM2U0NDhjZWI2ZDFmN2ZmYTNiNzFmYjQwM2QwOTBmNjcw
|
10
|
+
N2IzYmQ5NWJiMzBmNjJhYTJkZGIzZDBmYzA0MjBmY2IxMWI0NDY2NDliMWZl
|
11
|
+
YTc4YjU4NzExZWU5MmY2ZDI0ZDA4YmRmMjBhNDc0M2Y2ZTQ4OTE=
|
12
|
+
data.tar.gz: !binary |-
|
13
|
+
OTkxN2JhZjIzY2VhZTc3ZmE0NTcyN2FmNDgwYjFiYjRiYmJjMDVjZTE3NTZi
|
14
|
+
YTU5MjA0ZmMyYTJhNDgyNmZkNGU1MjZhYWY1NTM3ZDA4YWM2NTQzMzNlZDRk
|
15
|
+
MzAxZWY1ZGJiYjI5OTc5OWVkYmQ1MzgzMDY1NmJlOWU2YzEwOTk=
|
data/lib/x12/version.rb
CHANGED
data/misc/835.xml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
<!--
|
2
2
|
This file is part of the X12Parser library that provides tools to
|
3
|
-
manipulate X12 messages using Ruby native syntax.
|
4
|
-
|
3
|
+
manipulate X12 messages using Ruby native syntax.
|
4
|
+
|
5
5
|
Copyright (C) 2012 P&D Technical Solutions, LLC
|
6
6
|
|
7
7
|
This library is free software; you can redistribute it and/or
|
@@ -18,15 +18,16 @@
|
|
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: 835OA.xml 2013-06-08 mjp using version 5010 $
|
22
|
-
Non-standard implementation of the 835 transaction
|
23
|
-
Allows for multiple ST/SE segments
|
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
24
|
-->
|
25
25
|
|
26
26
|
<Definition>
|
27
27
|
<Loop name="835" required="y">
|
28
28
|
<Segment name="ISA" max="1" required="y" />
|
29
|
-
<Segment name="
|
29
|
+
<Segment name="TA1" max="1" required="n" />
|
30
|
+
<Segment name="GS" max="1" required="y" />
|
30
31
|
<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.">
|
31
32
|
<Segment name="ST" max="1" required="y" />
|
32
33
|
<Segment name="BPR" max="1" required="y" comment="Fianancial Information" />
|
@@ -51,18 +52,18 @@
|
|
51
52
|
<Loop name="L2000" required="n" comment="Claim Payment Information" >
|
52
53
|
<Segment name="LX" max="1" required="n" />
|
53
54
|
<Segment name="TS3" max="1" required="n" />
|
54
|
-
<Segment name="TS2" max="1" required="n" />
|
55
|
+
<Segment name="TS2" max="1" required="n" />
|
55
56
|
<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
57
|
<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" />
|
58
|
+
<Segment name="CAS" max="99" required="n" />
|
59
|
+
<Segment name="NM1" min="1" max="7" required="y" />
|
59
60
|
<Segment name="MIA" max="1" required="n" />
|
60
61
|
<Segment name="MOA" max="1" required="n" />
|
61
62
|
<Segment name="REF" max="15" required="n" />
|
62
63
|
<Segment name="DTM" max="4" required="n" />
|
63
64
|
<Segment name="PER" max="3" required="n" />
|
64
65
|
<Segment name="AMT" max="14" required="n" />
|
65
|
-
<Segment name="QTY" max="15" required="n" />
|
66
|
+
<Segment name="QTY" max="15" required="n" />
|
66
67
|
<Loop name="L2110" max="999" required="n" comment="Service Payment Information">
|
67
68
|
<Segment name="SVC" max="1" required="n" />
|
68
69
|
<Segment name="DTM" max="3" required="n" />
|
@@ -74,7 +75,7 @@
|
|
74
75
|
</Loop>
|
75
76
|
</Loop>
|
76
77
|
</Loop>
|
77
|
-
<Segment name="PLB" max="inf" required="n" comment="Provider Level Adjustment" />
|
78
|
+
<Segment name="PLB" max="inf" required="n" comment="Provider Level Adjustment" />
|
78
79
|
<Segment name="SE" required="y" />
|
79
80
|
</Loop>
|
80
81
|
<Segment name="GE" max="1" required="y"/>
|
data/misc/999.xml
CHANGED
@@ -2,8 +2,8 @@
|
|
2
2
|
This file is part of the X12Parser library that provides tools to
|
3
3
|
manipulate X12 messages using Ruby native syntax.
|
4
4
|
|
5
|
-
http://x12parser.rubyforge.org
|
6
|
-
|
5
|
+
http://x12parser.rubyforge.org
|
6
|
+
|
7
7
|
Copyright (C) 2012 P & D Technology Solutions, LLC.
|
8
8
|
|
9
9
|
This library is free software; you can redistribute it and/or
|
@@ -26,6 +26,7 @@
|
|
26
26
|
<Definition>
|
27
27
|
<Loop name="999" required="y" >
|
28
28
|
<Segment name="ISA" max="1" required="y" />
|
29
|
+
<Segment name="TA1" max="1" required="n" />
|
29
30
|
<Segment name="GS" max="1" required="y" />
|
30
31
|
<Segment name="ST" max="1" required="y" >
|
31
32
|
<Field name="TransactionSetIdentifierCode" const="999" min="3" max="3" validation="T143" comment="Code uniquely identifying a Transaction Set"/>
|
@@ -34,10 +35,10 @@
|
|
34
35
|
</Segment>
|
35
36
|
<Segment name="AK1" required="y" max="1" comment="Functional Group Response"/>
|
36
37
|
<Loop name="L1000" max="999999" required="y">
|
37
|
-
<Segment name="AK2" max="1" required="n" comment="Transaction Set Response Header"/>
|
38
|
+
<Segment name="AK2" max="1" required="n" comment="Transaction Set Response Header"/>
|
38
39
|
<Loop name="L1010" max="999999" required="n">
|
39
40
|
<Segment name="IK3" max="1" required="n" comment="Error Identification"/>
|
40
|
-
<Segment name="CTX" max="10" required="n" comment="Segment Context"/>
|
41
|
+
<Segment name="CTX" max="10" required="n" comment="Segment Context"/>
|
41
42
|
<Loop name="L1020" required="n">
|
42
43
|
<Segment name="IK4" max="1" required="n" comment="Implementation Data Element Note"/>
|
43
44
|
<Segment name="CTX" max="10" required="n" comment="Element Context"/>
|
data/misc/TA1.xml
ADDED
@@ -0,0 +1,32 @@
|
|
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) 2014 P&D Technologies, 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
|
+
$Id: TA.xml 78 2009-05-12 22:27:26Z ikk $
|
24
|
+
-->
|
25
|
+
|
26
|
+
<Segment name="TA1" comment="Interchange Acknowledgment Segment">
|
27
|
+
<Field name="InterchangeControlNumber" type="int" required="y" min="9" max="9" comment="A control number assigned by the interchange sender"/>
|
28
|
+
<Field name="InterchangeDate" required="y" min="6" max="6" comment="Date of the interchange"/>
|
29
|
+
<Field name="InterchangeTime" required="y" min="4" max="4" comment="Time of the interchange"/>
|
30
|
+
<Field name="InterchangeAcknowledgmentCode" required="y" min="1" max="1" comment="Code sent by the reciever acknowledging the file"/>
|
31
|
+
<Field name="InterchangeNoteCode" required="y" min="1" max="1" comment="3-digit number corresponds to the note"/>
|
32
|
+
</Segment>
|
data/test/tc_parse_999.rb
CHANGED
@@ -2,8 +2,8 @@
|
|
2
2
|
# This file is part of the X12Parser library that provides tools to
|
3
3
|
# manipulate X12 messages using Ruby native syntax.
|
4
4
|
#
|
5
|
-
# http://x12parser.rubyforge.org
|
6
|
-
#
|
5
|
+
# http://x12parser.rubyforge.org
|
6
|
+
#
|
7
7
|
# Copyright (C) 2012 P&D Technical Solutions, LLC.
|
8
8
|
#
|
9
9
|
# This library is free software; you can redistribute it and/or
|
@@ -25,46 +25,58 @@ require 'x12'
|
|
25
25
|
require 'test/unit'
|
26
26
|
|
27
27
|
class Test999Parse < Test::Unit::TestCase
|
28
|
-
|
28
|
+
|
29
29
|
def setup
|
30
30
|
@parser = X12::Parser.new('999.xml')
|
31
31
|
@msg =[]
|
32
32
|
@msg.push "ISA*00* *00* *27*PPPPPP *27*XXXXXX *100914*1025*^*00501*000000218*0*T*:~GS*FA*PPPPPP*XXXXXX*20100914*10251463*3*X*005010X231A1~ST*999*3001*005010X231A1~AK1*HC*2145001*005010X222A1~AK2*837*000000001*005010X222A1~IK5*A~AK9*A*1*1*1~SE*6*3001~GE*1*3~IEA*1*000000218~"
|
33
|
-
@msg.push "ISA*00* *00* *ZZ*123456789 *ZZ*987654321 *041117*1024*^*00501*000000286*0*P*:~GS*FA*RCVR*SNDR*20041117*1024*287*X*005010X231~ST*999*2870001*005010X231~AK1*HC*17456*004010X098A1~AK2*837*0001~IK5*A~AK2*837*0002~IK3*CLM*22**8~CTX*CLM01:123456789~IK4*2*782*1~IK5*R*5~AK2*837*0003~IK3*REF*57**3~CTX*SITUATIONAL TRIGGER*CLM*43**5:3*C023:1325~CTX*CLM01:987654321~IK5*R*5~AK9*P*3*3*1~SE*16*2870001~GE*1*287~IEA*1*000000286~"
|
34
|
-
|
35
|
-
|
33
|
+
@msg.push "ISA*00* *00* *ZZ*123456789 *ZZ*987654321 *041117*1024*^*00501*000000286*0*P*:~GS*FA*RCVR*SNDR*20041117*1024*287*X*005010X231~ST*999*2870001*005010X231~AK1*HC*17456*004010X098A1~AK2*837*0001~IK5*A~AK2*837*0002~IK3*CLM*22**8~CTX*CLM01:123456789~IK4*2*782*1~IK5*R*5~AK2*837*0003~IK3*REF*57**3~CTX*SITUATIONAL TRIGGER*CLM*43**5:3*C023:1325~CTX*CLM01:987654321~IK5*R*5~AK9*P*3*3*1~SE*16*2870001~GE*1*287~IEA*1*000000286~"
|
34
|
+
# with TA1 interchange acknowledgment
|
35
|
+
@msg.push "ISA*00* *00* *ZZ*330897513 *ZZ*593792225 *140421*0812*^*00501*004211112*0*P*:~TA1*004211112*140421*0812*A*000~GS*FA*330897513*593792225*20140421*0812*184911116*X*005010X231A1~ST*999*0001*005010X231A1~AK1*HC*4211112*005010X222A1~AK2*837*000000001*005010X222A1~IK5*A~AK2*837*000000002*005010X222A1~IK5*A~AK2*837*000000003*005010X222A1~IK5*A~AK2*837*000000004*005010X222A1~IK5*A~AK2*837*000000005*005010X222A1~IK5*A~AK2*837*000000006*005010X222A1~IK5*A~AK2*837*000000007*005010X222A1~IK5*A~AK2*837*000000008*005010X222A1~IK5*A~AK2*837*000000009*005010X222A1~IK5*A~AK2*837*000000010*005010X222A1~IK5*A~AK2*837*000000011*005010X222A1~IK5*A~AK2*837*000000012*005010X222A1~IK5*A~AK2*837*000000013*005010X222A1~IK5*A~AK2*837*000000014*005010X222A1~IK5*A~AK2*837*000000015*005010X222A1~IK5*A~AK2*837*000000016*005010X222A1~IK5*A~AK2*837*000000017*005010X222A1~IK5*A~AK2*837*000000018*005010X222A1~IK5*A~AK2*837*000000019*005010X222A1~IK5*A~AK2*837*000000020*005010X222A1~IK5*A~AK2*837*000000021*005010X222A1~IK5*A~AK2*837*000000022*005010X222A1~IK5*A~AK2*837*000000023*005010X222A1~IK5*A~AK2*837*000000024*005010X222A1~IK5*A~AK2*837*000000025*005010X222A1~IK5*A~AK2*837*000000026*005010X222A1~IK5*A~AK2*837*000000027*005010X222A1~IK5*A~AK2*837*000000028*005010X222A1~IK5*A~AK2*837*000000029*005010X222A1~IK5*A~AK2*837*000000030*005010X222A1~IK5*A~AK2*837*000000031*005010X222A1~IK5*A~AK2*837*000000032*005010X222A1~IK5*A~AK2*837*000000033*005010X222A1~IK5*A~AK2*837*000000034*005010X222A1~IK5*A~AK9*A*34*34*34~SE*72*0001~GE*1*184911116~IEA*1*004211112~"
|
36
|
+
end
|
37
|
+
|
36
38
|
def teardown
|
37
|
-
#nothing
|
39
|
+
#nothing
|
38
40
|
end
|
39
|
-
|
41
|
+
|
40
42
|
#parse a simple accepted message
|
41
43
|
def test_simple
|
42
44
|
@r = @parser.parse('999', @msg[0])
|
43
|
-
|
45
|
+
|
44
46
|
assert_equal(@r.GS.ApplicationSendersCode, "PPPPPP")
|
45
47
|
assert_equal(@r.GS.ApplicationReceiversCode, "XXXXXX")
|
46
|
-
|
48
|
+
|
47
49
|
@r.L1000 {|a|
|
48
50
|
assert_equal(a.AK2.TransactionSetIdentifierCode, "837")
|
49
51
|
assert_equal(a.AK2.TransactionSetControlNumber, "000000001")
|
50
52
|
assert_equal(a.AK2.ImplementationConventionReference, "005010X222A1")
|
51
|
-
|
52
53
|
assert_equal(a.IK5.TransactionSetAcknowledgmentCode, "A")
|
53
54
|
}
|
54
55
|
end
|
55
|
-
|
56
|
-
|
56
|
+
|
57
57
|
#parse a multiple transaction with 1 accepted and 2 rejected claims
|
58
|
-
def
|
59
|
-
@r = @parser.parse('999', @msg[1])
|
60
|
-
|
61
|
-
|
62
|
-
assert_equal(3, @r.L1000.size)
|
58
|
+
def test_msg2
|
59
|
+
@r = @parser.parse('999', @msg[1])
|
60
|
+
assert_equal(3, @r.L1000.size)
|
63
61
|
assert_equal("A", @r.L1000[0].IK5.TransactionSetAcknowledgmentCode)
|
64
62
|
assert_equal("R", @r.L1000[1].IK5.TransactionSetAcknowledgmentCode)
|
65
|
-
assert_equal("R", @r.L1000[2].IK5.TransactionSetAcknowledgmentCode)
|
63
|
+
assert_equal("R", @r.L1000[2].IK5.TransactionSetAcknowledgmentCode)
|
66
64
|
end
|
67
65
|
|
66
|
+
|
67
|
+
def test_msg3
|
68
|
+
@r = @parser.parse('999', @msg[2])
|
69
|
+
|
70
|
+
assert_equal(@r.TA1.InterchangeControlNumber, "004211112")
|
71
|
+
assert_equal(@r.TA1.InterchangeAcknowledgmentCode, "A")
|
72
|
+
assert_equal(@r.TA1.InterchangeNoteCode, "000")
|
73
|
+
|
74
|
+
# there are 34 acknowledgments
|
75
|
+
assert_equal(34, @r.L1000.size)
|
76
|
+
assert_equal("A", @r.L1000[0].IK5.TransactionSetAcknowledgmentCode)
|
77
|
+
end
|
78
|
+
|
79
|
+
|
68
80
|
def test_timing
|
69
81
|
start = Time::now
|
70
82
|
X12::TEST_REPEAT.times do
|
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.
|
5
|
-
prerelease:
|
4
|
+
version: 1.4.8
|
6
5
|
platform: ruby
|
7
6
|
authors:
|
8
7
|
- App Design, Inc.
|
@@ -12,7 +11,7 @@ authors:
|
|
12
11
|
autorequire:
|
13
12
|
bindir: bin
|
14
13
|
cert_chain: []
|
15
|
-
date:
|
14
|
+
date: 2014-05-04 00:00:00.000000000 Z
|
16
15
|
dependencies: []
|
17
16
|
description: ! 'A gem to handle parsing and generation of ANSI X12 documents. Currently
|
18
17
|
tested with Ruby >= 1.9.2. Gem supports X12 EDI transactions 270, 997, 837p and
|
@@ -1728,6 +1727,7 @@ files:
|
|
1728
1727
|
- misc/T998.xml
|
1729
1728
|
- misc/T999.xml
|
1730
1729
|
- misc/TA.xml
|
1730
|
+
- misc/TA1.xml
|
1731
1731
|
- misc/TAX.xml
|
1732
1732
|
- misc/TBI.xml
|
1733
1733
|
- misc/TC2.xml
|
@@ -1889,27 +1889,26 @@ files:
|
|
1889
1889
|
homepage: https://github.com/mjpete3/x12
|
1890
1890
|
licenses:
|
1891
1891
|
- GPL-2
|
1892
|
+
metadata: {}
|
1892
1893
|
post_install_message:
|
1893
1894
|
rdoc_options: []
|
1894
1895
|
require_paths:
|
1895
1896
|
- lib
|
1896
1897
|
required_ruby_version: !ruby/object:Gem::Requirement
|
1897
|
-
none: false
|
1898
1898
|
requirements:
|
1899
1899
|
- - ! '>='
|
1900
1900
|
- !ruby/object:Gem::Version
|
1901
1901
|
version: '0'
|
1902
1902
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
1903
|
-
none: false
|
1904
1903
|
requirements:
|
1905
1904
|
- - ! '>='
|
1906
1905
|
- !ruby/object:Gem::Version
|
1907
1906
|
version: '0'
|
1908
1907
|
requirements: []
|
1909
1908
|
rubyforge_project:
|
1910
|
-
rubygems_version:
|
1909
|
+
rubygems_version: 2.0.5
|
1911
1910
|
signing_key:
|
1912
|
-
specification_version:
|
1911
|
+
specification_version: 4
|
1913
1912
|
summary: A gem to handle parsing and generation of ANSI X12 documents
|
1914
1913
|
test_files:
|
1915
1914
|
- test/tc_factory_270.rb
|