hippo 0.1.1 → 0.1.2
Sign up to get free protection for your applications and to get access to all the features.
- data/CHANGELOG +3 -0
- data/lib/hippo/outputters/html.rb +7 -1
- data/lib/hippo/outputters/pdf.rb +5 -0
- data/lib/hippo/segments/AK3.rb +40 -0
- data/lib/hippo/segments/AK4.rb +63 -0
- data/lib/hippo/segments/AK5.rb +55 -0
- data/lib/hippo/segments.rb +3 -0
- data/lib/hippo/transaction_sets/HIPAA_997/L2000.rb +36 -0
- data/lib/hippo/transaction_sets/HIPAA_997/L2100.rb +29 -0
- data/lib/hippo/transaction_sets/HIPAA_997/base.rb +49 -0
- data/lib/hippo/transaction_sets/HIPAA_997.rb +7 -0
- data/lib/hippo/transaction_sets/repeating_component.rb +3 -0
- data/lib/hippo/transaction_sets.rb +1 -0
- data/lib/hippo/version.rb +1 -1
- metadata +13 -6
data/CHANGELOG
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
module Hippo::Outputters
|
1
|
+
module Hippo::Outputters
|
2
2
|
module HTML
|
3
3
|
module TransactionSet
|
4
4
|
def to_html
|
@@ -24,6 +24,12 @@ module Hippo::Outputters
|
|
24
24
|
end
|
25
25
|
end
|
26
26
|
|
27
|
+
module RepeatingComponent
|
28
|
+
def to_html
|
29
|
+
map{|component| component.to_html}.join
|
30
|
+
end
|
31
|
+
end
|
32
|
+
|
27
33
|
module Segment
|
28
34
|
def to_html
|
29
35
|
to_s
|
data/lib/hippo/outputters/pdf.rb
CHANGED
@@ -0,0 +1,40 @@
|
|
1
|
+
module Hippo::Segments
|
2
|
+
class AK3 < Hippo::Segments::Base
|
3
|
+
|
4
|
+
segment_identifier 'AK3'
|
5
|
+
|
6
|
+
field :name => 'SegmentIdCode',
|
7
|
+
:sequence => 1,
|
8
|
+
:datatype => :list,
|
9
|
+
:minimum => 2,
|
10
|
+
:maximum => 3,
|
11
|
+
:required => true,
|
12
|
+
:data_element_number => 721
|
13
|
+
|
14
|
+
field :name => 'SegmentPositionInTransactionSet',
|
15
|
+
:sequence => 2,
|
16
|
+
:datatype => :numeric,
|
17
|
+
:decimal => 0,
|
18
|
+
:minimum => 1,
|
19
|
+
:maximum => 10,
|
20
|
+
:required => true,
|
21
|
+
:data_element_number => 719
|
22
|
+
|
23
|
+
field :name => 'LoopIdentifierCode',
|
24
|
+
:sequence => 3,
|
25
|
+
:datatype => :string,
|
26
|
+
:minimum => 1,
|
27
|
+
:maximum => 4,
|
28
|
+
:required => false,
|
29
|
+
:data_element_number => 447
|
30
|
+
|
31
|
+
field :name => 'SegmentSyntaxErrorCode',
|
32
|
+
:sequence => 4,
|
33
|
+
:datatype => :list,
|
34
|
+
:minimum => 1,
|
35
|
+
:maximum => 3,
|
36
|
+
:required => false,
|
37
|
+
:data_element_number => 720
|
38
|
+
|
39
|
+
end
|
40
|
+
end
|
@@ -0,0 +1,63 @@
|
|
1
|
+
module Hippo::Segments
|
2
|
+
class AK4 < Hippo::Segments::Base
|
3
|
+
|
4
|
+
segment_identifier 'AK4'
|
5
|
+
|
6
|
+
composite_field 'PositionInSegment' do
|
7
|
+
|
8
|
+
field :name => 'ElementPositionInSegment',
|
9
|
+
:sequence => 1,
|
10
|
+
:datatype => :numeric,
|
11
|
+
:decimal => 0,
|
12
|
+
:minimum => 1,
|
13
|
+
:maximum => 2,
|
14
|
+
:required => true,
|
15
|
+
:data_element_number => 722
|
16
|
+
|
17
|
+
field :name => 'ComponentDataElementPositionInComposite',
|
18
|
+
:sequence => 2,
|
19
|
+
:datatype => :numeric,
|
20
|
+
:decimal => 0,
|
21
|
+
:minimum => 1,
|
22
|
+
:maximum => 2,
|
23
|
+
:required => false,
|
24
|
+
:data_element_number => 1528
|
25
|
+
|
26
|
+
field :name => 'RepeatingDataElementPosition',
|
27
|
+
:sequence => 3,
|
28
|
+
:datatype => :numeric,
|
29
|
+
:decimal => 0,
|
30
|
+
:minimum => 1,
|
31
|
+
:maximum => 4,
|
32
|
+
:required => false,
|
33
|
+
:data_element_number => 1686
|
34
|
+
|
35
|
+
end
|
36
|
+
|
37
|
+
field :name => 'DataElementReferenceNumber',
|
38
|
+
:sequence => 2,
|
39
|
+
:datatype => :numeric,
|
40
|
+
:decimal => 0,
|
41
|
+
:minimum => 1,
|
42
|
+
:maximum => 4,
|
43
|
+
:required => false,
|
44
|
+
:data_element_number => 725
|
45
|
+
|
46
|
+
field :name => 'DataElementSyntaxErrorCode',
|
47
|
+
:sequence => 3,
|
48
|
+
:datatype => :list,
|
49
|
+
:minimum => 1,
|
50
|
+
:maximum => 3,
|
51
|
+
:required => true,
|
52
|
+
:data_element_number => 723
|
53
|
+
|
54
|
+
field :name => 'CopyOfBadDataElement',
|
55
|
+
:sequence => 4,
|
56
|
+
:datatype => :string,
|
57
|
+
:minimum => 1,
|
58
|
+
:maximum => 99,
|
59
|
+
:required => false,
|
60
|
+
:data_element_number => 724
|
61
|
+
|
62
|
+
end
|
63
|
+
end
|
@@ -0,0 +1,55 @@
|
|
1
|
+
module Hippo::Segments
|
2
|
+
class AK5 < Hippo::Segments::Base
|
3
|
+
|
4
|
+
segment_identifier 'AK5'
|
5
|
+
|
6
|
+
field :name => 'TransactionSetAcknowledgmentCode',
|
7
|
+
:sequence => 1,
|
8
|
+
:datatype => :list,
|
9
|
+
:minimum => 1,
|
10
|
+
:maximum => 1,
|
11
|
+
:required => true,
|
12
|
+
:data_element_number => 717
|
13
|
+
|
14
|
+
field :name => 'TransactionSetSyntaxErrorCode',
|
15
|
+
:sequence => 2,
|
16
|
+
:datatype => :list,
|
17
|
+
:minimum => 1,
|
18
|
+
:maximum => 3,
|
19
|
+
:required => false,
|
20
|
+
:data_element_number => 718
|
21
|
+
|
22
|
+
field :name => 'TransactionSetSyntaxErrorCode',
|
23
|
+
:sequence => 3,
|
24
|
+
:datatype => :list,
|
25
|
+
:minimum => 1,
|
26
|
+
:maximum => 3,
|
27
|
+
:required => false,
|
28
|
+
:data_element_number => 718
|
29
|
+
|
30
|
+
field :name => 'TransactionSetSyntaxErrorCode',
|
31
|
+
:sequence => 4,
|
32
|
+
:datatype => :list,
|
33
|
+
:minimum => 1,
|
34
|
+
:maximum => 3,
|
35
|
+
:required => false,
|
36
|
+
:data_element_number => 718
|
37
|
+
|
38
|
+
field :name => 'TransactionSetSyntaxErrorCode',
|
39
|
+
:sequence => 5,
|
40
|
+
:datatype => :list,
|
41
|
+
:minimum => 1,
|
42
|
+
:maximum => 3,
|
43
|
+
:required => false,
|
44
|
+
:data_element_number => 718
|
45
|
+
|
46
|
+
field :name => 'TransactionSetSyntaxErrorCode',
|
47
|
+
:sequence => 6,
|
48
|
+
:datatype => :list,
|
49
|
+
:minimum => 1,
|
50
|
+
:maximum => 3,
|
51
|
+
:required => false,
|
52
|
+
:data_element_number => 718
|
53
|
+
|
54
|
+
end
|
55
|
+
end
|
data/lib/hippo/segments.rb
CHANGED
@@ -4,6 +4,9 @@ module Hippo
|
|
4
4
|
module Segments
|
5
5
|
autoload_relative :AK1, 'segments/AK1'
|
6
6
|
autoload_relative :AK2, 'segments/AK2'
|
7
|
+
autoload_relative :AK3, 'segments/AK3'
|
8
|
+
autoload_relative :AK4, 'segments/AK4'
|
9
|
+
autoload_relative :AK5, 'segments/AK5'
|
7
10
|
autoload_relative :AK9, 'segments/AK9'
|
8
11
|
autoload_relative :AMT, 'segments/AMT'
|
9
12
|
autoload_relative :BHT, 'segments/BHT'
|
@@ -0,0 +1,36 @@
|
|
1
|
+
module Hippo::TransactionSets
|
2
|
+
module HIPAA_997
|
3
|
+
|
4
|
+
class L2000 < Hippo::TransactionSets::Base
|
5
|
+
loop_name 'L2000' #Transaction Set Response Header
|
6
|
+
|
7
|
+
#Transaction Set Response Header
|
8
|
+
segment Hippo::Segments::AK2,
|
9
|
+
:name => 'Transaction Set Response Header',
|
10
|
+
:minimum => 0,
|
11
|
+
:maximum => 1,
|
12
|
+
:position => 300
|
13
|
+
|
14
|
+
#AK2/AK3 Error Identification
|
15
|
+
loop Hippo::TransactionSets::HIPAA_997::L2100,
|
16
|
+
:name => 'AK2/AK3 Error Identification',
|
17
|
+
:minimum => 0,
|
18
|
+
:maximum => 99999,
|
19
|
+
:position => 400,
|
20
|
+
:identified_by => {
|
21
|
+
'AK3.AK304' => ["1", "2", "3", "4", "5", "6", "7", "8"]
|
22
|
+
}
|
23
|
+
|
24
|
+
#Transaction Set Response Trailer
|
25
|
+
segment Hippo::Segments::AK5,
|
26
|
+
:name => 'Transaction Set Response Trailer',
|
27
|
+
:minimum => 1,
|
28
|
+
:maximum => 1,
|
29
|
+
:position => 600,
|
30
|
+
:identified_by => {
|
31
|
+
'AK501' => ["A", "E", "M", "R", "W", "X"]
|
32
|
+
}
|
33
|
+
|
34
|
+
end
|
35
|
+
end
|
36
|
+
end
|
@@ -0,0 +1,29 @@
|
|
1
|
+
module Hippo::TransactionSets
|
2
|
+
module HIPAA_997
|
3
|
+
|
4
|
+
class L2100 < Hippo::TransactionSets::Base
|
5
|
+
loop_name 'L2100' #AK2/AK3 Error Identification
|
6
|
+
|
7
|
+
#AK2/AK3 Error Identification
|
8
|
+
segment Hippo::Segments::AK3,
|
9
|
+
:name => 'AK2/AK3 Error Identification',
|
10
|
+
:minimum => 0,
|
11
|
+
:maximum => 1,
|
12
|
+
:position => 400,
|
13
|
+
:identified_by => {
|
14
|
+
'AK304' => ["1", "2", "3", "4", "5", "6", "7", "8"]
|
15
|
+
}
|
16
|
+
|
17
|
+
#Data Element Note
|
18
|
+
segment Hippo::Segments::AK4,
|
19
|
+
:name => 'Data Element Note',
|
20
|
+
:minimum => 0,
|
21
|
+
:maximum => 99,
|
22
|
+
:position => 500,
|
23
|
+
:identified_by => {
|
24
|
+
'AK403' => ["1", "2", "3", "4", "5", "6", "7", "8", "9", "10", "12", "13"]
|
25
|
+
}
|
26
|
+
|
27
|
+
end
|
28
|
+
end
|
29
|
+
end
|
@@ -0,0 +1,49 @@
|
|
1
|
+
module Hippo::TransactionSets
|
2
|
+
module HIPAA_997
|
3
|
+
|
4
|
+
class Base < Hippo::TransactionSets::Base
|
5
|
+
|
6
|
+
#Transaction Set Header
|
7
|
+
segment Hippo::Segments::ST,
|
8
|
+
:name => 'Transaction Set Header',
|
9
|
+
:minimum => 1,
|
10
|
+
:maximum => 1,
|
11
|
+
:position => 100,
|
12
|
+
:identified_by => {
|
13
|
+
'ST01' => '997'
|
14
|
+
}
|
15
|
+
|
16
|
+
#Functional Group Response Header
|
17
|
+
segment Hippo::Segments::AK1,
|
18
|
+
:name => 'Functional Group Response Header',
|
19
|
+
:minimum => 1,
|
20
|
+
:maximum => 1,
|
21
|
+
:position => 200
|
22
|
+
|
23
|
+
#Transaction Set Response Header
|
24
|
+
loop Hippo::TransactionSets::HIPAA_997::L2000,
|
25
|
+
:name => 'Transaction Set Response Header',
|
26
|
+
:minimum => 0,
|
27
|
+
:maximum => 99999,
|
28
|
+
:position => 300
|
29
|
+
|
30
|
+
#Functional Group Response Trailer
|
31
|
+
segment Hippo::Segments::AK9,
|
32
|
+
:name => 'Functional Group Response Trailer',
|
33
|
+
:minimum => 1,
|
34
|
+
:maximum => 1,
|
35
|
+
:position => 700,
|
36
|
+
:identified_by => {
|
37
|
+
'AK901' => ["A", "E", "M", "P", "R", "W", "X"]
|
38
|
+
}
|
39
|
+
|
40
|
+
#Transaction Set Trailer
|
41
|
+
segment Hippo::Segments::SE,
|
42
|
+
:name => 'Transaction Set Trailer',
|
43
|
+
:minimum => 1,
|
44
|
+
:maximum => 1,
|
45
|
+
:position => 800
|
46
|
+
|
47
|
+
end
|
48
|
+
end
|
49
|
+
end
|
@@ -1,5 +1,8 @@
|
|
1
1
|
module Hippo::TransactionSets
|
2
2
|
class RepeatingComponent < Array
|
3
|
+
include Hippo::Outputters::HTML::RepeatingComponent
|
4
|
+
include Hippo::Outputters::PDF::RepeatingComponent
|
5
|
+
|
3
6
|
def initialize(component_entry, parent)
|
4
7
|
@component_entry = component_entry
|
5
8
|
@parent = parent
|
@@ -8,6 +8,7 @@ module Hippo
|
|
8
8
|
autoload_relative :HIPAA_277, 'transaction_sets/HIPAA_277'
|
9
9
|
autoload_relative :HIPAA_835, 'transaction_sets/HIPAA_835'
|
10
10
|
autoload_relative :HIPAA_837, 'transaction_sets/HIPAA_837'
|
11
|
+
autoload_relative :HIPAA_997, 'transaction_sets/HIPAA_997'
|
11
12
|
autoload_relative :HIPAA_999, 'transaction_sets/HIPAA_999'
|
12
13
|
end
|
13
14
|
end
|
data/lib/hippo/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: hippo
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.2
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -10,11 +10,11 @@ authors:
|
|
10
10
|
autorequire:
|
11
11
|
bindir: bin
|
12
12
|
cert_chain: []
|
13
|
-
date: 2012-01-
|
13
|
+
date: 2012-01-18 00:00:00.000000000 Z
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
16
16
|
name: minitest
|
17
|
-
requirement: &
|
17
|
+
requirement: &70166488433960 !ruby/object:Gem::Requirement
|
18
18
|
none: false
|
19
19
|
requirements:
|
20
20
|
- - ! '>='
|
@@ -22,10 +22,10 @@ dependencies:
|
|
22
22
|
version: '0'
|
23
23
|
type: :development
|
24
24
|
prerelease: false
|
25
|
-
version_requirements: *
|
25
|
+
version_requirements: *70166488433960
|
26
26
|
- !ruby/object:Gem::Dependency
|
27
27
|
name: rake
|
28
|
-
requirement: &
|
28
|
+
requirement: &70166488433460 !ruby/object:Gem::Requirement
|
29
29
|
none: false
|
30
30
|
requirements:
|
31
31
|
- - ~>
|
@@ -33,7 +33,7 @@ dependencies:
|
|
33
33
|
version: 0.9.2
|
34
34
|
type: :development
|
35
35
|
prerelease: false
|
36
|
-
version_requirements: *
|
36
|
+
version_requirements: *70166488433460
|
37
37
|
description: HIPAA Transaction Set Generator/Parser
|
38
38
|
email:
|
39
39
|
- robertj@promedicalinc.com
|
@@ -69,6 +69,9 @@ files:
|
|
69
69
|
- lib/hippo/segments.rb
|
70
70
|
- lib/hippo/segments/AK1.rb
|
71
71
|
- lib/hippo/segments/AK2.rb
|
72
|
+
- lib/hippo/segments/AK3.rb
|
73
|
+
- lib/hippo/segments/AK4.rb
|
74
|
+
- lib/hippo/segments/AK5.rb
|
72
75
|
- lib/hippo/segments/AK9.rb
|
73
76
|
- lib/hippo/segments/AMT.rb
|
74
77
|
- lib/hippo/segments/BHT.rb
|
@@ -236,6 +239,10 @@ files:
|
|
236
239
|
- lib/hippo/transaction_sets/HIPAA_837/L2430.rb
|
237
240
|
- lib/hippo/transaction_sets/HIPAA_837/L2440.rb
|
238
241
|
- lib/hippo/transaction_sets/HIPAA_837/base.rb
|
242
|
+
- lib/hippo/transaction_sets/HIPAA_997.rb
|
243
|
+
- lib/hippo/transaction_sets/HIPAA_997/L2000.rb
|
244
|
+
- lib/hippo/transaction_sets/HIPAA_997/L2100.rb
|
245
|
+
- lib/hippo/transaction_sets/HIPAA_997/base.rb
|
239
246
|
- lib/hippo/transaction_sets/HIPAA_999.rb
|
240
247
|
- lib/hippo/transaction_sets/HIPAA_999/L2000 - AK2.rb
|
241
248
|
- lib/hippo/transaction_sets/HIPAA_999/L2000AK2.rb
|