ruby-hl7 1.3.0 → 1.3.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +5 -5
- data/Gemfile.lock +31 -24
- data/NOTES.md +30 -0
- data/Rakefile +1 -2
- data/VERSION +1 -1
- data/lib/ruby-hl7.rb +1 -1
- data/lib/segments/ft1.rb +63 -0
- data/lib/segments/gt1.rb +75 -0
- data/lib/segments/txa.rb +28 -0
- data/ruby-hl7.gemspec +7 -6
- data/spec/ft1_segment_spec.rb +35 -0
- data/spec/gt1_segment_spec.rb +32 -0
- data/spec/txa_segment_spec.rb +72 -0
- metadata +59 -26
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
|
-
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: e12909d9bf4258faa015ede7da03afce19e915640b8aa240c99c993bf938acd3
|
4
|
+
data.tar.gz: 54bea819722c67aab4342ad667dc54b141ea6ac0bbb180070f467c12fb45f893
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 119f5c5c4bb3063d3a6e6abcc50309590e677be55f2f75fd91c69a7907a9adbac247462573fe9e5973fc37cf8416c8ba0aabcc87ca81709cf56a557773d27429
|
7
|
+
data.tar.gz: 427934f749b5dde398e4e6c236472ad8e2cb514380945ed6f35bf99dd9b41448a9572ef438ddc247e229d7df82055f289c8a2966a06ee9087d82d0f2c20d0fee
|
data/Gemfile.lock
CHANGED
@@ -1,38 +1,42 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
ruby-hl7 (1.3.
|
5
|
-
rake (~> 11.0)
|
6
|
-
rdoc (~> 3.12)
|
4
|
+
ruby-hl7 (1.3.3)
|
7
5
|
|
8
6
|
GEM
|
9
7
|
remote: https://rubygems.org/
|
10
8
|
specs:
|
11
9
|
coderay (1.1.2)
|
12
10
|
diff-lcs (1.3)
|
13
|
-
docile (1.3.
|
14
|
-
ffi (1.
|
15
|
-
json (
|
16
|
-
json (
|
17
|
-
method_source (0.9.
|
18
|
-
pry (0.
|
11
|
+
docile (1.3.2)
|
12
|
+
ffi (1.12.2-java)
|
13
|
+
json (2.5.1)
|
14
|
+
json (2.5.1-java)
|
15
|
+
method_source (0.9.2)
|
16
|
+
pry (0.12.2)
|
19
17
|
coderay (~> 1.1.0)
|
20
18
|
method_source (~> 0.9.0)
|
21
|
-
pry (0.
|
19
|
+
pry (0.12.2-java)
|
22
20
|
coderay (~> 1.1.0)
|
23
21
|
method_source (~> 0.9.0)
|
24
22
|
spoon (~> 0.0)
|
25
|
-
rake (
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
rspec-
|
31
|
-
rspec-
|
32
|
-
|
33
|
-
rspec-
|
34
|
-
|
35
|
-
rspec-
|
23
|
+
rake (13.0.1)
|
24
|
+
rake-contrib (1.0.0)
|
25
|
+
rake
|
26
|
+
rdoc (6.3.1)
|
27
|
+
rspec (3.9.0)
|
28
|
+
rspec-core (~> 3.9.0)
|
29
|
+
rspec-expectations (~> 3.9.0)
|
30
|
+
rspec-mocks (~> 3.9.0)
|
31
|
+
rspec-core (3.9.1)
|
32
|
+
rspec-support (~> 3.9.1)
|
33
|
+
rspec-expectations (3.9.0)
|
34
|
+
diff-lcs (>= 1.2.0, < 2.0)
|
35
|
+
rspec-support (~> 3.9.0)
|
36
|
+
rspec-mocks (3.9.1)
|
37
|
+
diff-lcs (>= 1.2.0, < 2.0)
|
38
|
+
rspec-support (~> 3.9.0)
|
39
|
+
rspec-support (3.9.2)
|
36
40
|
simplecov (0.16.1)
|
37
41
|
docile (~> 1.1)
|
38
42
|
json (>= 1.8, < 3)
|
@@ -49,10 +53,13 @@ PLATFORMS
|
|
49
53
|
DEPENDENCIES
|
50
54
|
bundler (~> 1.17)
|
51
55
|
pry
|
52
|
-
|
56
|
+
rake (>= 12.3.3)
|
57
|
+
rake-contrib
|
58
|
+
rdoc (~> 6.3)
|
59
|
+
rspec (>= 3.9.0)
|
53
60
|
ruby-hl7!
|
54
|
-
simplecov (
|
61
|
+
simplecov (= 0.16.1)
|
62
|
+
simplecov-html (~> 0.10.0)
|
55
63
|
|
56
64
|
BUNDLED WITH
|
57
65
|
1.17.2
|
58
|
-
|
data/NOTES.md
CHANGED
@@ -1,5 +1,35 @@
|
|
1
1
|
## Overview
|
2
2
|
|
3
|
+
**Version 1.3.3**
|
4
|
+
Update RDoc
|
5
|
+
Added TXA segment
|
6
|
+
|
7
|
+
https://github.com/ruby-hl7/ruby-hl7/pull/118
|
8
|
+
https://github.com/ruby-hl7/ruby-hl7/pull/117
|
9
|
+
|
10
|
+
Thanks to:
|
11
|
+
@Stratus3D and @rodrigofhm
|
12
|
+
|
13
|
+
**Version 1.3.2**
|
14
|
+
Added GT1 segment
|
15
|
+
Updated dependencies
|
16
|
+
|
17
|
+
https://github.com/ruby-hl7/ruby-hl7/pull/111
|
18
|
+
https://github.com/ruby-hl7/ruby-hl7/pull/108
|
19
|
+
|
20
|
+
Thanks to:
|
21
|
+
@gusIreland
|
22
|
+
|
23
|
+
**Version 1.3.1**
|
24
|
+
Added FT1 segment
|
25
|
+
Updated gemspec dependencies
|
26
|
+
|
27
|
+
https://github.com/ruby-hl7/ruby-hl7/pull/102
|
28
|
+
https://github.com/ruby-hl7/ruby-hl7/pull/94
|
29
|
+
|
30
|
+
Thanks to:
|
31
|
+
@raulperezalejo @anujbiyani
|
32
|
+
|
3
33
|
**Version 1.3.0**
|
4
34
|
Removed ZCF segment
|
5
35
|
Renamed PID-12 from country_code to county_code (deprecation warnings)
|
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.3
|
data/lib/ruby-hl7.rb
CHANGED
data/lib/segments/ft1.rb
ADDED
@@ -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
|
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/lib/segments/txa.rb
ADDED
@@ -0,0 +1,28 @@
|
|
1
|
+
class HL7::Message::Segment::TXA < HL7::Message::Segment
|
2
|
+
add_field :set_id
|
3
|
+
add_field :document_type
|
4
|
+
add_field :document_content_presentation
|
5
|
+
add_field :activity_date_time
|
6
|
+
add_field :primary_activity_provider_code
|
7
|
+
add_field :origination_date_time
|
8
|
+
add_field :transcription_date_time
|
9
|
+
add_field :edit_date_time
|
10
|
+
add_field :originator_code
|
11
|
+
add_field :assigned_document_authenticator
|
12
|
+
add_field :transcriptionist_code
|
13
|
+
add_field :unique_document_number
|
14
|
+
add_field :parent_document_number
|
15
|
+
add_field :placer_order_number
|
16
|
+
add_field :filler_order_number
|
17
|
+
add_field :unique_document_file_name
|
18
|
+
add_field :document_completion_status
|
19
|
+
add_field :document_confidentiality_status
|
20
|
+
add_field :document_availability_status
|
21
|
+
add_field :document_storage_status
|
22
|
+
add_field :document_change_reason
|
23
|
+
add_field :authentication_person_time_stamp
|
24
|
+
add_field :distributed_copies_code
|
25
|
+
add_field :folder_assignment
|
26
|
+
add_field :document_title
|
27
|
+
add_field :agreed_due_date_time
|
28
|
+
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.3"
|
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,12 @@ 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', '>= 12.3.3'
|
34
|
+
s.add_development_dependency 'rdoc', '~> 6.3'
|
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'
|
38
39
|
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
|
@@ -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
|
@@ -0,0 +1,72 @@
|
|
1
|
+
# encoding: UTF-8
|
2
|
+
require 'spec_helper'
|
3
|
+
|
4
|
+
describe HL7::Message::Segment::TXA do
|
5
|
+
let(:segment) do
|
6
|
+
"TXA|1|AR|AP|20220611113300|1^Name|20220611|2022061110||1^Creator|" \
|
7
|
+
"1^Author|1^Typer|A^V02^UID^TC|A^V01^UID^TC|01|02|file.txt|C|P|AV|ST||" \
|
8
|
+
"2022061110|DC|AR|FileName|202206111011"
|
9
|
+
end
|
10
|
+
let(:filled_txa) { HL7::Message::Segment::TXA.new segment }
|
11
|
+
|
12
|
+
it 'allows access to an TXA segment' do
|
13
|
+
expect(filled_txa.set_id).to eq('1')
|
14
|
+
expect(filled_txa.document_type).to eq('AR')
|
15
|
+
expect(filled_txa.document_content_presentation).to eq('AP')
|
16
|
+
expect(filled_txa.activity_date_time).to eq('20220611113300')
|
17
|
+
expect(filled_txa.primary_activity_provider_code).to eq('1^Name')
|
18
|
+
expect(filled_txa.origination_date_time).to eq('20220611')
|
19
|
+
expect(filled_txa.transcription_date_time).to eq('2022061110')
|
20
|
+
expect(filled_txa.edit_date_time).to eq('')
|
21
|
+
expect(filled_txa.originator_code).to eq('1^Creator')
|
22
|
+
expect(filled_txa.assigned_document_authenticator).to eq('1^Author')
|
23
|
+
expect(filled_txa.transcriptionist_code).to eq('1^Typer')
|
24
|
+
expect(filled_txa.unique_document_number).to eq('A^V02^UID^TC')
|
25
|
+
expect(filled_txa.parent_document_number).to eq('A^V01^UID^TC')
|
26
|
+
expect(filled_txa.placer_order_number).to eq('01')
|
27
|
+
expect(filled_txa.filler_order_number).to eq('02')
|
28
|
+
expect(filled_txa.unique_document_file_name).to eq('file.txt')
|
29
|
+
expect(filled_txa.document_completion_status).to eq('C')
|
30
|
+
expect(filled_txa.document_confidentiality_status).to eq('P')
|
31
|
+
expect(filled_txa.document_availability_status).to eq('AV')
|
32
|
+
expect(filled_txa.document_storage_status).to eq('ST')
|
33
|
+
expect(filled_txa.document_change_reason).to eq('')
|
34
|
+
expect(filled_txa.authentication_person_time_stamp).to eq('2022061110')
|
35
|
+
expect(filled_txa.distributed_copies_code).to eq('DC')
|
36
|
+
expect(filled_txa.folder_assignment).to eq('AR')
|
37
|
+
expect(filled_txa.document_title).to eq('FileName')
|
38
|
+
expect(filled_txa.agreed_due_date_time).to eq('202206111011')
|
39
|
+
end
|
40
|
+
|
41
|
+
it 'allows creation of an TXA segment' do
|
42
|
+
txa = HL7::Message::Segment::TXA.new
|
43
|
+
txa.set_id = '1'
|
44
|
+
txa.document_type = 'AR'
|
45
|
+
txa.document_content_presentation = 'AP'
|
46
|
+
txa.activity_date_time = '20220611113300'
|
47
|
+
txa.primary_activity_provider_code = '1^Name'
|
48
|
+
txa.origination_date_time = '20220611'
|
49
|
+
txa.transcription_date_time = '2022061110'
|
50
|
+
txa.edit_date_time = ''
|
51
|
+
txa.originator_code = '1^Creator'
|
52
|
+
txa.assigned_document_authenticator = '1^Author'
|
53
|
+
txa.transcriptionist_code = '1^Typer'
|
54
|
+
txa.unique_document_number = 'A^V02^UID^TC'
|
55
|
+
txa.parent_document_number = 'A^V01^UID^TC'
|
56
|
+
txa.placer_order_number = '01'
|
57
|
+
txa.filler_order_number = '02'
|
58
|
+
txa.unique_document_file_name = 'file.txt'
|
59
|
+
txa.document_completion_status = 'C'
|
60
|
+
txa.document_confidentiality_status = 'P'
|
61
|
+
txa.document_availability_status = 'AV'
|
62
|
+
txa.document_storage_status = 'ST'
|
63
|
+
txa.document_change_reason = ''
|
64
|
+
txa.authentication_person_time_stamp = '2022061110'
|
65
|
+
txa.distributed_copies_code = 'DC'
|
66
|
+
txa.folder_assignment = 'AR'
|
67
|
+
txa.document_title = 'FileName'
|
68
|
+
txa.agreed_due_date_time = '202206111011'
|
69
|
+
|
70
|
+
expect(txa.to_s).to eq(segment)
|
71
|
+
end
|
72
|
+
end
|
metadata
CHANGED
@@ -1,87 +1,115 @@
|
|
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.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Mark Guzman
|
8
|
-
autorequire:
|
8
|
+
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
11
|
date: 2014-09-09 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
|
-
name:
|
14
|
+
name: bundler
|
15
15
|
requirement: !ruby/object:Gem::Requirement
|
16
16
|
requirements:
|
17
17
|
- - "~>"
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version: '
|
20
|
-
type: :
|
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: '
|
26
|
+
version: '1.17'
|
27
|
+
- !ruby/object:Gem::Dependency
|
28
|
+
name: pry
|
29
|
+
requirement: !ruby/object:Gem::Requirement
|
30
|
+
requirements:
|
31
|
+
- - ">="
|
32
|
+
- !ruby/object:Gem::Version
|
33
|
+
version: '0'
|
34
|
+
type: :development
|
35
|
+
prerelease: false
|
36
|
+
version_requirements: !ruby/object:Gem::Requirement
|
37
|
+
requirements:
|
38
|
+
- - ">="
|
39
|
+
- !ruby/object:Gem::Version
|
40
|
+
version: '0'
|
41
|
+
- !ruby/object:Gem::Dependency
|
42
|
+
name: rake
|
43
|
+
requirement: !ruby/object:Gem::Requirement
|
44
|
+
requirements:
|
45
|
+
- - ">="
|
46
|
+
- !ruby/object:Gem::Version
|
47
|
+
version: 12.3.3
|
48
|
+
type: :development
|
49
|
+
prerelease: false
|
50
|
+
version_requirements: !ruby/object:Gem::Requirement
|
51
|
+
requirements:
|
52
|
+
- - ">="
|
53
|
+
- !ruby/object:Gem::Version
|
54
|
+
version: 12.3.3
|
27
55
|
- !ruby/object:Gem::Dependency
|
28
56
|
name: rdoc
|
29
57
|
requirement: !ruby/object:Gem::Requirement
|
30
58
|
requirements:
|
31
59
|
- - "~>"
|
32
60
|
- !ruby/object:Gem::Version
|
33
|
-
version: '3
|
34
|
-
type: :
|
61
|
+
version: '6.3'
|
62
|
+
type: :development
|
35
63
|
prerelease: false
|
36
64
|
version_requirements: !ruby/object:Gem::Requirement
|
37
65
|
requirements:
|
38
66
|
- - "~>"
|
39
67
|
- !ruby/object:Gem::Version
|
40
|
-
version: '3
|
68
|
+
version: '6.3'
|
41
69
|
- !ruby/object:Gem::Dependency
|
42
|
-
name:
|
70
|
+
name: rspec
|
43
71
|
requirement: !ruby/object:Gem::Requirement
|
44
72
|
requirements:
|
45
|
-
- - "
|
73
|
+
- - ">="
|
46
74
|
- !ruby/object:Gem::Version
|
47
|
-
version:
|
75
|
+
version: 3.9.0
|
48
76
|
type: :development
|
49
77
|
prerelease: false
|
50
78
|
version_requirements: !ruby/object:Gem::Requirement
|
51
79
|
requirements:
|
52
|
-
- - "
|
80
|
+
- - ">="
|
53
81
|
- !ruby/object:Gem::Version
|
54
|
-
version:
|
82
|
+
version: 3.9.0
|
55
83
|
- !ruby/object:Gem::Dependency
|
56
84
|
name: simplecov
|
57
85
|
requirement: !ruby/object:Gem::Requirement
|
58
86
|
requirements:
|
59
|
-
- -
|
87
|
+
- - '='
|
60
88
|
- !ruby/object:Gem::Version
|
61
|
-
version:
|
89
|
+
version: 0.16.1
|
62
90
|
type: :development
|
63
91
|
prerelease: false
|
64
92
|
version_requirements: !ruby/object:Gem::Requirement
|
65
93
|
requirements:
|
66
|
-
- -
|
94
|
+
- - '='
|
67
95
|
- !ruby/object:Gem::Version
|
68
|
-
version:
|
96
|
+
version: 0.16.1
|
69
97
|
- !ruby/object:Gem::Dependency
|
70
|
-
name:
|
98
|
+
name: simplecov-html
|
71
99
|
requirement: !ruby/object:Gem::Requirement
|
72
100
|
requirements:
|
73
101
|
- - "~>"
|
74
102
|
- !ruby/object:Gem::Version
|
75
|
-
version:
|
103
|
+
version: 0.10.0
|
76
104
|
type: :development
|
77
105
|
prerelease: false
|
78
106
|
version_requirements: !ruby/object:Gem::Requirement
|
79
107
|
requirements:
|
80
108
|
- - "~>"
|
81
109
|
- !ruby/object:Gem::Version
|
82
|
-
version:
|
110
|
+
version: 0.10.0
|
83
111
|
- !ruby/object:Gem::Dependency
|
84
|
-
name:
|
112
|
+
name: rake-contrib
|
85
113
|
requirement: !ruby/object:Gem::Requirement
|
86
114
|
requirements:
|
87
115
|
- - ">="
|
@@ -131,7 +159,9 @@ files:
|
|
131
159
|
- lib/segments/dg1.rb
|
132
160
|
- lib/segments/err.rb
|
133
161
|
- lib/segments/evn.rb
|
162
|
+
- lib/segments/ft1.rb
|
134
163
|
- lib/segments/fts.rb
|
164
|
+
- lib/segments/gt1.rb
|
135
165
|
- lib/segments/in1.rb
|
136
166
|
- lib/segments/mfe.rb
|
137
167
|
- lib/segments/mfi.rb
|
@@ -156,6 +186,7 @@ files:
|
|
156
186
|
- lib/segments/sft.rb
|
157
187
|
- lib/segments/spm.rb
|
158
188
|
- lib/segments/tq1.rb
|
189
|
+
- lib/segments/txa.rb
|
159
190
|
- lib/test/hl7_messages.rb
|
160
191
|
- ruby-hl7.gemspec
|
161
192
|
- spec/ail_segment_spec.rb
|
@@ -169,7 +200,9 @@ files:
|
|
169
200
|
- spec/dynamic_segment_def_spec.rb
|
170
201
|
- spec/err_segment_spec.rb
|
171
202
|
- spec/evn_segment_spec.rb
|
203
|
+
- spec/ft1_segment_spec.rb
|
172
204
|
- spec/fts_segment_spec.rb
|
205
|
+
- spec/gt1_segment_spec.rb
|
173
206
|
- spec/in1_segment_spec.rb
|
174
207
|
- spec/message_spec.rb
|
175
208
|
- spec/messages_spec.rb
|
@@ -194,6 +227,7 @@ files:
|
|
194
227
|
- spec/spec_helper.rb
|
195
228
|
- spec/speed_parsing_spec.rb
|
196
229
|
- spec/spm_segment_spec.rb
|
230
|
+
- spec/txa_segment_spec.rb
|
197
231
|
- test_data/adt_a01.hl7
|
198
232
|
- test_data/cerner/cerner_bordetella.hl7
|
199
233
|
- test_data/cerner/cerner_en.hl7
|
@@ -228,7 +262,7 @@ homepage: http://github.com/ruby-hl7/ruby-hl7
|
|
228
262
|
licenses:
|
229
263
|
- MIT
|
230
264
|
metadata: {}
|
231
|
-
post_install_message:
|
265
|
+
post_install_message:
|
232
266
|
rdoc_options:
|
233
267
|
- "--charset=UTF-8"
|
234
268
|
require_paths:
|
@@ -244,9 +278,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
244
278
|
- !ruby/object:Gem::Version
|
245
279
|
version: '0'
|
246
280
|
requirements: []
|
247
|
-
|
248
|
-
|
249
|
-
signing_key:
|
281
|
+
rubygems_version: 3.1.6
|
282
|
+
signing_key:
|
250
283
|
specification_version: 4
|
251
284
|
summary: Ruby HL7 Library
|
252
285
|
test_files: []
|