ruby-hl7 1.3.0 → 1.3.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
- SHA1:
3
- metadata.gz: 2bd60d7ea43a61d43ad3cb37f9271310f002f595
4
- data.tar.gz: 6689e9e620ad9ba0d6391eb0ca5504dd84ce8802
2
+ SHA256:
3
+ metadata.gz: 5d1bf39d6497034437096aa8f883174d12f551e9267a265900bb92fd5fdd4fd0
4
+ data.tar.gz: 50a233633bab8ab35d835a4eb0ff5c0f5a335099163c1e823fd538e8baef56ba
5
5
  SHA512:
6
- metadata.gz: 17fbea8014712fac948f7adc2af0fd800c5e248dc9596d7fba6529224f44418818e0b1516894ec3f7120fbb1fccd099209b6c086937c2415e5b561b96c31f379
7
- data.tar.gz: 30e760b9a7b4f2bfc3309f3eec68df101e21898ff74b035d13d168d71383d5a50fa292679eeee9e32b4fbf43961a7e92be6b2473de3b99a1a511b599edd4db7f
6
+ metadata.gz: 8d7512bbf77e9536c8d717da6c295468263d7a18db9b003372b83a3aeed33af2a2b13711e3f36f4f462cb1b44155c09cb295fa01c38156fe31140effc10f9764
7
+ data.tar.gz: 6197aeafd1612de0eb017a9724c0f396176d70e287d24f8722b699f21bf8a33e6b993a738ee6a71085adb1d0f7b04cd9372921e82607c7b021b3b3850cd76f04
@@ -1,9 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- ruby-hl7 (1.3.0)
5
- rake (~> 11.0)
6
- rdoc (~> 3.12)
4
+ ruby-hl7 (1.3.1)
7
5
 
8
6
  GEM
9
7
  remote: https://rubygems.org/
@@ -49,10 +47,11 @@ PLATFORMS
49
47
  DEPENDENCIES
50
48
  bundler (~> 1.17)
51
49
  pry
50
+ rake (~> 11.0)
51
+ rdoc (~> 3.12)
52
52
  rspec (~> 2.99)
53
53
  ruby-hl7!
54
54
  simplecov (~> 0.15)
55
55
 
56
56
  BUNDLED WITH
57
57
  1.17.2
58
-
data/NOTES.md CHANGED
@@ -1,5 +1,15 @@
1
1
  ## Overview
2
2
 
3
+ **Version 1.3.1**
4
+ Added FT1 segment
5
+ Updated gemspec dependencies
6
+
7
+ https://github.com/ruby-hl7/ruby-hl7/pull/102
8
+ https://github.com/ruby-hl7/ruby-hl7/pull/94
9
+
10
+ Thanks to:
11
+ @raulperezalejo @anujbiyani
12
+
3
13
  **Version 1.3.0**
4
14
  Removed ZCF segment
5
15
  Renamed PID-12 from country_code to county_code (deprecation warnings)
data/VERSION CHANGED
@@ -1 +1 @@
1
- 1.3.0
1
+ 1.3.1
@@ -21,7 +21,7 @@ require 'stringio'
21
21
  require 'date'
22
22
 
23
23
  module HL7 # :nodoc:
24
- VERSION = '1.3.0'
24
+ VERSION = '1.3.1'
25
25
  def self.ParserConfig
26
26
  @parser_cfg ||= { :empty_segment_is_error => true }
27
27
  end
@@ -0,0 +1,63 @@
1
+ module HL7
2
+ class Message::Segment::FT1 < HL7::Message::Segment
3
+ weight 10
4
+ add_field :set_id
5
+ add_field :transaction_id
6
+ add_field :transaction_batch_id
7
+ add_field :date_of_service do |value|
8
+ convert_to_ts(value)
9
+ end
10
+ add_field :transaction_posting_date do |value|
11
+ convert_to_ts(value)
12
+ end
13
+ add_field :transaction_type
14
+ add_field :transaction_code
15
+ add_field :transaction_description
16
+ add_field :transaction_description_alt
17
+ add_field :transaction_quantity
18
+ add_field :transaction_amount_extended
19
+ add_field :transaction_amount_unit
20
+ add_field :department_code
21
+ add_field :insurance_plan_id
22
+ add_field :insurance_amount
23
+ add_field :assigned_patient_location
24
+ add_field :fees_schedule
25
+ add_field :patient_type
26
+
27
+ # https://www.findacode.com/icd-9/icd-9-cm-diagnosis-codes.html
28
+ # http://www.icd10data.com/ICD10CM/Codes
29
+ add_field :diagnosis_code
30
+
31
+ # https://en.wikipedia.org/wiki/National_Provider_Identifier
32
+ add_field :performed_by_provider
33
+
34
+ add_field :ordering_provider
35
+ add_field :unit_cost
36
+ add_field :filler_order_number
37
+ add_field :entered_by
38
+
39
+ # https://en.wikipedia.org/wiki/Current_Procedural_Terminology (CPT)
40
+ add_field :procedure_code
41
+
42
+ add_field :procedure_code_modifier
43
+ add_field :advanced_beneficiary_notice_code
44
+ add_field :medically_necessary_duplicate_procedure_reason
45
+ add_field :ndc_code
46
+ add_field :payment_reference_id
47
+ add_field :transaction_reference_key
48
+ add_field :performing_facility
49
+ add_field :ordering_facility
50
+ add_field :item_number
51
+ add_field :model_number
52
+ add_field :special_processing_code
53
+ add_field :clinic_code
54
+ add_field :referral_number
55
+ add_field :authorization_number
56
+ add_field :service_provider_taxonomy_code
57
+ add_field :revenue_code
58
+ add_field :prescription_number
59
+ add_field :ndc_qty_and_uom
60
+
61
+
62
+ end
63
+ end
@@ -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.0"
8
+ s.version = "1.3.1"
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"]
@@ -28,11 +28,10 @@ Gem::Specification.new do |s|
28
28
  s.summary = %q{Ruby HL7 Library}
29
29
  s.license = "MIT"
30
30
 
31
- s.add_dependency 'rake', '~> 11.0'
32
- s.add_dependency 'rdoc', '~> 3.12'
33
-
34
31
  s.add_development_dependency 'bundler', '~> 1.17'
35
- s.add_development_dependency 'simplecov', '~> 0.15'
36
- s.add_development_dependency 'rspec', '~> 2.99'
37
32
  s.add_development_dependency 'pry'
33
+ s.add_development_dependency 'rake', '~> 11.0'
34
+ s.add_development_dependency 'rdoc', '~> 3.12'
35
+ s.add_development_dependency 'rspec', '~> 2.99'
36
+ s.add_development_dependency 'simplecov', '~> 0.15'
38
37
  end
@@ -0,0 +1,35 @@
1
+ # encoding: UTF-8
2
+ require 'spec_helper'
3
+
4
+ describe HL7::Message::Segment::FT1 do
5
+ context 'general' do
6
+ before :all do
7
+ @base_ft1 = 'FT1|1|||20180705|20180705|||Description||1||||||123456^The Location|||R45.82^Worries~H18.892^Other specified disorders of cornea|1043312457^Provider^Testing^^^^|1043312457^Provider^Testing^^^^||||99392^HEART FAILURE COMPOSITE|'
8
+ end
9
+
10
+ it 'creates an FT1 segment' do
11
+ expect do
12
+ ft1 = HL7::Message::Segment::FT1.new( @base_ft1 )
13
+ expect(ft1).not_to be_nil
14
+ expect(ft1.to_s).to eq @base_ft1
15
+ end.not_to raise_error
16
+ end
17
+
18
+ it 'allows access to an FT1 segment' do
19
+ expect do
20
+ ft1 = HL7::Message::Segment::FT1.new( @base_ft1 )
21
+ expect(ft1.set_id).to eq '1'
22
+ expect(ft1.date_of_service).to eq '20180705'
23
+ expect(ft1.transaction_posting_date).to eq '20180705'
24
+ expect(ft1.transaction_description).to eq 'Description'
25
+ expect(ft1.transaction_quantity).to eq '1'
26
+ expect(ft1.assigned_patient_location).to eq '123456^The Location'
27
+ expect(ft1.diagnosis_code).to eq 'R45.82^Worries~H18.892^Other specified disorders of cornea'
28
+ expect(ft1.performed_by_provider).to eq '1043312457^Provider^Testing^^^^'
29
+ expect(ft1.ordering_provider).to eq '1043312457^Provider^Testing^^^^'
30
+ expect(ft1.procedure_code).to eq '99392^HEART FAILURE COMPOSITE'
31
+
32
+ end.not_to raise_error
33
+ end
34
+ end
35
+ 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.0
4
+ version: 1.3.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Mark Guzman
@@ -11,61 +11,61 @@ cert_chain: []
11
11
  date: 2014-09-09 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
- name: rake
14
+ name: bundler
15
15
  requirement: !ruby/object:Gem::Requirement
16
16
  requirements:
17
17
  - - "~>"
18
18
  - !ruby/object:Gem::Version
19
- version: '11.0'
20
- type: :runtime
19
+ version: '1.17'
20
+ type: :development
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
24
  - - "~>"
25
25
  - !ruby/object:Gem::Version
26
- version: '11.0'
26
+ version: '1.17'
27
27
  - !ruby/object:Gem::Dependency
28
- name: rdoc
28
+ name: pry
29
29
  requirement: !ruby/object:Gem::Requirement
30
30
  requirements:
31
- - - "~>"
31
+ - - ">="
32
32
  - !ruby/object:Gem::Version
33
- version: '3.12'
34
- type: :runtime
33
+ version: '0'
34
+ type: :development
35
35
  prerelease: false
36
36
  version_requirements: !ruby/object:Gem::Requirement
37
37
  requirements:
38
- - - "~>"
38
+ - - ">="
39
39
  - !ruby/object:Gem::Version
40
- version: '3.12'
40
+ version: '0'
41
41
  - !ruby/object:Gem::Dependency
42
- name: bundler
42
+ name: rake
43
43
  requirement: !ruby/object:Gem::Requirement
44
44
  requirements:
45
45
  - - "~>"
46
46
  - !ruby/object:Gem::Version
47
- version: '1.17'
47
+ version: '11.0'
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: '1.17'
54
+ version: '11.0'
55
55
  - !ruby/object:Gem::Dependency
56
- name: simplecov
56
+ name: rdoc
57
57
  requirement: !ruby/object:Gem::Requirement
58
58
  requirements:
59
59
  - - "~>"
60
60
  - !ruby/object:Gem::Version
61
- version: '0.15'
61
+ version: '3.12'
62
62
  type: :development
63
63
  prerelease: false
64
64
  version_requirements: !ruby/object:Gem::Requirement
65
65
  requirements:
66
66
  - - "~>"
67
67
  - !ruby/object:Gem::Version
68
- version: '0.15'
68
+ version: '3.12'
69
69
  - !ruby/object:Gem::Dependency
70
70
  name: rspec
71
71
  requirement: !ruby/object:Gem::Requirement
@@ -81,19 +81,19 @@ dependencies:
81
81
  - !ruby/object:Gem::Version
82
82
  version: '2.99'
83
83
  - !ruby/object:Gem::Dependency
84
- name: pry
84
+ name: simplecov
85
85
  requirement: !ruby/object:Gem::Requirement
86
86
  requirements:
87
- - - ">="
87
+ - - "~>"
88
88
  - !ruby/object:Gem::Version
89
- version: '0'
89
+ version: '0.15'
90
90
  type: :development
91
91
  prerelease: false
92
92
  version_requirements: !ruby/object:Gem::Requirement
93
93
  requirements:
94
- - - ">="
94
+ - - "~>"
95
95
  - !ruby/object:Gem::Version
96
- version: '0'
96
+ version: '0.15'
97
97
  description: A simple library to parse and generate HL7 2.x messages
98
98
  email: ruby-hl7@googlegroups.com
99
99
  executables: []
@@ -131,6 +131,7 @@ files:
131
131
  - lib/segments/dg1.rb
132
132
  - lib/segments/err.rb
133
133
  - lib/segments/evn.rb
134
+ - lib/segments/ft1.rb
134
135
  - lib/segments/fts.rb
135
136
  - lib/segments/in1.rb
136
137
  - lib/segments/mfe.rb
@@ -169,6 +170,7 @@ files:
169
170
  - spec/dynamic_segment_def_spec.rb
170
171
  - spec/err_segment_spec.rb
171
172
  - spec/evn_segment_spec.rb
173
+ - spec/ft1_segment_spec.rb
172
174
  - spec/fts_segment_spec.rb
173
175
  - spec/in1_segment_spec.rb
174
176
  - spec/message_spec.rb
@@ -244,8 +246,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
244
246
  - !ruby/object:Gem::Version
245
247
  version: '0'
246
248
  requirements: []
247
- rubyforge_project: ruby-hl7
248
- rubygems_version: 2.4.5.1
249
+ rubygems_version: 3.0.1
249
250
  signing_key:
250
251
  specification_version: 4
251
252
  summary: Ruby HL7 Library