redox 1.1.1 → 1.2.0

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
2
  SHA256:
3
- metadata.gz: af07742de7bb1cc39182903d8246bb8a59dfdb1b660fd629568ee799eef03f90
4
- data.tar.gz: e088a4fbc1bd383ee5ea0570d6b3933a4d4eccafe1d7a70aa37de49925fe1beb
3
+ metadata.gz: 110c897be42bb1b29ecb7ad3fe0799e53e5b4aa933bc346be084133883e93715
4
+ data.tar.gz: 6235dfff929001d2666162d875708befb863b84f5122d3886d6cbaa6b9bfa017
5
5
  SHA512:
6
- metadata.gz: efc0fe9382fecb0a4a738796e7dfb89f2b17438e5dbe4730a5de6357dea040f043e8f41130e331780a58263e61416581c024ff4ddcb90c28230f2d2a99bfa9e9
7
- data.tar.gz: b6ec18283534dde1ca34cf053dad85df88fa9335e08ce4e631e81b0723f00f81a7ff9e72f6e417b3acb5cfa59410238912557cd5ea22890d1120018e5a478b0d
6
+ metadata.gz: 5f19c7ba5371f732730e4746a9673da3db1758eb3778615cbd4c2ff77404c764bcd805abf346352156bb03b0bf9fe6d484ff99fb65bc4fa85a1ce9f10181407a
7
+ data.tar.gz: 1631c69cfc948ef85991ec8e091243bbc6b43ecc4a2b21c2828b99fc9be04e3dcecb3799a6ee4e3f3d2d459ad085c3917544d2e77ad8d06158434133877e17bf
@@ -4,6 +4,11 @@ All notable changes to this project will be documented in this file.
4
4
  The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/)
5
5
  and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html).
6
6
 
7
+ ## [1.2.0] - 2020-07-30
8
+ ### Added
9
+ - Visit model
10
+ - Model#insurances helper for Patient.Insurances || Visit.Insurances
11
+
7
12
  ## [1.1.1] - 2020-06-15
8
13
  ### Changed
9
14
  - Bugfix with patient param in update
@@ -98,6 +103,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
98
103
  ### Added
99
104
  - Initial Release
100
105
 
106
+ [1.2.0]: https://github.com/WeInfuse/redox/compare/v1.1.1...v1.2.0
101
107
  [1.1.1]: https://github.com/WeInfuse/redox/compare/v1.1.0...v1.1.1
102
108
  [1.1.0]: https://github.com/WeInfuse/redox/compare/v1.0.2...v1.1.0
103
109
  [1.0.2]: https://github.com/WeInfuse/redox/compare/v1.0.1...v1.0.2
@@ -7,6 +7,7 @@ require 'redox/authentication'
7
7
  require 'redox/models/model'
8
8
  require 'redox/models/meta'
9
9
  require 'redox/models/patient'
10
+ require 'redox/models/visit'
10
11
  require 'redox/models/patient/demographics'
11
12
  require 'redox/models/patient/identifier'
12
13
  require 'redox/models/patient/insurance'
@@ -6,12 +6,14 @@ module Redox
6
6
 
7
7
  property :Meta, from: :meta, required: false
8
8
  property :Patient, from: :patient, required: false
9
+ property :Visit, from: :visit, required: false
9
10
  property :PotentialMatches, from: :potential_matches, required: false
10
11
  property :Extensions, from: :extensions, required: false
11
12
  property :response, required: false
12
13
 
13
14
  alias_method :potential_matches, :PotentialMatches
14
15
  alias_method :patient, :Patient
16
+ alias_method :visit, :Visit
15
17
  alias_method :meta, :Meta
16
18
 
17
19
  def initialize(data = {})
@@ -34,12 +36,16 @@ module Redox
34
36
  return self.to_h.to_json
35
37
  end
36
38
 
39
+ def insurances
40
+ (self.patient&.insurances || []) + (self.visit&.insurances || [])
41
+ end
42
+
37
43
  class << self
38
44
  def from_response(response)
39
45
  model = Model.new
40
46
  model.response = response
41
47
 
42
- %w[Meta Patient PotentialMatches].each do |k|
48
+ %w[Meta Patient Visit PotentialMatches].each do |k|
43
49
  begin
44
50
  model.send("#{k}=", Module.const_get("Redox::Models::#{k}").new(response[k])) if response[k]
45
51
  rescue
@@ -0,0 +1,13 @@
1
+ module Redox
2
+ module Models
3
+ class Visit < Model
4
+ property :Insurances, from: :insurances, required: false, default: []
5
+
6
+ alias_method :insurances, :Insurances
7
+
8
+ def insurances
9
+ self[:Insurances] = self[:Insurances].map {|ins| ins.is_a?(Redox::Models::Insurance) ? ins : Insurance.new(ins) }
10
+ end
11
+ end
12
+ end
13
+ end
@@ -1,3 +1,3 @@
1
1
  module Redox
2
- VERSION = '1.1.1'.freeze
2
+ VERSION = '1.2.0'.freeze
3
3
  end
@@ -5,8 +5,8 @@ require 'redox/version'
5
5
  Gem::Specification.new do |spec|
6
6
  spec.name = 'redox'
7
7
  spec.version = Redox::VERSION
8
- spec.authors = ['Alexander Clark', 'Mike Crockett']
9
- spec.email = ['alexander.clark@weinfuse.com', 'mike.crockett@weinfuse.com']
8
+ spec.authors = ['Alexander Clark', 'Mike Crockett', 'Mike Carr']
9
+ spec.email = ['alexander.clark@weinfuse.com', 'mike.crockett@weinfuse.com', 'michael.carr@weinfuse.com']
10
10
 
11
11
  spec.summary = 'Ruby wrapper for the Redox Engine API'
12
12
  spec.homepage = 'https://github.com/WeInfuse/redox'
@@ -28,7 +28,7 @@ Gem::Specification.new do |spec|
28
28
  spec.require_paths = ['lib']
29
29
  spec.licenses = ['MIT']
30
30
 
31
- spec.add_dependency 'httparty', '~> 0.17'
31
+ spec.add_dependency 'httparty', '~> 0.18'
32
32
  spec.add_dependency 'hashie', '~> 3.5'
33
33
  spec.add_development_dependency 'bundler', '>=1', '<3'
34
34
  spec.add_development_dependency 'byebug', '~> 11'
metadata CHANGED
@@ -1,15 +1,16 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: redox
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.1.1
4
+ version: 1.2.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Alexander Clark
8
8
  - Mike Crockett
9
- autorequire:
9
+ - Mike Carr
10
+ autorequire:
10
11
  bindir: exe
11
12
  cert_chain: []
12
- date: 2020-06-16 00:00:00.000000000 Z
13
+ date: 2020-07-30 00:00:00.000000000 Z
13
14
  dependencies:
14
15
  - !ruby/object:Gem::Dependency
15
16
  name: httparty
@@ -17,14 +18,14 @@ dependencies:
17
18
  requirements:
18
19
  - - "~>"
19
20
  - !ruby/object:Gem::Version
20
- version: '0.17'
21
+ version: '0.18'
21
22
  type: :runtime
22
23
  prerelease: false
23
24
  version_requirements: !ruby/object:Gem::Requirement
24
25
  requirements:
25
26
  - - "~>"
26
27
  - !ruby/object:Gem::Version
27
- version: '0.17'
28
+ version: '0.18'
28
29
  - !ruby/object:Gem::Dependency
29
30
  name: hashie
30
31
  requirement: !ruby/object:Gem::Requirement
@@ -129,10 +130,11 @@ dependencies:
129
130
  - - "~>"
130
131
  - !ruby/object:Gem::Version
131
132
  version: '0.9'
132
- description:
133
+ description:
133
134
  email:
134
135
  - alexander.clark@weinfuse.com
135
136
  - mike.crockett@weinfuse.com
137
+ - michael.carr@weinfuse.com
136
138
  executables: []
137
139
  extensions: []
138
140
  extra_rdoc_files: []
@@ -153,6 +155,7 @@ files:
153
155
  - lib/redox/models/patient/insurance.rb
154
156
  - lib/redox/models/patient/p_c_p.rb
155
157
  - lib/redox/models/potential_matches.rb
158
+ - lib/redox/models/visit.rb
156
159
  - lib/redox/redox_exception.rb
157
160
  - lib/redox/request/patient_admin.rb
158
161
  - lib/redox/request/patient_search.rb
@@ -163,7 +166,7 @@ licenses:
163
166
  - MIT
164
167
  metadata:
165
168
  allowed_push_host: https://rubygems.org
166
- post_install_message:
169
+ post_install_message:
167
170
  rdoc_options: []
168
171
  require_paths:
169
172
  - lib
@@ -178,9 +181,9 @@ required_rubygems_version: !ruby/object:Gem::Requirement
178
181
  - !ruby/object:Gem::Version
179
182
  version: '0'
180
183
  requirements: []
181
- rubyforge_project:
184
+ rubyforge_project:
182
185
  rubygems_version: 2.7.6
183
- signing_key:
186
+ signing_key:
184
187
  specification_version: 4
185
188
  summary: Ruby wrapper for the Redox Engine API
186
189
  test_files: []