roqua-healthy 1.5.13 → 1.6.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.gitlab-ci.yml +5 -17
- data/.rubocop.yml +3 -0
- data/Appraisals +5 -16
- data/ChangeLog.md +6 -0
- data/gemfiles/rails52.gemfile +1 -0
- data/gemfiles/{rails41.gemfile → rails61.gemfile} +1 -1
- data/lib/roqua/healthy/a19/fetcher.rb +1 -2
- data/lib/roqua/healthy/a19/phone_validator.rb +1 -1
- data/lib/roqua/healthy/a19/response_validator.rb +11 -13
- data/lib/roqua/healthy/version.rb +1 -1
- data/roqua-healthy.gemspec +4 -4
- data/spec/unit/oru/client_spec.rb +1 -1
- metadata +20 -18
- data/gemfiles/rails42.gemfile +0 -9
- data/gemfiles/rails50.gemfile +0 -9
- data/gemfiles/rails51.gemfile +0 -9
- data/lib/roqua/errors.rb +0 -0
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 676e3d78e93d705fbf01f1e7eb726ca8c250b64fb7e226262b8bebd9d4ca540d
|
4
|
+
data.tar.gz: 5a5eac93225350b7446eaf8c3c22f29d53d3673437488fe04e4c8d8b9ccc25ca
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 7b54a9724e9035399b542b8d034cde91808a32938293c1da699dc1ab9d5ba626bc5a56bc0afc047fc1989b12e307e728562abc87d1d04147691791327f99a01b
|
7
|
+
data.tar.gz: d992da02d82847037d5881ead65ee81281ccc1a1eb111f44b5f68600f26c6af31e31f0b5acf2304fba34bf48db98dfe8bf44f9dd90188bbcb972a955ad4509c0
|
data/.gitlab-ci.yml
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
image: "registry.roqua.nl/roqua/docker-base-images:ruby-2.
|
1
|
+
image: "registry.roqua.nl/roqua/docker-base-images:ruby-2.7-builder"
|
2
2
|
|
3
3
|
cache:
|
4
4
|
paths:
|
@@ -15,22 +15,6 @@ rubocop:
|
|
15
15
|
script:
|
16
16
|
- bundle exec rubocop -D
|
17
17
|
|
18
|
-
rails41:
|
19
|
-
script:
|
20
|
-
- bundle exec appraisal rails41 bundle exec rspec
|
21
|
-
|
22
|
-
rails42:
|
23
|
-
script:
|
24
|
-
- bundle exec appraisal rails42 bundle exec rspec
|
25
|
-
|
26
|
-
rails50:
|
27
|
-
script:
|
28
|
-
- bundle exec appraisal rails50 bundle exec rspec
|
29
|
-
|
30
|
-
rails51:
|
31
|
-
script:
|
32
|
-
- bundle exec appraisal rails51 bundle exec rspec
|
33
|
-
|
34
18
|
rails52:
|
35
19
|
script:
|
36
20
|
- bundle exec appraisal rails52 bundle exec rspec
|
@@ -38,3 +22,7 @@ rails52:
|
|
38
22
|
rails60:
|
39
23
|
script:
|
40
24
|
- bundle exec appraisal rails60 bundle exec rspec
|
25
|
+
|
26
|
+
rails61:
|
27
|
+
script:
|
28
|
+
- bundle exec appraisal rails61 bundle exec rspec
|
data/.rubocop.yml
CHANGED
data/Appraisals
CHANGED
@@ -1,25 +1,14 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
|
-
appraise "rails41" do
|
4
|
-
gem "activesupport", "4.1"
|
5
|
-
end
|
6
|
-
|
7
|
-
appraise "rails42" do
|
8
|
-
gem "activesupport", "4.2"
|
9
|
-
end
|
10
|
-
|
11
|
-
appraise "rails50" do
|
12
|
-
gem "activesupport", "5.0"
|
13
|
-
end
|
14
|
-
|
15
|
-
appraise "rails51" do
|
16
|
-
gem "activesupport", "5.1"
|
17
|
-
end
|
18
|
-
|
19
3
|
appraise "rails52" do
|
20
4
|
gem "activesupport", "5.2"
|
5
|
+
gem "roqua-support", "~> 0.3.0"
|
21
6
|
end
|
22
7
|
|
23
8
|
appraise "rails60" do
|
24
9
|
gem "activesupport", "6.0"
|
25
10
|
end
|
11
|
+
|
12
|
+
appraise "rails61" do
|
13
|
+
gem "activesupport", "6.1"
|
14
|
+
end
|
data/ChangeLog.md
CHANGED
data/gemfiles/rails52.gemfile
CHANGED
@@ -7,9 +7,7 @@ module Roqua
|
|
7
7
|
class ResponseValidator
|
8
8
|
require 'roqua/healthy/errors'
|
9
9
|
|
10
|
-
attr_reader :response_code
|
11
|
-
attr_reader :parser
|
12
|
-
attr_reader :patient_id
|
10
|
+
attr_reader :parser, :patient_id, :response_code
|
13
11
|
|
14
12
|
def initialize(response_code, parser, patient_id)
|
15
13
|
@response_code = response_code
|
@@ -20,41 +18,41 @@ module Roqua
|
|
20
18
|
def validate
|
21
19
|
case response_code
|
22
20
|
when '200'
|
23
|
-
|
21
|
+
validate200
|
24
22
|
when '401', '403'
|
25
|
-
|
23
|
+
validate403
|
26
24
|
when '404'
|
27
|
-
|
25
|
+
validate404
|
28
26
|
when '500'
|
29
|
-
|
27
|
+
validate500
|
30
28
|
else
|
31
29
|
raise ::Roqua::Healthy::UnknownFailure, "Unexpected HTTP response code #{response_code}."
|
32
30
|
end
|
33
31
|
end
|
34
32
|
|
35
|
-
|
33
|
+
private
|
34
|
+
|
35
|
+
def validate200
|
36
36
|
parsed_message = parser.fetch("HL7Message")
|
37
37
|
ensure_patient_found(parsed_message)
|
38
38
|
ensure_correct_patient(parsed_message)
|
39
39
|
true
|
40
40
|
end
|
41
41
|
|
42
|
-
def
|
42
|
+
def validate403
|
43
43
|
raise ::Roqua::Healthy::AuthenticationFailure
|
44
44
|
end
|
45
45
|
|
46
|
-
def
|
46
|
+
def validate404
|
47
47
|
raise ::Roqua::Healthy::PatientNotFound
|
48
48
|
end
|
49
49
|
|
50
|
-
def
|
50
|
+
def validate500
|
51
51
|
error = parser.fetch('failure')['error']
|
52
52
|
raise ::Roqua::Healthy::ERRORS[error], error if ::Roqua::Healthy::ERRORS[error]
|
53
53
|
raise ::Roqua::Healthy::UnknownFailure, error
|
54
54
|
end
|
55
55
|
|
56
|
-
private
|
57
|
-
|
58
56
|
def ensure_patient_found(parsed_message)
|
59
57
|
raise ::Roqua::Healthy::PatientNotFound if parsed_message.key?("ERR") && parsed_message.fetch("ERR").fetch("ERR.1").fetch("ERR.1.4").fetch("ERR.1.4.2") =~ /Patient \(@\) niet gevonden\(.*\)/
|
60
58
|
raise ::Roqua::Healthy::PatientNotFound if parsed_message.key?("QAK") && parsed_message.fetch("QAK").fetch("QAK.2").fetch("QAK.2.1") == "NF"
|
data/roqua-healthy.gemspec
CHANGED
@@ -20,12 +20,12 @@ Gem::Specification.new do |gem|
|
|
20
20
|
gem.test_files = gem.files.grep(%r{^(test|spec|features)/})
|
21
21
|
gem.require_paths = ['lib']
|
22
22
|
|
23
|
-
gem.add_dependency 'activesupport', '>=
|
23
|
+
gem.add_dependency 'activesupport', '>= 5.1', '< 6.2'
|
24
24
|
gem.add_dependency 'addressable', '~> 2.3'
|
25
25
|
gem.add_dependency 'builder'
|
26
26
|
gem.add_dependency 'phonelib', '~> 0.6'
|
27
27
|
gem.add_dependency 'rest-client', '>= 2.0.2'
|
28
|
-
gem.add_dependency 'roqua-support', '
|
28
|
+
gem.add_dependency 'roqua-support', '>= 0.3.0', '< 0.5.0'
|
29
29
|
|
30
30
|
gem.add_development_dependency 'appraisal'
|
31
31
|
gem.add_development_dependency 'bundler'
|
@@ -38,8 +38,8 @@ Gem::Specification.new do |gem|
|
|
38
38
|
|
39
39
|
# Workflow and tools
|
40
40
|
gem.add_development_dependency 'guard', '~> 2.1'
|
41
|
-
gem.add_development_dependency 'guard-rspec', '~> 4.2
|
42
|
-
gem.add_development_dependency 'guard-rubocop', '~> 1.2
|
41
|
+
gem.add_development_dependency 'guard-rspec', '~> 4.2'
|
42
|
+
gem.add_development_dependency 'guard-rubocop', '~> 1.2'
|
43
43
|
gem.add_development_dependency 'listen', '~> 2.1'
|
44
44
|
gem.add_development_dependency 'simplecov'
|
45
45
|
|
@@ -30,7 +30,7 @@ RSpec.describe Roqua::Healthy::Oru::Client do
|
|
30
30
|
|
31
31
|
let(:subject) { Roqua::Healthy::Oru::Client }
|
32
32
|
let(:oru_url) { 'https://example.com' }
|
33
|
-
let(:timeout) { 5
|
33
|
+
let(:timeout) { 5 }
|
34
34
|
|
35
35
|
def execute_request
|
36
36
|
subject.execute(oru_url, {oru: :data}, timeout: timeout)
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: roqua-healthy
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
4
|
+
version: 1.6.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Marten Veldthuis
|
@@ -11,7 +11,7 @@ authors:
|
|
11
11
|
autorequire:
|
12
12
|
bindir: bin
|
13
13
|
cert_chain: []
|
14
|
-
date: 2021-
|
14
|
+
date: 2021-04-07 00:00:00.000000000 Z
|
15
15
|
dependencies:
|
16
16
|
- !ruby/object:Gem::Dependency
|
17
17
|
name: activesupport
|
@@ -19,20 +19,20 @@ dependencies:
|
|
19
19
|
requirements:
|
20
20
|
- - ">="
|
21
21
|
- !ruby/object:Gem::Version
|
22
|
-
version: '
|
22
|
+
version: '5.1'
|
23
23
|
- - "<"
|
24
24
|
- !ruby/object:Gem::Version
|
25
|
-
version: '6.
|
25
|
+
version: '6.2'
|
26
26
|
type: :runtime
|
27
27
|
prerelease: false
|
28
28
|
version_requirements: !ruby/object:Gem::Requirement
|
29
29
|
requirements:
|
30
30
|
- - ">="
|
31
31
|
- !ruby/object:Gem::Version
|
32
|
-
version: '
|
32
|
+
version: '5.1'
|
33
33
|
- - "<"
|
34
34
|
- !ruby/object:Gem::Version
|
35
|
-
version: '6.
|
35
|
+
version: '6.2'
|
36
36
|
- !ruby/object:Gem::Dependency
|
37
37
|
name: addressable
|
38
38
|
requirement: !ruby/object:Gem::Requirement
|
@@ -93,16 +93,22 @@ dependencies:
|
|
93
93
|
name: roqua-support
|
94
94
|
requirement: !ruby/object:Gem::Requirement
|
95
95
|
requirements:
|
96
|
-
- - "
|
96
|
+
- - ">="
|
97
97
|
- !ruby/object:Gem::Version
|
98
98
|
version: 0.3.0
|
99
|
+
- - "<"
|
100
|
+
- !ruby/object:Gem::Version
|
101
|
+
version: 0.5.0
|
99
102
|
type: :runtime
|
100
103
|
prerelease: false
|
101
104
|
version_requirements: !ruby/object:Gem::Requirement
|
102
105
|
requirements:
|
103
|
-
- - "
|
106
|
+
- - ">="
|
104
107
|
- !ruby/object:Gem::Version
|
105
108
|
version: 0.3.0
|
109
|
+
- - "<"
|
110
|
+
- !ruby/object:Gem::Version
|
111
|
+
version: 0.5.0
|
106
112
|
- !ruby/object:Gem::Dependency
|
107
113
|
name: appraisal
|
108
114
|
requirement: !ruby/object:Gem::Requirement
|
@@ -207,28 +213,28 @@ dependencies:
|
|
207
213
|
requirements:
|
208
214
|
- - "~>"
|
209
215
|
- !ruby/object:Gem::Version
|
210
|
-
version: 4.2
|
216
|
+
version: '4.2'
|
211
217
|
type: :development
|
212
218
|
prerelease: false
|
213
219
|
version_requirements: !ruby/object:Gem::Requirement
|
214
220
|
requirements:
|
215
221
|
- - "~>"
|
216
222
|
- !ruby/object:Gem::Version
|
217
|
-
version: 4.2
|
223
|
+
version: '4.2'
|
218
224
|
- !ruby/object:Gem::Dependency
|
219
225
|
name: guard-rubocop
|
220
226
|
requirement: !ruby/object:Gem::Requirement
|
221
227
|
requirements:
|
222
228
|
- - "~>"
|
223
229
|
- !ruby/object:Gem::Version
|
224
|
-
version: 1.2
|
230
|
+
version: '1.2'
|
225
231
|
type: :development
|
226
232
|
prerelease: false
|
227
233
|
version_requirements: !ruby/object:Gem::Requirement
|
228
234
|
requirements:
|
229
235
|
- - "~>"
|
230
236
|
- !ruby/object:Gem::Version
|
231
|
-
version: 1.2
|
237
|
+
version: '1.2'
|
232
238
|
- !ruby/object:Gem::Dependency
|
233
239
|
name: listen
|
234
240
|
requirement: !ruby/object:Gem::Requirement
|
@@ -297,13 +303,9 @@ files:
|
|
297
303
|
- bin/get_xml_for_patient
|
298
304
|
- bin/parse_local_xml
|
299
305
|
- circle.yml
|
300
|
-
- gemfiles/rails41.gemfile
|
301
|
-
- gemfiles/rails42.gemfile
|
302
|
-
- gemfiles/rails50.gemfile
|
303
|
-
- gemfiles/rails51.gemfile
|
304
306
|
- gemfiles/rails52.gemfile
|
305
307
|
- gemfiles/rails60.gemfile
|
306
|
-
-
|
308
|
+
- gemfiles/rails61.gemfile
|
307
309
|
- lib/roqua/healthy.rb
|
308
310
|
- lib/roqua/healthy/a19.rb
|
309
311
|
- lib/roqua/healthy/a19/address_parser.rb
|
@@ -398,7 +400,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
398
400
|
- !ruby/object:Gem::Version
|
399
401
|
version: '0'
|
400
402
|
requirements: []
|
401
|
-
rubygems_version: 3.
|
403
|
+
rubygems_version: 3.1.4
|
402
404
|
signing_key:
|
403
405
|
specification_version: 4
|
404
406
|
summary: Arranges communication between Mirth and RoQua
|
data/gemfiles/rails42.gemfile
DELETED
@@ -1,9 +0,0 @@
|
|
1
|
-
# This file was generated by Appraisal
|
2
|
-
|
3
|
-
source "https://rubygems.org"
|
4
|
-
|
5
|
-
gem "codeclimate-test-reporter", "~> 1.0.0", group: :test, require: nil
|
6
|
-
gem "roqua_styleguide", git: "https://gitlab.roqua.nl/roqua/styleguide.git"
|
7
|
-
gem "activesupport", "4.2"
|
8
|
-
|
9
|
-
gemspec path: "../"
|
data/gemfiles/rails50.gemfile
DELETED
@@ -1,9 +0,0 @@
|
|
1
|
-
# This file was generated by Appraisal
|
2
|
-
|
3
|
-
source "https://rubygems.org"
|
4
|
-
|
5
|
-
gem "codeclimate-test-reporter", "~> 1.0.0", group: :test, require: nil
|
6
|
-
gem "roqua_styleguide", git: "https://gitlab.roqua.nl/roqua/styleguide.git"
|
7
|
-
gem "activesupport", "5.0"
|
8
|
-
|
9
|
-
gemspec path: "../"
|
data/gemfiles/rails51.gemfile
DELETED
@@ -1,9 +0,0 @@
|
|
1
|
-
# This file was generated by Appraisal
|
2
|
-
|
3
|
-
source "https://rubygems.org"
|
4
|
-
|
5
|
-
gem "codeclimate-test-reporter", "~> 1.0.0", group: :test, require: nil
|
6
|
-
gem "roqua_styleguide", git: "https://gitlab.roqua.nl/roqua/styleguide.git"
|
7
|
-
gem "activesupport", "5.1"
|
8
|
-
|
9
|
-
gemspec path: "../"
|
data/lib/roqua/errors.rb
DELETED
File without changes
|