hippo 0.0.12 → 0.1.0
Sign up to get free protection for your applications and to get access to all the features.
- data/CHANGELOG +10 -2
- data/Gemfile +0 -3
- data/lib/hippo/outputters/html.rb +13 -0
- data/lib/hippo/outputters/paper_claim.rb +7 -0
- data/lib/hippo/outputters/pdf.rb +13 -0
- data/lib/hippo/outputters.rb +3 -0
- data/lib/hippo/parser/segment.rb +35 -0
- data/lib/hippo/parser/transaction_set.rb +39 -0
- data/lib/hippo/parser.rb +24 -93
- data/lib/hippo/segments/base.rb +4 -1
- data/lib/hippo/segments.rb +86 -86
- data/lib/hippo/separator.rb +10 -5
- data/lib/hippo/transaction_sets/HIPAA_276.rb +15 -17
- data/lib/hippo/transaction_sets/HIPAA_277.rb +18 -20
- data/lib/hippo/transaction_sets/HIPAA_835.rb +6 -8
- data/lib/hippo/transaction_sets/HIPAA_837/L2000A.rb +2 -0
- data/lib/hippo/transaction_sets/HIPAA_837/base.rb +0 -1
- data/lib/hippo/transaction_sets/HIPAA_837.rb +39 -41
- data/lib/hippo/transaction_sets/HIPAA_999.rb +4 -6
- data/lib/hippo/transaction_sets/base.rb +4 -1
- data/lib/hippo/transaction_sets.rb +9 -9
- data/lib/hippo/utilities.rb +37 -0
- data/lib/hippo/version.rb +1 -1
- data/lib/hippo.rb +9 -17
- data/test/test_parser.rb +20 -6
- metadata +70 -36
- data/lib/hippo/loop.rb +0 -0
data/CHANGELOG
CHANGED
@@ -1,3 +1,13 @@
|
|
1
|
+
0.1.0 - 2012/01/05
|
2
|
+
* Add concept of Outputters.
|
3
|
+
* Create PDF and HTML outputters.
|
4
|
+
* Create PaperClaim outputter for HIPAA_837::L2000A.
|
5
|
+
* Refactor parsing so any descendant of TransactionSet::Base is
|
6
|
+
able to parse a string representation of itself.
|
7
|
+
* Refactor Separator module to use super instead of a custom
|
8
|
+
function call to initialize the separators.
|
9
|
+
* Fix project so that we do not modify $LOAD_PATH.
|
10
|
+
* Only use autoload for Segments and TransactionSets that are optional.
|
1
11
|
0.0.12 - 2011/12/22
|
2
12
|
* Fix a number of parsing errors.
|
3
13
|
* Ensure that we only evaluate the first segment when matching
|
@@ -36,10 +46,8 @@
|
|
36
46
|
repetition separators the same.
|
37
47
|
* Respect 'parent's separators when building/initializing components.
|
38
48
|
* Fixed parsing logic to properly handle nested groups.
|
39
|
-
|
40
49
|
0.0.5 - 2011/09/16
|
41
50
|
* Add ability to parse transaction sets.
|
42
|
-
|
43
51
|
0.0.4
|
44
52
|
* Fix issue when no values are set in any subfield of a composite field.
|
45
53
|
* Add more segment tests.
|
data/Gemfile
CHANGED
@@ -0,0 +1,35 @@
|
|
1
|
+
module Hippo
|
2
|
+
class Parser
|
3
|
+
module Segment
|
4
|
+
def parse(input)
|
5
|
+
input.gsub!(/[\a\e\f\n\r\t\v]/,'')
|
6
|
+
fields = input.split(@field_separator)
|
7
|
+
|
8
|
+
segment_identifier = fields.shift
|
9
|
+
|
10
|
+
fields.each_with_index do |value, index|
|
11
|
+
field = self.class.fields[index]
|
12
|
+
|
13
|
+
# if the field is an array that means it is a
|
14
|
+
# composite field
|
15
|
+
if field.class == Array
|
16
|
+
composite_fields = value.split(@composite_separator)
|
17
|
+
composite_sequence = field.first.composite_sequence
|
18
|
+
|
19
|
+
self.values[composite_sequence] = {}
|
20
|
+
|
21
|
+
composite_fields.each_with_index do |comp_value, comp_index|
|
22
|
+
composite_field = field[comp_index]
|
23
|
+
|
24
|
+
self.values[composite_sequence][composite_field.sequence] = comp_value
|
25
|
+
end
|
26
|
+
else
|
27
|
+
self.values[field.sequence] = value
|
28
|
+
end
|
29
|
+
end
|
30
|
+
|
31
|
+
self
|
32
|
+
end
|
33
|
+
end
|
34
|
+
end
|
35
|
+
end
|
@@ -0,0 +1,39 @@
|
|
1
|
+
module Hippo
|
2
|
+
class Parser
|
3
|
+
module TransactionSet
|
4
|
+
attr_accessor :unparsed_data
|
5
|
+
|
6
|
+
def initialize(options={})
|
7
|
+
super
|
8
|
+
end
|
9
|
+
|
10
|
+
def find_first_segment(segments, identifier, reverse = false)
|
11
|
+
segments.reverse! if reverse
|
12
|
+
|
13
|
+
if index = segments.index{|o| o.identifier == identifier}
|
14
|
+
segments[index]
|
15
|
+
else
|
16
|
+
nil
|
17
|
+
end
|
18
|
+
end
|
19
|
+
|
20
|
+
def segments
|
21
|
+
@segments ||= @unparsed_data.split(@segment_separator).collect do |segment_string|
|
22
|
+
segment = Hippo::Segments.const_get(segment_string.split(@field_separator).first).new(:parent => self)
|
23
|
+
|
24
|
+
segment.parse(segment_string)
|
25
|
+
end
|
26
|
+
end
|
27
|
+
|
28
|
+
def read(input)
|
29
|
+
@unparsed_data = input.gsub(/[\a\e\f\n\r\t\v]/,'')
|
30
|
+
parse_separators(@unparsed_data)
|
31
|
+
end
|
32
|
+
|
33
|
+
def parse(input)
|
34
|
+
read(input)
|
35
|
+
populate(segments)
|
36
|
+
end
|
37
|
+
end
|
38
|
+
end
|
39
|
+
end
|
data/lib/hippo/parser.rb
CHANGED
@@ -1,90 +1,32 @@
|
|
1
|
-
|
1
|
+
require_relative 'parser/segment'
|
2
|
+
require_relative 'parser/transaction_set'
|
2
3
|
|
3
4
|
module Hippo
|
4
5
|
class Parser
|
5
6
|
include Hippo::Separator
|
7
|
+
include TransactionSet
|
6
8
|
|
7
|
-
|
8
|
-
|
9
|
-
def initialize(options={})
|
10
|
-
setup_separators(options)
|
11
|
-
end
|
12
|
-
|
13
|
-
def read_string(input)
|
14
|
-
@raw_data = input
|
15
|
-
remove_base_control_characters
|
16
|
-
parse_separators(@raw_data)
|
17
|
-
end
|
18
|
-
|
19
|
-
def read_file(filename)
|
20
|
-
@raw_data = File.read(filename)
|
21
|
-
remove_base_control_characters
|
22
|
-
parse_separators(@raw_data)
|
23
|
-
end
|
24
|
-
|
25
|
-
def remove_base_control_characters
|
26
|
-
@raw_data.gsub!(/[\a\e\f\n\r\t\v]/,'')
|
27
|
-
end
|
28
|
-
|
29
|
-
def initialize_segment(input)
|
30
|
-
fields = input.split(@field_separator)
|
31
|
-
|
32
|
-
segment_identifier = fields.shift
|
33
|
-
segment = Segments.const_get(segment_identifier.upcase).new
|
34
|
-
|
35
|
-
fields.each_with_index do |value, index|
|
36
|
-
field = segment.class.fields[index]
|
37
|
-
|
38
|
-
# if the field is an array that means it is a
|
39
|
-
# composite field
|
40
|
-
if field.class == Array
|
41
|
-
composite_fields = value.split(@composite_separator)
|
42
|
-
composite_sequence = field.first.composite_sequence
|
43
|
-
|
44
|
-
segment.values[composite_sequence] = {}
|
45
|
-
|
46
|
-
composite_fields.each_with_index do |comp_value, comp_index|
|
47
|
-
composite_field = field[comp_index]
|
48
|
-
|
49
|
-
segment.values[composite_sequence][composite_field.sequence] = comp_value
|
50
|
-
end
|
51
|
-
else
|
52
|
-
segment.values[field.sequence] = value
|
53
|
-
end
|
54
|
-
end
|
55
|
-
|
56
|
-
segment
|
9
|
+
def initialize
|
10
|
+
super
|
57
11
|
end
|
58
12
|
|
59
|
-
def
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
segments[index]
|
64
|
-
|
65
|
-
|
66
|
-
|
13
|
+
def initialize_transaction_set(index)
|
14
|
+
{
|
15
|
+
:segments => [],
|
16
|
+
:ISA => find_first_segment(segments[0,index + 1], 'ISA', true),
|
17
|
+
:GS => find_first_segment(segments[0,index + 1], 'GS', true),
|
18
|
+
:GE => find_first_segment(segments[index + 1, segments.length - index + 1], 'GE'),
|
19
|
+
:IEA => find_first_segment(segments[index + 1, segments.length - index + 1], 'IEA')
|
20
|
+
}
|
67
21
|
end
|
68
22
|
|
69
|
-
def
|
23
|
+
def parse_transaction_sets
|
70
24
|
raw_transaction_sets = []
|
71
|
-
segments = []
|
72
25
|
inside_transaction = false
|
73
26
|
|
74
|
-
@raw_data.split(@segment_separator).each do |segment_string|
|
75
|
-
next if segment_string.strip.empty?
|
76
|
-
|
77
|
-
segments << initialize_segment(segment_string)
|
78
|
-
end
|
79
|
-
|
80
27
|
segments.each_with_index do |segment, index|
|
81
|
-
|
82
28
|
if segment.identifier == 'ST'
|
83
|
-
raw_transaction_sets <<
|
84
|
-
:ISA => find_first_segment(segments[0,index + 1], 'ISA', true),
|
85
|
-
:GS => find_first_segment(segments[0,index + 1], 'GS', true),
|
86
|
-
:GE => find_first_segment(segments[index + 1,segments.length - index + 1], 'GE'),
|
87
|
-
:IEA => find_first_segment(segments[index + 1,segments.length - index + 1], 'IEA')}
|
29
|
+
raw_transaction_sets << initialize_transaction_set(index)
|
88
30
|
|
89
31
|
inside_transaction = true
|
90
32
|
end
|
@@ -94,36 +36,25 @@ module Hippo
|
|
94
36
|
inside_transaction = false if segment.identifier == 'SE'
|
95
37
|
end
|
96
38
|
|
97
|
-
raw_transaction_sets
|
39
|
+
raw_transaction_sets
|
40
|
+
end
|
41
|
+
|
42
|
+
def populate_transaction_sets
|
43
|
+
parse_transaction_sets.collect do |transaction|
|
98
44
|
transaction_set_id = transaction[:segments].first.ST01
|
99
45
|
transaction_set = Hippo::TransactionSets.constants.select{|c| c.to_s.end_with?(transaction_set_id) }.first
|
100
|
-
|
46
|
+
binding.pry if transaction_set.nil?
|
101
47
|
Hippo::TransactionSets.const_get(transaction_set)::Base.new(separators.merge(transaction))
|
102
48
|
end
|
103
49
|
end
|
104
50
|
|
105
51
|
def parse_file(filename)
|
106
|
-
|
107
|
-
populate_transaction_sets
|
52
|
+
parse_string(File.read(filename))
|
108
53
|
end
|
109
|
-
alias :parse :parse_file
|
110
54
|
|
111
55
|
def parse_string(input)
|
112
|
-
|
56
|
+
read(input)
|
113
57
|
populate_transaction_sets
|
114
58
|
end
|
115
59
|
end
|
116
|
-
end
|
117
|
-
|
118
|
-
if __FILE__ == $0
|
119
|
-
parser = Hippo::Parser.new
|
120
|
-
parser.parse(ARGV[0])
|
121
|
-
|
122
|
-
output_string = ''
|
123
|
-
parser.segments.each do |seg|
|
124
|
-
output_string += seg.to_s
|
125
|
-
end
|
126
|
-
|
127
|
-
puts ''
|
128
|
-
puts output_string
|
129
|
-
end
|
60
|
+
end
|
data/lib/hippo/segments/base.rb
CHANGED
@@ -1,6 +1,9 @@
|
|
1
1
|
module Hippo::Segments
|
2
2
|
class Base
|
3
3
|
include Hippo::Separator
|
4
|
+
include Hippo::Parser::Segment
|
5
|
+
include Hippo::Outputters::HTML::Segment
|
6
|
+
include Hippo::Outputters::PDF::Segment
|
4
7
|
|
5
8
|
class << self
|
6
9
|
attr_accessor :fields, :identifier, :fixed_width
|
@@ -62,7 +65,7 @@ module Hippo::Segments
|
|
62
65
|
def initialize(options = {})
|
63
66
|
@parent = options.delete(:parent)
|
64
67
|
|
65
|
-
|
68
|
+
super
|
66
69
|
end
|
67
70
|
|
68
71
|
def values
|
data/lib/hippo/segments.rb
CHANGED
@@ -1,91 +1,91 @@
|
|
1
|
+
require_relative 'segments/base'
|
2
|
+
|
1
3
|
module Hippo
|
2
4
|
module Segments
|
5
|
+
autoload_relative :AK1, 'segments/AK1'
|
6
|
+
autoload_relative :AK2, 'segments/AK2'
|
7
|
+
autoload_relative :AK9, 'segments/AK9'
|
8
|
+
autoload_relative :AMT, 'segments/AMT'
|
9
|
+
autoload_relative :BHT, 'segments/BHT'
|
10
|
+
autoload_relative :BPR, 'segments/BPR'
|
11
|
+
autoload_relative :CAS, 'segments/CAS'
|
12
|
+
autoload_relative :CL1, 'segments/CL1'
|
13
|
+
autoload_relative :CLM, 'segments/CLM'
|
14
|
+
autoload_relative :CLP, 'segments/CLP'
|
15
|
+
autoload_relative :CN1, 'segments/CN1'
|
16
|
+
autoload_relative :CR1, 'segments/CR1'
|
17
|
+
autoload_relative :CR2, 'segments/CR2'
|
18
|
+
autoload_relative :CR3, 'segments/CR3'
|
19
|
+
autoload_relative :CR4, 'segments/CR4'
|
20
|
+
autoload_relative :CR5, 'segments/CR5'
|
21
|
+
autoload_relative :CR6, 'segments/CR6'
|
22
|
+
autoload_relative :CR7, 'segments/CR7'
|
23
|
+
autoload_relative :CR8, 'segments/CR8'
|
24
|
+
autoload_relative :CRC, 'segments/CRC'
|
25
|
+
autoload_relative :CTP, 'segments/CTP'
|
26
|
+
autoload_relative :CTX, 'segments/CTX'
|
27
|
+
autoload_relative :CUR, 'segments/CUR'
|
28
|
+
autoload_relative :DMG, 'segments/DMG'
|
29
|
+
autoload_relative :DN1, 'segments/DN1'
|
30
|
+
autoload_relative :DN2, 'segments/DN2'
|
31
|
+
autoload_relative :DSB, 'segments/DSB'
|
32
|
+
autoload_relative :DTM, 'segments/DTM'
|
33
|
+
autoload_relative :DTP, 'segments/DTP'
|
34
|
+
autoload_relative :FRM, 'segments/FRM'
|
35
|
+
autoload_relative :HCP, 'segments/HCP'
|
36
|
+
autoload_relative :HI, 'segments/HI'
|
37
|
+
autoload_relative :HL, 'segments/HL'
|
38
|
+
autoload_relative :HSD, 'segments/HSD'
|
39
|
+
autoload_relative :IK3, 'segments/IK3'
|
40
|
+
autoload_relative :IK4, 'segments/IK4'
|
41
|
+
autoload_relative :IK5, 'segments/IK5'
|
42
|
+
autoload_relative :IMM, 'segments/IMM'
|
43
|
+
autoload_relative :K3, 'segments/K3'
|
44
|
+
autoload_relative :LIN, 'segments/LIN'
|
45
|
+
autoload_relative :LQ, 'segments/LQ'
|
46
|
+
autoload_relative :LX, 'segments/LX'
|
47
|
+
autoload_relative :MEA, 'segments/MEA'
|
48
|
+
autoload_relative :MIA, 'segments/MIA'
|
49
|
+
autoload_relative :MOA, 'segments/MOA'
|
50
|
+
autoload_relative :N1, 'segments/N1'
|
51
|
+
autoload_relative :N2, 'segments/N2'
|
52
|
+
autoload_relative :N3, 'segments/N3'
|
53
|
+
autoload_relative :N4, 'segments/N4'
|
54
|
+
autoload_relative :NM1, 'segments/NM1'
|
55
|
+
autoload_relative :NTE, 'segments/NTE'
|
56
|
+
autoload_relative :OI, 'segments/OI'
|
57
|
+
autoload_relative :PAT, 'segments/PAT'
|
58
|
+
autoload_relative :PER, 'segments/PER'
|
59
|
+
autoload_relative :PLB, 'segments/PLB'
|
60
|
+
autoload_relative :PRV, 'segments/PRV'
|
61
|
+
autoload_relative :PS1, 'segments/PS1'
|
62
|
+
autoload_relative :PWK, 'segments/PWK'
|
63
|
+
autoload_relative :QTY, 'segments/QTY'
|
64
|
+
autoload_relative :RDM, 'segments/RDM'
|
65
|
+
autoload_relative :REF, 'segments/REF'
|
66
|
+
autoload_relative :SBR, 'segments/SBR'
|
67
|
+
autoload_relative :SE, 'segments/SE'
|
68
|
+
autoload_relative :ST, 'segments/ST'
|
69
|
+
autoload_relative :STC, 'segments/STC'
|
70
|
+
autoload_relative :SV1, 'segments/SV1'
|
71
|
+
autoload_relative :SV2, 'segments/SV2'
|
72
|
+
autoload_relative :SV3, 'segments/SV3'
|
73
|
+
autoload_relative :SV4, 'segments/SV4'
|
74
|
+
autoload_relative :SV5, 'segments/SV5'
|
75
|
+
autoload_relative :SV6, 'segments/SV6'
|
76
|
+
autoload_relative :SV7, 'segments/SV7'
|
77
|
+
autoload_relative :SVC, 'segments/SVC'
|
78
|
+
autoload_relative :SVD, 'segments/SVD'
|
79
|
+
autoload_relative :TOO, 'segments/TOO'
|
80
|
+
autoload_relative :TRN, 'segments/TRN'
|
81
|
+
autoload_relative :TS2, 'segments/TS2'
|
82
|
+
autoload_relative :TS3, 'segments/TS3'
|
83
|
+
autoload_relative :UR, 'segments/UR'
|
3
84
|
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
autoload :BHT, 'hippo/segments/BHT'
|
10
|
-
autoload :BPR, 'hippo/segments/BPR'
|
11
|
-
autoload :CAS, 'hippo/segments/CAS'
|
12
|
-
autoload :CL1, 'hippo/segments/CL1'
|
13
|
-
autoload :CLM, 'hippo/segments/CLM'
|
14
|
-
autoload :CLP, 'hippo/segments/CLP'
|
15
|
-
autoload :CN1, 'hippo/segments/CN1'
|
16
|
-
autoload :CR1, 'hippo/segments/CR1'
|
17
|
-
autoload :CR2, 'hippo/segments/CR2'
|
18
|
-
autoload :CR3, 'hippo/segments/CR3'
|
19
|
-
autoload :CR4, 'hippo/segments/CR4'
|
20
|
-
autoload :CR5, 'hippo/segments/CR5'
|
21
|
-
autoload :CR6, 'hippo/segments/CR6'
|
22
|
-
autoload :CR7, 'hippo/segments/CR7'
|
23
|
-
autoload :CR8, 'hippo/segments/CR8'
|
24
|
-
autoload :CRC, 'hippo/segments/CRC'
|
25
|
-
autoload :CTP, 'hippo/segments/CTP'
|
26
|
-
autoload :CTX, 'hippo/segments/CTX'
|
27
|
-
autoload :CUR, 'hippo/segments/CUR'
|
28
|
-
autoload :DMG, 'hippo/segments/DMG'
|
29
|
-
autoload :DN1, 'hippo/segments/DN1'
|
30
|
-
autoload :DN2, 'hippo/segments/DN2'
|
31
|
-
autoload :DSB, 'hippo/segments/DSB'
|
32
|
-
autoload :DTM, 'hippo/segments/DTM'
|
33
|
-
autoload :DTP, 'hippo/segments/DTP'
|
34
|
-
autoload :FRM, 'hippo/segments/FRM'
|
35
|
-
autoload :HCP, 'hippo/segments/HCP'
|
36
|
-
autoload :HI, 'hippo/segments/HI'
|
37
|
-
autoload :HL, 'hippo/segments/HL'
|
38
|
-
autoload :HSD, 'hippo/segments/HSD'
|
39
|
-
autoload :IK3, 'hippo/segments/IK3'
|
40
|
-
autoload :IK4, 'hippo/segments/IK4'
|
41
|
-
autoload :IK5, 'hippo/segments/IK5'
|
42
|
-
autoload :IMM, 'hippo/segments/IMM'
|
43
|
-
autoload :K3, 'hippo/segments/K3'
|
44
|
-
autoload :LIN, 'hippo/segments/LIN'
|
45
|
-
autoload :LQ, 'hippo/segments/LQ'
|
46
|
-
autoload :LX, 'hippo/segments/LX'
|
47
|
-
autoload :MEA, 'hippo/segments/MEA'
|
48
|
-
autoload :MIA, 'hippo/segments/MIA'
|
49
|
-
autoload :MOA, 'hippo/segments/MOA'
|
50
|
-
autoload :N1, 'hippo/segments/N1'
|
51
|
-
autoload :N2, 'hippo/segments/N2'
|
52
|
-
autoload :N3, 'hippo/segments/N3'
|
53
|
-
autoload :N4, 'hippo/segments/N4'
|
54
|
-
autoload :NM1, 'hippo/segments/NM1'
|
55
|
-
autoload :NTE, 'hippo/segments/NTE'
|
56
|
-
autoload :OI, 'hippo/segments/OI'
|
57
|
-
autoload :PAT, 'hippo/segments/PAT'
|
58
|
-
autoload :PER, 'hippo/segments/PER'
|
59
|
-
autoload :PLB, 'hippo/segments/PLB'
|
60
|
-
autoload :PRV, 'hippo/segments/PRV'
|
61
|
-
autoload :PS1, 'hippo/segments/PS1'
|
62
|
-
autoload :PWK, 'hippo/segments/PWK'
|
63
|
-
autoload :QTY, 'hippo/segments/QTY'
|
64
|
-
autoload :RDM, 'hippo/segments/RDM'
|
65
|
-
autoload :REF, 'hippo/segments/REF'
|
66
|
-
autoload :SBR, 'hippo/segments/SBR'
|
67
|
-
autoload :SE, 'hippo/segments/SE'
|
68
|
-
autoload :ST, 'hippo/segments/ST'
|
69
|
-
autoload :STC, 'hippo/segments/STC'
|
70
|
-
autoload :SV1, 'hippo/segments/SV1'
|
71
|
-
autoload :SV2, 'hippo/segments/SV2'
|
72
|
-
autoload :SV3, 'hippo/segments/SV3'
|
73
|
-
autoload :SV4, 'hippo/segments/SV4'
|
74
|
-
autoload :SV5, 'hippo/segments/SV5'
|
75
|
-
autoload :SV6, 'hippo/segments/SV6'
|
76
|
-
autoload :SV7, 'hippo/segments/SV7'
|
77
|
-
autoload :SVC, 'hippo/segments/SVC'
|
78
|
-
autoload :SVD, 'hippo/segments/SVD'
|
79
|
-
autoload :TOO, 'hippo/segments/TOO'
|
80
|
-
autoload :TRN, 'hippo/segments/TRN'
|
81
|
-
autoload :TS2, 'hippo/segments/TS2'
|
82
|
-
autoload :TS3, 'hippo/segments/TS3'
|
83
|
-
autoload :UR, 'hippo/segments/UR'
|
84
|
-
|
85
|
-
autoload :ISA, 'hippo/segments/ISA'
|
86
|
-
autoload :GS, 'hippo/segments/GS'
|
87
|
-
autoload :GE, 'hippo/segments/GE'
|
88
|
-
autoload :IEA, 'hippo/segments/IEA'
|
89
|
-
autoload :TA1, 'hippo/segments/TA1'
|
85
|
+
autoload_relative :ISA, 'segments/ISA'
|
86
|
+
autoload_relative :GS, 'segments/GS'
|
87
|
+
autoload_relative :GE, 'segments/GE'
|
88
|
+
autoload_relative :IEA, 'segments/IEA'
|
89
|
+
autoload_relative :TA1, 'segments/TA1'
|
90
90
|
end
|
91
91
|
end
|
data/lib/hippo/separator.rb
CHANGED
@@ -1,8 +1,13 @@
|
|
1
1
|
module Hippo
|
2
|
+
DEFAULT_FIELD_SEPARATOR = '*'
|
3
|
+
DEFAULT_COMPOSITE_SEPARATOR = ':'
|
4
|
+
DEFAULT_SEGMENT_SEPARATOR = '~'
|
5
|
+
DEFAULT_REPETITION_SEPARATOR = '^'
|
6
|
+
|
2
7
|
module Separator
|
3
8
|
attr_accessor :field_separator, :composite_separator, :repetition_separator, :segment_separator
|
4
9
|
|
5
|
-
def
|
10
|
+
def initialize(options = {})
|
6
11
|
[:field_separator, :repetition_separator, :composite_separator, :segment_separator].each do |sym|
|
7
12
|
value = options[sym] || parent_or_default_separator(sym)
|
8
13
|
|
@@ -20,10 +25,10 @@ module Hippo
|
|
20
25
|
|
21
26
|
def parse_separators(input)
|
22
27
|
if input =~ /\AISA/
|
23
|
-
@field_separator = input[3]
|
24
|
-
@repetition_separator = input[82]
|
25
|
-
@composite_separator = input[104]
|
26
|
-
@segment_separator = input[105]
|
28
|
+
@field_separator = input[3,1]
|
29
|
+
@repetition_separator = input[82,1]
|
30
|
+
@composite_separator = input[104,1]
|
31
|
+
@segment_separator = input[105,1]
|
27
32
|
end
|
28
33
|
end
|
29
34
|
|
@@ -1,21 +1,19 @@
|
|
1
1
|
module Hippo::TransactionSets
|
2
2
|
module HIPAA_276
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
autoload :L2210E, 'hippo/transaction_sets/HIPAA_276/L2210E'
|
19
|
-
|
3
|
+
autoload_relative :Base, 'HIPAA_276/base'
|
4
|
+
autoload_relative :L2000A, 'HIPAA_276/L2000A'
|
5
|
+
autoload_relative :L2000B, 'HIPAA_276/L2000B'
|
6
|
+
autoload_relative :L2000C, 'HIPAA_276/L2000C'
|
7
|
+
autoload_relative :L2000D, 'HIPAA_276/L2000D'
|
8
|
+
autoload_relative :L2000E, 'HIPAA_276/L2000E'
|
9
|
+
autoload_relative :L2100A, 'HIPAA_276/L2100A'
|
10
|
+
autoload_relative :L2100B, 'HIPAA_276/L2100B'
|
11
|
+
autoload_relative :L2100C, 'HIPAA_276/L2100C'
|
12
|
+
autoload_relative :L2100D, 'HIPAA_276/L2100D'
|
13
|
+
autoload_relative :L2100E, 'HIPAA_276/L2100E'
|
14
|
+
autoload_relative :L2200D, 'HIPAA_276/L2200D'
|
15
|
+
autoload_relative :L2200E, 'HIPAA_276/L2200E'
|
16
|
+
autoload_relative :L2210D, 'HIPAA_276/L2210D'
|
17
|
+
autoload_relative :L2210E, 'HIPAA_276/L2210E'
|
20
18
|
end
|
21
19
|
end
|
@@ -1,24 +1,22 @@
|
|
1
1
|
module Hippo::TransactionSets
|
2
2
|
module HIPAA_277
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
autoload :L2220E, 'hippo/transaction_sets/HIPAA_277/L2220E'
|
22
|
-
|
3
|
+
autoload_relative :Base, 'HIPAA_277/base'
|
4
|
+
autoload_relative :L2000A, 'HIPAA_277/L2000A'
|
5
|
+
autoload_relative :L2000B, 'HIPAA_277/L2000B'
|
6
|
+
autoload_relative :L2000C, 'HIPAA_277/L2000C'
|
7
|
+
autoload_relative :L2000D, 'HIPAA_277/L2000D'
|
8
|
+
autoload_relative :L2000E, 'HIPAA_277/L2000E'
|
9
|
+
autoload_relative :L2100A, 'HIPAA_277/L2100A'
|
10
|
+
autoload_relative :L2100B, 'HIPAA_277/L2100B'
|
11
|
+
autoload_relative :L2100C, 'HIPAA_277/L2100C'
|
12
|
+
autoload_relative :L2100D, 'HIPAA_277/L2100D'
|
13
|
+
autoload_relative :L2100E, 'HIPAA_277/L2100E'
|
14
|
+
autoload_relative :L2200A, 'HIPAA_277/L2200A'
|
15
|
+
autoload_relative :L2200B, 'HIPAA_277/L2200B'
|
16
|
+
autoload_relative :L2200C, 'HIPAA_277/L2200C'
|
17
|
+
autoload_relative :L2200D, 'HIPAA_277/L2200D'
|
18
|
+
autoload_relative :L2200E, 'HIPAA_277/L2200E'
|
19
|
+
autoload_relative :L2220D, 'HIPAA_277/L2220D'
|
20
|
+
autoload_relative :L2220E, 'HIPAA_277/L2220E'
|
23
21
|
end
|
24
22
|
end
|
@@ -1,12 +1,10 @@
|
|
1
1
|
module Hippo::TransactionSets
|
2
2
|
module HIPAA_835
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
autoload :L2110, 'hippo/transaction_sets/HIPAA_835/L2110'
|
10
|
-
|
3
|
+
autoload_relative :Base, 'HIPAA_835/base'
|
4
|
+
autoload_relative :L1000A, 'HIPAA_835/L1000A'
|
5
|
+
autoload_relative :L1000B, 'HIPAA_835/L1000B'
|
6
|
+
autoload_relative :L2000, 'HIPAA_835/L2000'
|
7
|
+
autoload_relative :L2100, 'HIPAA_835/L2100'
|
8
|
+
autoload_relative :L2110, 'HIPAA_835/L2110'
|
11
9
|
end
|
12
10
|
end
|
@@ -1,45 +1,43 @@
|
|
1
1
|
module Hippo::TransactionSets
|
2
2
|
module HIPAA_837
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
autoload :L2440, 'hippo/transaction_sets/HIPAA_837/L2440'
|
43
|
-
|
3
|
+
autoload_relative :Base, 'HIPAA_837/base'
|
4
|
+
autoload_relative :L1000A, 'HIPAA_837/L1000A'
|
5
|
+
autoload_relative :L1000B, 'HIPAA_837/L1000B'
|
6
|
+
autoload_relative :L2000A, 'HIPAA_837/L2000A'
|
7
|
+
autoload_relative :L2000B, 'HIPAA_837/L2000B'
|
8
|
+
autoload_relative :L2000C, 'HIPAA_837/L2000C'
|
9
|
+
autoload_relative :L2010AA, 'HIPAA_837/L2010AA'
|
10
|
+
autoload_relative :L2010AB, 'HIPAA_837/L2010AB'
|
11
|
+
autoload_relative :L2010AC, 'HIPAA_837/L2010AC'
|
12
|
+
autoload_relative :L2010BA, 'HIPAA_837/L2010BA'
|
13
|
+
autoload_relative :L2010BB, 'HIPAA_837/L2010BB'
|
14
|
+
autoload_relative :L2010CA, 'HIPAA_837/L2010CA'
|
15
|
+
autoload_relative :L2300, 'HIPAA_837/L2300'
|
16
|
+
autoload_relative :L2310A, 'HIPAA_837/L2310A'
|
17
|
+
autoload_relative :L2310B, 'HIPAA_837/L2310B'
|
18
|
+
autoload_relative :L2310C, 'HIPAA_837/L2310C'
|
19
|
+
autoload_relative :L2310D, 'HIPAA_837/L2310D'
|
20
|
+
autoload_relative :L2310E, 'HIPAA_837/L2310E'
|
21
|
+
autoload_relative :L2310F, 'HIPAA_837/L2310F'
|
22
|
+
autoload_relative :L2320, 'HIPAA_837/L2320'
|
23
|
+
autoload_relative :L2330A, 'HIPAA_837/L2330A'
|
24
|
+
autoload_relative :L2330B, 'HIPAA_837/L2330B'
|
25
|
+
autoload_relative :L2330C, 'HIPAA_837/L2330C'
|
26
|
+
autoload_relative :L2330D, 'HIPAA_837/L2330D'
|
27
|
+
autoload_relative :L2330E, 'HIPAA_837/L2330E'
|
28
|
+
autoload_relative :L2330F, 'HIPAA_837/L2330F'
|
29
|
+
autoload_relative :L2330G, 'HIPAA_837/L2330G'
|
30
|
+
autoload_relative :L2400, 'HIPAA_837/L2400'
|
31
|
+
autoload_relative :L2410, 'HIPAA_837/L2410'
|
32
|
+
autoload_relative :L2420A, 'HIPAA_837/L2420A'
|
33
|
+
autoload_relative :L2420B, 'HIPAA_837/L2420B'
|
34
|
+
autoload_relative :L2420C, 'HIPAA_837/L2420C'
|
35
|
+
autoload_relative :L2420D, 'HIPAA_837/L2420D'
|
36
|
+
autoload_relative :L2420E, 'HIPAA_837/L2420E'
|
37
|
+
autoload_relative :L2420F, 'HIPAA_837/L2420F'
|
38
|
+
autoload_relative :L2420G, 'HIPAA_837/L2420G'
|
39
|
+
autoload_relative :L2420H, 'HIPAA_837/L2420H'
|
40
|
+
autoload_relative :L2430, 'HIPAA_837/L2430'
|
41
|
+
autoload_relative :L2440, 'HIPAA_837/L2440'
|
44
42
|
end
|
45
43
|
end
|
@@ -1,10 +1,8 @@
|
|
1
1
|
module Hippo::TransactionSets
|
2
2
|
module HIPAA_999
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
autoload :L2110AK2, 'hippo/transaction_sets/HIPAA_999/L2110AK2'
|
8
|
-
|
3
|
+
autoload_relative :Base, 'HIPAA_999/base'
|
4
|
+
autoload_relative :L2000AK2, 'HIPAA_999/L2000AK2'
|
5
|
+
autoload_relative :L2100AK2, 'HIPAA_999/L2100AK2'
|
6
|
+
autoload_relative :L2110AK2, 'HIPAA_999/L2110AK2'
|
9
7
|
end
|
10
8
|
end
|
@@ -1,6 +1,9 @@
|
|
1
1
|
module Hippo::TransactionSets
|
2
2
|
class Base
|
3
3
|
include Hippo::Separator
|
4
|
+
include Hippo::Parser::TransactionSet
|
5
|
+
include Hippo::Outputters::HTML::TransactionSet
|
6
|
+
include Hippo::Outputters::PDF::TransactionSet
|
4
7
|
|
5
8
|
class << self
|
6
9
|
attr_accessor :components, :identifier
|
@@ -29,7 +32,7 @@ module Hippo::TransactionSets
|
|
29
32
|
@GE = options[:GE]
|
30
33
|
@IEA = options[:IEA]
|
31
34
|
|
32
|
-
|
35
|
+
super
|
33
36
|
|
34
37
|
populate(options[:segments]) if options[:segments]
|
35
38
|
end
|
@@ -1,13 +1,13 @@
|
|
1
|
+
require_relative 'transaction_sets/base'
|
2
|
+
require_relative 'transaction_sets/component'
|
3
|
+
require_relative 'transaction_sets/repeating_component'
|
4
|
+
|
1
5
|
module Hippo
|
2
6
|
module TransactionSets
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
autoload :HIPAA_277, 'hippo/transaction_sets/HIPAA_277'
|
9
|
-
autoload :HIPAA_835, 'hippo/transaction_sets/HIPAA_835'
|
10
|
-
autoload :HIPAA_837, 'hippo/transaction_sets/HIPAA_837'
|
11
|
-
autoload :HIPAA_999, 'hippo/transaction_sets/HIPAA_999'
|
7
|
+
autoload_relative :HIPAA_276, 'transaction_sets/HIPAA_276'
|
8
|
+
autoload_relative :HIPAA_277, 'transaction_sets/HIPAA_277'
|
9
|
+
autoload_relative :HIPAA_835, 'transaction_sets/HIPAA_835'
|
10
|
+
autoload_relative :HIPAA_837, 'transaction_sets/HIPAA_837'
|
11
|
+
autoload_relative :HIPAA_999, 'transaction_sets/HIPAA_999'
|
12
12
|
end
|
13
13
|
end
|
@@ -0,0 +1,37 @@
|
|
1
|
+
# encoding: utf-8
|
2
|
+
|
3
|
+
# This is the source code for require_relative, a Ruby gem that backports that
|
4
|
+
# particular feature to Ruby 1.8.
|
5
|
+
#
|
6
|
+
# Please check out the [README](https://github.com/steveklabnik/require_relative/blob/master/README.md)
|
7
|
+
# for more information on how to build your own copy of the gem, as well as
|
8
|
+
# contribute fixes.
|
9
|
+
|
10
|
+
# require\_relative has no effect on Ruby 1.9 (or other versions that provide Kernel#require_relative
|
11
|
+
# out of the box)
|
12
|
+
unless Object.new.respond_to?(:require_relative, true)
|
13
|
+
# Yep, you're looking at it! This gem is pretty small, and for good reason.
|
14
|
+
# There's not much to do! We use split to find the filename that we're
|
15
|
+
# looking to require, raise a LoadError if it's called in a context (like eval)
|
16
|
+
# that it shouldn't be, and then require it via regular old require.
|
17
|
+
#
|
18
|
+
# Now, in 1.9, "." is totally removed from the $LOAD_PATH. We don't do that
|
19
|
+
# here, because that would break a lot of other code! You're still vulnerable
|
20
|
+
# to the security hole that caused this change to happen in the first place.
|
21
|
+
# You will be able to use this gem to transition the code you write over to
|
22
|
+
# the 1.9 syntax, though.
|
23
|
+
def require_relative(relative_feature)
|
24
|
+
|
25
|
+
file = caller.first.split(/:\d/,2).first
|
26
|
+
|
27
|
+
raise LoadError, "require_relative is called in #{$1}" if /\A\((.*)\)/ =~ file
|
28
|
+
|
29
|
+
require File.expand_path(relative_feature, File.dirname(file))
|
30
|
+
end
|
31
|
+
end
|
32
|
+
|
33
|
+
def autoload_relative(symbol, relative_path)
|
34
|
+
file = caller.first.split(/:\d/,2).first
|
35
|
+
|
36
|
+
autoload symbol, File.expand_path(relative_path, File.dirname(file))
|
37
|
+
end
|
data/lib/hippo/version.rb
CHANGED
data/lib/hippo.rb
CHANGED
@@ -1,18 +1,10 @@
|
|
1
|
-
|
2
|
-
$LOAD_PATH.unshift(libdir) unless $LOAD_PATH.include?(libdir)
|
1
|
+
require File.expand_path('hippo/utilities', File.dirname(__FILE__))
|
3
2
|
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
autoload :CodeLists, 'hippo/code_lists'
|
13
|
-
|
14
|
-
DEFAULT_FIELD_SEPARATOR = '*'
|
15
|
-
DEFAULT_COMPOSITE_SEPARATOR = ':'
|
16
|
-
DEFAULT_SEGMENT_SEPARATOR = '~'
|
17
|
-
DEFAULT_REPETITION_SEPARATOR = '^'
|
18
|
-
end
|
3
|
+
require_relative 'hippo/exceptions'
|
4
|
+
require_relative 'hippo/separator'
|
5
|
+
require_relative 'hippo/field'
|
6
|
+
require_relative 'hippo/parser'
|
7
|
+
require_relative 'hippo/outputters'
|
8
|
+
require_relative 'hippo/segments'
|
9
|
+
require_relative 'hippo/transaction_sets'
|
10
|
+
require_relative 'hippo/code_lists'
|
data/test/test_parser.rb
CHANGED
@@ -6,7 +6,7 @@ class TestParser < MiniTest::Unit::TestCase
|
|
6
6
|
end
|
7
7
|
|
8
8
|
def test_parse_returns_array_of_transaction_sets
|
9
|
-
transaction_sets = @parser.
|
9
|
+
transaction_sets = @parser.parse_file('samples/005010X221A1_business_scenario_1.edi')
|
10
10
|
|
11
11
|
assert_instance_of Array, transaction_sets
|
12
12
|
|
@@ -37,11 +37,11 @@ class TestParser < MiniTest::Unit::TestCase
|
|
37
37
|
|
38
38
|
ts_result = @parser.parse_string(ts.to_s).first
|
39
39
|
|
40
|
-
assert_equal ts.values.
|
40
|
+
assert_equal ts.values.to_s, ts_result.values.to_s
|
41
41
|
end
|
42
42
|
|
43
43
|
def test_reads_separators_from_isa
|
44
|
-
@parser.
|
44
|
+
@parser.parse_file('samples/005010X231A1_01.edi')
|
45
45
|
|
46
46
|
assert_equal '*', @parser.field_separator
|
47
47
|
assert_equal '^', @parser.repetition_separator
|
@@ -49,7 +49,7 @@ class TestParser < MiniTest::Unit::TestCase
|
|
49
49
|
assert_equal '~', @parser.segment_separator
|
50
50
|
|
51
51
|
@parser = Hippo::Parser.new
|
52
|
-
transaction_set = @parser.
|
52
|
+
transaction_set = @parser.parse_file('samples/005010X231A1_02.edi')
|
53
53
|
|
54
54
|
assert_equal '!', @parser.field_separator
|
55
55
|
assert_equal '@', @parser.repetition_separator
|
@@ -60,7 +60,7 @@ class TestParser < MiniTest::Unit::TestCase
|
|
60
60
|
end
|
61
61
|
|
62
62
|
def test_adds_enveloping_to_transaction_set
|
63
|
-
transaction_set = @parser.
|
63
|
+
transaction_set = @parser.parse_file('samples/005010X231A1_01.edi').first
|
64
64
|
|
65
65
|
assert_equal '445289179', transaction_set.ISA.ISA13
|
66
66
|
assert_equal '1', transaction_set.GS.GS06
|
@@ -81,6 +81,20 @@ class TestParser < MiniTest::Unit::TestCase
|
|
81
81
|
ts.SE
|
82
82
|
|
83
83
|
# ST*Test~TSS*Blah*Bar1*Baz1~TSS*Blah*Bar2*Baz2~TSS*Blah*Bar3*Baz3~TSS*Blah*Bar4*Baz4~TSS*Blah*Bar5*Baz5~TCS*Blah**Preset Field 7~TSS*Last Standalone Segment*Boo~SE**Test
|
84
|
-
assert_equal ts.values.
|
84
|
+
assert_equal ts.values.to_s, @parser.parse_string(ts.to_s).first.values.to_s
|
85
|
+
end
|
86
|
+
|
87
|
+
def test_parses_partial_transaction_set
|
88
|
+
ts_01 = Hippo::TransactionSets::Test::Base.new
|
89
|
+
ts_01.L0002 do |l0002|
|
90
|
+
l0002.TCS.Field2 = 'SubBarBlah'
|
91
|
+
l0002.TSS.Field2 = 'SubBarRepeater'
|
92
|
+
end
|
93
|
+
|
94
|
+
# TCS*:SubBarBlah**Foo2~TSS*Last Segment*SubBarRepeater~
|
95
|
+
ts_02 = Hippo::TransactionSets::Test::L0002.new
|
96
|
+
ts_02.parse(ts_01.to_s)
|
97
|
+
|
98
|
+
assert_equal ts_01.L0002.values.to_s, ts_02.values.to_s
|
85
99
|
end
|
86
100
|
end
|
metadata
CHANGED
@@ -1,46 +1,64 @@
|
|
1
|
-
--- !ruby/object:Gem::Specification
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
2
|
name: hippo
|
3
|
-
version: !ruby/object:Gem::Version
|
4
|
-
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
hash: 27
|
5
5
|
prerelease:
|
6
|
+
segments:
|
7
|
+
- 0
|
8
|
+
- 1
|
9
|
+
- 0
|
10
|
+
version: 0.1.0
|
6
11
|
platform: ruby
|
7
|
-
authors:
|
12
|
+
authors:
|
8
13
|
- Robert Jackson
|
9
14
|
- Jon Jackson
|
10
15
|
autorequire:
|
11
16
|
bindir: bin
|
12
17
|
cert_chain: []
|
13
|
-
|
14
|
-
|
15
|
-
|
18
|
+
|
19
|
+
date: 2012-01-05 00:00:00 -05:00
|
20
|
+
default_executable:
|
21
|
+
dependencies:
|
22
|
+
- !ruby/object:Gem::Dependency
|
16
23
|
name: minitest
|
17
|
-
|
24
|
+
prerelease: false
|
25
|
+
requirement: &id001 !ruby/object:Gem::Requirement
|
18
26
|
none: false
|
19
|
-
requirements:
|
20
|
-
- -
|
21
|
-
- !ruby/object:Gem::Version
|
22
|
-
|
27
|
+
requirements:
|
28
|
+
- - ">="
|
29
|
+
- !ruby/object:Gem::Version
|
30
|
+
hash: 3
|
31
|
+
segments:
|
32
|
+
- 0
|
33
|
+
version: "0"
|
23
34
|
type: :development
|
24
|
-
|
25
|
-
|
26
|
-
- !ruby/object:Gem::Dependency
|
35
|
+
version_requirements: *id001
|
36
|
+
- !ruby/object:Gem::Dependency
|
27
37
|
name: rake
|
28
|
-
|
38
|
+
prerelease: false
|
39
|
+
requirement: &id002 !ruby/object:Gem::Requirement
|
29
40
|
none: false
|
30
|
-
requirements:
|
41
|
+
requirements:
|
31
42
|
- - ~>
|
32
|
-
- !ruby/object:Gem::Version
|
43
|
+
- !ruby/object:Gem::Version
|
44
|
+
hash: 63
|
45
|
+
segments:
|
46
|
+
- 0
|
47
|
+
- 9
|
48
|
+
- 2
|
33
49
|
version: 0.9.2
|
34
50
|
type: :development
|
35
|
-
|
36
|
-
version_requirements: *70300927202060
|
51
|
+
version_requirements: *id002
|
37
52
|
description: HIPAA Transaction Set Generator/Parser
|
38
|
-
email:
|
53
|
+
email:
|
39
54
|
- robertj@promedicalinc.com
|
40
55
|
executables: []
|
56
|
+
|
41
57
|
extensions: []
|
58
|
+
|
42
59
|
extra_rdoc_files: []
|
43
|
-
|
60
|
+
|
61
|
+
files:
|
44
62
|
- .gitignore
|
45
63
|
- CHANGELOG
|
46
64
|
- Gemfile
|
@@ -59,8 +77,13 @@ files:
|
|
59
77
|
- lib/hippo/code_lists/taxonomy_codes.rb
|
60
78
|
- lib/hippo/exceptions.rb
|
61
79
|
- lib/hippo/field.rb
|
62
|
-
- lib/hippo/
|
80
|
+
- lib/hippo/outputters.rb
|
81
|
+
- lib/hippo/outputters/html.rb
|
82
|
+
- lib/hippo/outputters/paper_claim.rb
|
83
|
+
- lib/hippo/outputters/pdf.rb
|
63
84
|
- lib/hippo/parser.rb
|
85
|
+
- lib/hippo/parser/segment.rb
|
86
|
+
- lib/hippo/parser/transaction_set.rb
|
64
87
|
- lib/hippo/segments.rb
|
65
88
|
- lib/hippo/segments/AK1.rb
|
66
89
|
- lib/hippo/segments/AK2.rb
|
@@ -242,6 +265,7 @@ files:
|
|
242
265
|
- lib/hippo/transaction_sets/base.rb
|
243
266
|
- lib/hippo/transaction_sets/component.rb
|
244
267
|
- lib/hippo/transaction_sets/repeating_component.rb
|
268
|
+
- lib/hippo/utilities.rb
|
245
269
|
- lib/hippo/version.rb
|
246
270
|
- samples/005010X221A1_business_scenario_1.edi
|
247
271
|
- samples/005010X221A1_tmhp_example.edi
|
@@ -255,31 +279,41 @@ files:
|
|
255
279
|
- test/test_parser.rb
|
256
280
|
- test/test_segments_base.rb
|
257
281
|
- test/test_transaction_sets_base.rb
|
282
|
+
has_rdoc: true
|
258
283
|
homepage: http://github.com/promedical/hippo
|
259
284
|
licenses: []
|
285
|
+
|
260
286
|
post_install_message:
|
261
287
|
rdoc_options: []
|
262
|
-
|
288
|
+
|
289
|
+
require_paths:
|
263
290
|
- lib
|
264
|
-
required_ruby_version: !ruby/object:Gem::Requirement
|
291
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
265
292
|
none: false
|
266
|
-
requirements:
|
267
|
-
- -
|
268
|
-
- !ruby/object:Gem::Version
|
269
|
-
|
270
|
-
|
293
|
+
requirements:
|
294
|
+
- - ">="
|
295
|
+
- !ruby/object:Gem::Version
|
296
|
+
hash: 3
|
297
|
+
segments:
|
298
|
+
- 0
|
299
|
+
version: "0"
|
300
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
271
301
|
none: false
|
272
|
-
requirements:
|
273
|
-
- -
|
274
|
-
- !ruby/object:Gem::Version
|
275
|
-
|
302
|
+
requirements:
|
303
|
+
- - ">="
|
304
|
+
- !ruby/object:Gem::Version
|
305
|
+
hash: 3
|
306
|
+
segments:
|
307
|
+
- 0
|
308
|
+
version: "0"
|
276
309
|
requirements: []
|
310
|
+
|
277
311
|
rubyforge_project: hippo
|
278
|
-
rubygems_version: 1.
|
312
|
+
rubygems_version: 1.6.2
|
279
313
|
signing_key:
|
280
314
|
specification_version: 3
|
281
315
|
summary: HIPAA Transaction Set Generator/Parser
|
282
|
-
test_files:
|
316
|
+
test_files:
|
283
317
|
- test/test_helper.rb
|
284
318
|
- test/test_hipaa_835.rb
|
285
319
|
- test/test_hipaa_837.rb
|
data/lib/hippo/loop.rb
DELETED
File without changes
|