ruby-hl7 1.3.1 → 1.3.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile.lock +27 -18
- data/NOTES.md +10 -0
- data/Rakefile +1 -2
- data/VERSION +1 -1
- data/lib/ruby-hl7.rb +1 -1
- data/lib/segments/gt1.rb +75 -0
- data/ruby-hl7.gemspec +6 -4
- data/spec/gt1_segment_spec.rb +32 -0
- metadata +42 -12
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 0f5ead5ef17c9902d7eaa3cd1dd395c9a93563b5342cbf82c6e4430e7dd9d544
|
4
|
+
data.tar.gz: cf6c1e622e6c319a4cfd522882f151b6ee1e13c1b8a56b3d573994f32294c571
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 7b314809f29f718930bd306f4e7ebde28613e5f874cde1e214ea8b9a2d16c4902b31e5b3a8848ad25dca9499ea49eca2933b77e2edf6f8a4a41a8287b05a839c
|
7
|
+
data.tar.gz: ece6c824cbf7fe70280af62ee2a2769015665f007261fe7b6472218d033c6d2644f9c93892838acc76193c1003f90988690fec551b76a22839df9ce93c2b7a31
|
data/Gemfile.lock
CHANGED
@@ -1,36 +1,43 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
ruby-hl7 (1.3.
|
4
|
+
ruby-hl7 (1.3.2)
|
5
5
|
|
6
6
|
GEM
|
7
7
|
remote: https://rubygems.org/
|
8
8
|
specs:
|
9
9
|
coderay (1.1.2)
|
10
10
|
diff-lcs (1.3)
|
11
|
-
docile (1.3.
|
12
|
-
ffi (1.
|
11
|
+
docile (1.3.2)
|
12
|
+
ffi (1.12.2-java)
|
13
13
|
json (1.8.6)
|
14
14
|
json (1.8.6-java)
|
15
|
-
method_source (0.9.
|
16
|
-
pry (0.
|
15
|
+
method_source (0.9.2)
|
16
|
+
pry (0.12.2)
|
17
17
|
coderay (~> 1.1.0)
|
18
18
|
method_source (~> 0.9.0)
|
19
|
-
pry (0.
|
19
|
+
pry (0.12.2-java)
|
20
20
|
coderay (~> 1.1.0)
|
21
21
|
method_source (~> 0.9.0)
|
22
22
|
spoon (~> 0.0)
|
23
|
-
rake (
|
23
|
+
rake (13.0.1)
|
24
|
+
rake-contrib (1.0.0)
|
25
|
+
rake
|
24
26
|
rdoc (3.12.2)
|
25
27
|
json (~> 1.4)
|
26
|
-
rspec (
|
27
|
-
rspec-core (~>
|
28
|
-
rspec-expectations (~>
|
29
|
-
rspec-mocks (~>
|
30
|
-
rspec-core (
|
31
|
-
|
32
|
-
|
33
|
-
|
28
|
+
rspec (3.9.0)
|
29
|
+
rspec-core (~> 3.9.0)
|
30
|
+
rspec-expectations (~> 3.9.0)
|
31
|
+
rspec-mocks (~> 3.9.0)
|
32
|
+
rspec-core (3.9.1)
|
33
|
+
rspec-support (~> 3.9.1)
|
34
|
+
rspec-expectations (3.9.0)
|
35
|
+
diff-lcs (>= 1.2.0, < 2.0)
|
36
|
+
rspec-support (~> 3.9.0)
|
37
|
+
rspec-mocks (3.9.1)
|
38
|
+
diff-lcs (>= 1.2.0, < 2.0)
|
39
|
+
rspec-support (~> 3.9.0)
|
40
|
+
rspec-support (3.9.2)
|
34
41
|
simplecov (0.16.1)
|
35
42
|
docile (~> 1.1)
|
36
43
|
json (>= 1.8, < 3)
|
@@ -47,11 +54,13 @@ PLATFORMS
|
|
47
54
|
DEPENDENCIES
|
48
55
|
bundler (~> 1.17)
|
49
56
|
pry
|
50
|
-
rake (
|
57
|
+
rake (>= 12.3.3)
|
58
|
+
rake-contrib
|
51
59
|
rdoc (~> 3.12)
|
52
|
-
rspec (
|
60
|
+
rspec (>= 3.9.0)
|
53
61
|
ruby-hl7!
|
54
|
-
simplecov (
|
62
|
+
simplecov (= 0.16.1)
|
63
|
+
simplecov-html (~> 0.10.0)
|
55
64
|
|
56
65
|
BUNDLED WITH
|
57
66
|
1.17.2
|
data/NOTES.md
CHANGED
@@ -1,5 +1,15 @@
|
|
1
1
|
## Overview
|
2
2
|
|
3
|
+
**Version 1.3.2**
|
4
|
+
Added GT1 segment
|
5
|
+
Updated dependencies
|
6
|
+
|
7
|
+
https://github.com/ruby-hl7/ruby-hl7/pull/111
|
8
|
+
https://github.com/ruby-hl7/ruby-hl7/pull/108
|
9
|
+
|
10
|
+
Thanks to:
|
11
|
+
@gusIreland
|
12
|
+
|
3
13
|
**Version 1.3.1**
|
4
14
|
Added FT1 segment
|
5
15
|
Updated gemspec dependencies
|
data/Rakefile
CHANGED
@@ -3,7 +3,6 @@ require 'rubygems'
|
|
3
3
|
require 'rake'
|
4
4
|
require 'rdoc/task'
|
5
5
|
require 'rubygems/package_task'
|
6
|
-
require 'rake/contrib/sshpublisher'
|
7
6
|
require 'rbconfig'
|
8
7
|
require 'rspec'
|
9
8
|
require 'rspec/core/rake_task'
|
@@ -18,7 +17,7 @@ require 'segment_generator'
|
|
18
17
|
require 'segment'
|
19
18
|
|
20
19
|
full_name = "Ruby-HL7"
|
21
|
-
RAKEVERSION =
|
20
|
+
RAKEVERSION = "12.3.3"
|
22
21
|
|
23
22
|
# Many of these tasks were garnered from zenspider's Hoe
|
24
23
|
# just forced to work my way
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
1.3.
|
1
|
+
1.3.2
|
data/lib/ruby-hl7.rb
CHANGED
data/lib/segments/gt1.rb
ADDED
@@ -0,0 +1,75 @@
|
|
1
|
+
module HL7
|
2
|
+
class Message::Segment::GT1 < HL7::Message::Segment
|
3
|
+
add_field :set_id
|
4
|
+
add_field :guarantor_number
|
5
|
+
add_field :guarantor_name
|
6
|
+
add_field :guarantor_spouse_name
|
7
|
+
add_field :guarantor_address
|
8
|
+
add_field :guarantor_home_phone
|
9
|
+
add_field :guarantor_business_phone
|
10
|
+
add_field :guarantor_date_of_birth
|
11
|
+
add_field :guarantor_sex do |sex|
|
12
|
+
unless /^[FMOUANC]$/.match(sex) || sex == nil || sex == ""
|
13
|
+
raise HL7::InvalidDataError.new( "bad administrative sex value (not F|M|O|U|A|N|C)" )
|
14
|
+
end
|
15
|
+
sex = "" unless sex
|
16
|
+
sex
|
17
|
+
end
|
18
|
+
add_field :guarantor_type
|
19
|
+
add_field :guarantor_relationship
|
20
|
+
add_field :guarantor_ssn
|
21
|
+
add_field :guarantor_begin_date do |value|
|
22
|
+
convert_to_ts(value)
|
23
|
+
end
|
24
|
+
add_field :guarantor_end_date do |value|
|
25
|
+
convert_to_ts(value)
|
26
|
+
end
|
27
|
+
add_field :guarantor_priority
|
28
|
+
add_field :guarantor_employer_name
|
29
|
+
add_field :guarantor_employer_address
|
30
|
+
add_field :guarantor_employer_phone
|
31
|
+
add_field :guarantor_employee_id
|
32
|
+
add_field :guarantor_employment_status
|
33
|
+
add_field :guarantor_billing_hold_flag
|
34
|
+
add_field :guarantor_date_of_death do |value|
|
35
|
+
convert_to_ts(value)
|
36
|
+
end
|
37
|
+
add_field :guarantor_death_flag
|
38
|
+
add_field :guarantor_charge_adjustment_code
|
39
|
+
add_field :guarantor_household_annual_income
|
40
|
+
add_field :guarantor_household_size
|
41
|
+
add_field :guarantor_employer_id_number
|
42
|
+
add_field :guarantor_marital_status_code
|
43
|
+
add_field :guarantor_hire_effective_date do |value|
|
44
|
+
convert_to_ts(value)
|
45
|
+
end
|
46
|
+
add_field :employment_stop_date do |value|
|
47
|
+
convert_to_ts(value)
|
48
|
+
end
|
49
|
+
add_field :living_dependency
|
50
|
+
add_field :ambulatory_status
|
51
|
+
add_field :citizenship
|
52
|
+
add_field :primary_language
|
53
|
+
add_field :living_arrangement
|
54
|
+
add_field :publicity_indicator
|
55
|
+
add_field :protection_indicator
|
56
|
+
add_field :student_indicator
|
57
|
+
add_field :religion
|
58
|
+
add_field :mothers_maiden_name
|
59
|
+
add_field :nationality
|
60
|
+
add_field :ethnic_group
|
61
|
+
add_field :contact_persons_name
|
62
|
+
add_field :contact_persons_phone_number
|
63
|
+
add_field :contact_reason
|
64
|
+
add_field :contact_relationship
|
65
|
+
add_field :contact_job_title
|
66
|
+
add_field :job_code
|
67
|
+
add_field :guarantor_employers_organization
|
68
|
+
add_field :handicap
|
69
|
+
add_field :job_status
|
70
|
+
add_field :guarantor_financial_class
|
71
|
+
add_field :guarantor_race
|
72
|
+
add_field :guarantor_birth_place
|
73
|
+
add_field :vip_indicator
|
74
|
+
end
|
75
|
+
end
|
data/ruby-hl7.gemspec
CHANGED
@@ -5,7 +5,7 @@
|
|
5
5
|
|
6
6
|
Gem::Specification.new do |s|
|
7
7
|
s.name = %q{ruby-hl7}
|
8
|
-
s.version = "1.3.
|
8
|
+
s.version = "1.3.2"
|
9
9
|
|
10
10
|
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
11
11
|
s.authors = ["Mark Guzman"]
|
@@ -30,8 +30,10 @@ Gem::Specification.new do |s|
|
|
30
30
|
|
31
31
|
s.add_development_dependency 'bundler', '~> 1.17'
|
32
32
|
s.add_development_dependency 'pry'
|
33
|
-
s.add_development_dependency 'rake', '
|
33
|
+
s.add_development_dependency 'rake', '>= 12.3.3'
|
34
34
|
s.add_development_dependency 'rdoc', '~> 3.12'
|
35
|
-
s.add_development_dependency 'rspec', '
|
36
|
-
s.add_development_dependency 'simplecov', '
|
35
|
+
s.add_development_dependency 'rspec', '>= 3.9.0'
|
36
|
+
s.add_development_dependency 'simplecov', '= 0.16.1'
|
37
|
+
s.add_development_dependency 'simplecov-html', '~> 0.10.0'
|
38
|
+
s.add_development_dependency 'rake-contrib'
|
37
39
|
end
|
@@ -0,0 +1,32 @@
|
|
1
|
+
# encoding: UTF-8
|
2
|
+
require 'spec_helper'
|
3
|
+
|
4
|
+
describe HL7::Message::Segment::GT1 do
|
5
|
+
context 'general' do
|
6
|
+
before :all do
|
7
|
+
@base_gt1 = 'GT1||440|Crusher^Beverly||1003 Elm Street^^Enterprise^MD^29433|(330)644-1234^^^bcrusher@ufp.net^^330^6441234| |19600411000000|F||18|339-33-6657||||||||F||||||||||M'
|
8
|
+
end
|
9
|
+
|
10
|
+
it 'creates an GT1 segment' do
|
11
|
+
expect do
|
12
|
+
gt1 = HL7::Message::Segment::GT1.new( @base_gt1 )
|
13
|
+
expect(gt1).not_to be_nil
|
14
|
+
expect(gt1.to_s).to eq @base_gt1
|
15
|
+
end.not_to raise_error
|
16
|
+
end
|
17
|
+
|
18
|
+
it 'allows access to an GT1 segment' do
|
19
|
+
expect do
|
20
|
+
gt1 = HL7::Message::Segment::GT1.new( @base_gt1 )
|
21
|
+
expect(gt1.guarantor_number).to eq '440'
|
22
|
+
expect(gt1.guarantor_name).to eq 'Crusher^Beverly'
|
23
|
+
expect(gt1.guarantor_address).to eq '1003 Elm Street^^Enterprise^MD^29433'
|
24
|
+
expect(gt1.guarantor_date_of_birth).to eq '19600411000000'
|
25
|
+
expect(gt1.guarantor_sex).to eq 'F'
|
26
|
+
expect(gt1.guarantor_relationship).to eq '18'
|
27
|
+
expect(gt1.guarantor_ssn).to eq '339-33-6657'
|
28
|
+
expect(gt1.guarantor_employment_status).to eq 'F'
|
29
|
+
end.not_to raise_error
|
30
|
+
end
|
31
|
+
end
|
32
|
+
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: ruby-hl7
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.3.
|
4
|
+
version: 1.3.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Mark Guzman
|
@@ -42,16 +42,16 @@ dependencies:
|
|
42
42
|
name: rake
|
43
43
|
requirement: !ruby/object:Gem::Requirement
|
44
44
|
requirements:
|
45
|
-
- - "
|
45
|
+
- - ">="
|
46
46
|
- !ruby/object:Gem::Version
|
47
|
-
version:
|
47
|
+
version: 12.3.3
|
48
48
|
type: :development
|
49
49
|
prerelease: false
|
50
50
|
version_requirements: !ruby/object:Gem::Requirement
|
51
51
|
requirements:
|
52
|
-
- - "
|
52
|
+
- - ">="
|
53
53
|
- !ruby/object:Gem::Version
|
54
|
-
version:
|
54
|
+
version: 12.3.3
|
55
55
|
- !ruby/object:Gem::Dependency
|
56
56
|
name: rdoc
|
57
57
|
requirement: !ruby/object:Gem::Requirement
|
@@ -70,30 +70,58 @@ dependencies:
|
|
70
70
|
name: rspec
|
71
71
|
requirement: !ruby/object:Gem::Requirement
|
72
72
|
requirements:
|
73
|
-
- - "
|
73
|
+
- - ">="
|
74
74
|
- !ruby/object:Gem::Version
|
75
|
-
version:
|
75
|
+
version: 3.9.0
|
76
76
|
type: :development
|
77
77
|
prerelease: false
|
78
78
|
version_requirements: !ruby/object:Gem::Requirement
|
79
79
|
requirements:
|
80
|
-
- - "
|
80
|
+
- - ">="
|
81
81
|
- !ruby/object:Gem::Version
|
82
|
-
version:
|
82
|
+
version: 3.9.0
|
83
83
|
- !ruby/object:Gem::Dependency
|
84
84
|
name: simplecov
|
85
|
+
requirement: !ruby/object:Gem::Requirement
|
86
|
+
requirements:
|
87
|
+
- - '='
|
88
|
+
- !ruby/object:Gem::Version
|
89
|
+
version: 0.16.1
|
90
|
+
type: :development
|
91
|
+
prerelease: false
|
92
|
+
version_requirements: !ruby/object:Gem::Requirement
|
93
|
+
requirements:
|
94
|
+
- - '='
|
95
|
+
- !ruby/object:Gem::Version
|
96
|
+
version: 0.16.1
|
97
|
+
- !ruby/object:Gem::Dependency
|
98
|
+
name: simplecov-html
|
85
99
|
requirement: !ruby/object:Gem::Requirement
|
86
100
|
requirements:
|
87
101
|
- - "~>"
|
88
102
|
- !ruby/object:Gem::Version
|
89
|
-
version:
|
103
|
+
version: 0.10.0
|
90
104
|
type: :development
|
91
105
|
prerelease: false
|
92
106
|
version_requirements: !ruby/object:Gem::Requirement
|
93
107
|
requirements:
|
94
108
|
- - "~>"
|
95
109
|
- !ruby/object:Gem::Version
|
96
|
-
version:
|
110
|
+
version: 0.10.0
|
111
|
+
- !ruby/object:Gem::Dependency
|
112
|
+
name: rake-contrib
|
113
|
+
requirement: !ruby/object:Gem::Requirement
|
114
|
+
requirements:
|
115
|
+
- - ">="
|
116
|
+
- !ruby/object:Gem::Version
|
117
|
+
version: '0'
|
118
|
+
type: :development
|
119
|
+
prerelease: false
|
120
|
+
version_requirements: !ruby/object:Gem::Requirement
|
121
|
+
requirements:
|
122
|
+
- - ">="
|
123
|
+
- !ruby/object:Gem::Version
|
124
|
+
version: '0'
|
97
125
|
description: A simple library to parse and generate HL7 2.x messages
|
98
126
|
email: ruby-hl7@googlegroups.com
|
99
127
|
executables: []
|
@@ -133,6 +161,7 @@ files:
|
|
133
161
|
- lib/segments/evn.rb
|
134
162
|
- lib/segments/ft1.rb
|
135
163
|
- lib/segments/fts.rb
|
164
|
+
- lib/segments/gt1.rb
|
136
165
|
- lib/segments/in1.rb
|
137
166
|
- lib/segments/mfe.rb
|
138
167
|
- lib/segments/mfi.rb
|
@@ -172,6 +201,7 @@ files:
|
|
172
201
|
- spec/evn_segment_spec.rb
|
173
202
|
- spec/ft1_segment_spec.rb
|
174
203
|
- spec/fts_segment_spec.rb
|
204
|
+
- spec/gt1_segment_spec.rb
|
175
205
|
- spec/in1_segment_spec.rb
|
176
206
|
- spec/message_spec.rb
|
177
207
|
- spec/messages_spec.rb
|
@@ -246,7 +276,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
246
276
|
- !ruby/object:Gem::Version
|
247
277
|
version: '0'
|
248
278
|
requirements: []
|
249
|
-
rubygems_version: 3.0.
|
279
|
+
rubygems_version: 3.0.4
|
250
280
|
signing_key:
|
251
281
|
specification_version: 4
|
252
282
|
summary: Ruby HL7 Library
|