redox 1.5.2 → 1.7.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
2
  SHA256:
3
- metadata.gz: 4e502173db4efa95ee3c6e4f338ad78344c25c52aa35be766d4f6137724a4923
4
- data.tar.gz: 339890660bea9426b4950c33697a7e38eada9b07ba0a4356ecda5076271d404c
3
+ metadata.gz: 37374b76571d3588f7f710fb44e37b81aba5f6c69c321049986ef7ae9d96fab2
4
+ data.tar.gz: 909bd1b8d7314e01ec176ec15fbd615fda7491800a723d02a0fa8701f856162e
5
5
  SHA512:
6
- metadata.gz: a434730a3fb38681fdd434ac7451c1c9ee5ed49f9f136292991f2499e97f6f16537c853bb1d1b2c13b25882e3ea0210d2cb301f64594fc97c9a229341a5fc213
7
- data.tar.gz: 7d9ab435afe16ae9288f5a8dea5c18e137d592adc4122ecd3b65dbd6504ecbe22b5ecd0ba1c262abcd797ecc230f8c24ce39963fbabf315c8233eb7d9b0334f7
6
+ metadata.gz: 669638a2d594663f7651845faa1e31b3a957c6ad1047b9b3e90fd410682b3da8394119c7d788db33df48fbf352a4a1b5f28347f9f8e60049e3bb8768814b693b
7
+ data.tar.gz: b6a9ac922f873cae1c32b9b57e9f878ea558f56aa0522dc144caafbc1c25d17e60a05429bc151e2888d34e391e15f912b1b244ec2891efa404190c774690c339
data/CHANGELOG.md CHANGED
@@ -4,6 +4,28 @@ 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.7.1] - 2021-10-07
8
+ ### Added
9
+ - Visit#ReferringProvider and helpers for ID, IDType, FirstName, LastName
10
+
11
+ ## [1.7] - 2021-06-08
12
+ ### Added
13
+ - Notes model
14
+
15
+ ## [1.6.1] - 2021-03-12
16
+ ### Added
17
+ - Media model file helper to base64 files under 200KB
18
+ - Media model available= sets to valid Redox values with true/false
19
+ - Medai model provider entry
20
+
21
+ ## [1.6.0] - 2021-02-04
22
+ ### Added
23
+ - Media model
24
+ - MediaUpdate Model
25
+ - Media#create
26
+ - Visit#CancelReason
27
+ - Visit#DischargeDateTime
28
+
7
29
  ## [1.5.2] - 2021-01-08
8
30
  ### Added
9
31
  - Visit#Type
@@ -41,12 +63,12 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
41
63
  - Visit#as\_json
42
64
 
43
65
  ## [1.3.0] - 2020-09-17
44
- ### Added
66
+ ### Added
45
67
  - Transaction model
46
68
  - Financial#create
47
69
 
48
70
  ## [1.2.0] - 2020-07-30
49
- ### Added
71
+ ### Added
50
72
  - Visit model
51
73
  - Model#insurances helper for Patient.Insurances || Visit.Insurances
52
74
 
@@ -143,6 +165,9 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
143
165
  ### Added
144
166
  - Initial Release
145
167
 
168
+ [1.7]: https://github.com/WeInfuse/redox/compare/v1.6.1...v1.7
169
+ [1.6.1]: https://github.com/WeInfuse/redox/compare/v1.6.0...v1.6.1
170
+ [1.6.0]: https://github.com/WeInfuse/redox/compare/v1.5.2...v1.6.0
146
171
  [1.5.2]: https://github.com/WeInfuse/redox/compare/v1.5.1...v1.5.2
147
172
  [1.5.1]: https://github.com/WeInfuse/redox/compare/v1.5.0...v1.5.1
148
173
  [1.5.0]: https://github.com/WeInfuse/redox/compare/v1.4.0...v1.5.0
@@ -0,0 +1,44 @@
1
+ module Redox
2
+ module Models
3
+ class Media < AbstractModel
4
+ BLOB_REQUIRED_SIZE = 200 * 1024
5
+
6
+ property :FileType, from: :file_type, required: false
7
+ property :FileName, from: :file_name, required: false
8
+ property :FileContents, from: :file_contents, required: false
9
+ property :DocumentType, from: :document_type, required: false
10
+ property :DocumentID, from: :document_id, required: false
11
+ property :Availability, from: :availability, required: false
12
+ property :Provider, from: :provider, required: false
13
+
14
+ alias_method :file_type, :FileType
15
+ alias_method :file_name, :FileName
16
+ alias_method :file_contents, :FileContents
17
+ alias_method :document_type, :DocumentType
18
+ alias_method :document_id, :DocumentID
19
+ alias_method :availability, :Availability
20
+ alias_method :provider, :Provider
21
+
22
+ def availability=(value)
23
+ case value
24
+ when true
25
+ self[:Availability] = 'Available'
26
+ when false
27
+ self[:Availability] = 'Unavailable'
28
+ else
29
+ self[:Availability] = value
30
+ end
31
+ end
32
+
33
+ def add_filepath(path)
34
+ if File.size(path) > BLOB_REQUIRED_SIZE
35
+ raise 'Not implemented'
36
+ else
37
+ self.file_contents = Base64::encode64(File.read(path))
38
+ self.file_type = "#{File.extname(path)}".delete_prefix('.').upcase
39
+ self.file_name = File.basename(path, '.*')
40
+ end
41
+ end
42
+ end
43
+ end
44
+ end
@@ -0,0 +1,13 @@
1
+ module Redox
2
+ module Models
3
+ class MediaUpload < AbstractModel
4
+ property :Patient, required: false, from: :patient, default: Redox::Models::Patient.new
5
+ property :Visit, required: false, from: :visit, default: Redox::Models::Visit.new
6
+ property :Media, required: false, from: :media, default: Redox::Models::Media.new
7
+
8
+ alias_method :patient, :Patient
9
+ alias_method :visit, :Visit
10
+ alias_method :media, :Media
11
+ end
12
+ end
13
+ end
@@ -0,0 +1,15 @@
1
+ module Redox
2
+ module Models
3
+ class Note < AbstractModel
4
+ property :ContentType, from: :content_type, required: false
5
+ property :DocumentType, from: :document_type, required: false
6
+ property :DocumentID, from: :document_id, required: false
7
+ property :Provider, required: false, from: :provider, default: {}
8
+
9
+ alias_method :content_type, :ContentType
10
+ alias_method :document_type, :DocumentType
11
+ alias_method :document_id, :DocumentID
12
+ alias_method :provider, :Provider
13
+ end
14
+ end
15
+ end
@@ -0,0 +1,14 @@
1
+ module Redox
2
+ module Models
3
+ class Notes < AbstractModel
4
+ property :Note, from: :note, required: false
5
+
6
+ alias_method :note, :Note
7
+
8
+ def note
9
+ self[:Note] = Note.new(self[:Note]) unless self[:Note].is_a?(Redox::Models::Note)
10
+ self[:Note] ||= Note.new
11
+ end
12
+ end
13
+ end
14
+ end
@@ -5,6 +5,12 @@ module Redox
5
5
  Department: nil,
6
6
  Facility: nil
7
7
  }
8
+ DEFAULT_REFERRING_PROVIDER = {
9
+ ID: nil,
10
+ IDType: nil,
11
+ FirstName: nil,
12
+ LastName: nil
13
+ }
8
14
 
9
15
  property :Insurances, from: :insurances, required: false, default: []
10
16
  property :Location, from: :location, required: false, default: DEFAULT_LOCATION
@@ -16,9 +22,14 @@ module Redox
16
22
  property :Type, from: :type, required: false
17
23
  property :Reason, from: :reason, required: false
18
24
  property :Equipment, from: :equipment, required: false
25
+ property :CancelReason, from: :cancel_reason, required: false
26
+ property :DischargeDateTime, from: :end, required: false
27
+ property :ReferringProvider, from: :referring_provider, required: false, default: DEFAULT_REFERRING_PROVIDER
19
28
 
20
29
  alias_method :insurances, :Insurances
21
30
  alias_method :start, :VisitDateTime
31
+ alias_method :end, :DischargeDateTime
32
+ alias_method :referring_provider, :ReferringProvider
22
33
 
23
34
  def department=(v)
24
35
  self[:Location] ||= DEFAULT_LOCATION
@@ -32,6 +43,26 @@ module Redox
32
43
  self
33
44
  end
34
45
 
46
+ def referring_provider_id=(v)
47
+ self[:ReferringProvider] ||= DEFAULT_REFERRING_PROVIDER
48
+ self[:ReferringProvider][:ID] = v
49
+ end
50
+
51
+ def referring_provider_id_type=(v)
52
+ self[:ReferringProvider] ||= DEFAULT_REFERRING_PROVIDER
53
+ self[:ReferringProvider][:IDType] = v
54
+ end
55
+
56
+ def referring_provider_first_name=(v)
57
+ self[:ReferringProvider] ||= DEFAULT_REFERRING_PROVIDER
58
+ self[:ReferringProvider][:FirstName] = v
59
+ end
60
+
61
+ def referring_provider_last_name=(v)
62
+ self[:ReferringProvider] ||= DEFAULT_REFERRING_PROVIDER
63
+ self[:ReferringProvider][:LastName] = v
64
+ end
65
+
35
66
  def add_equipment(description: nil, code: nil)
36
67
  self[:Equipment] ||= []
37
68
  self[:Equipment] << { Description: description, Code: code }
@@ -45,7 +76,7 @@ module Redox
45
76
  def to_h
46
77
  result = super.to_h
47
78
 
48
- %w[VisitDateTime].each do |k|
79
+ %w[VisitDateTime DischargeDateTime].each do |k|
49
80
  result[key][k] = Redox::Models.format_datetime(result[key][k])
50
81
  end
51
82
 
@@ -0,0 +1,12 @@
1
+ module Redox
2
+ module Request
3
+ class Media
4
+ CREATE_META = Redox::Models::Meta.new(EventType: 'New', DataModel: 'Media')
5
+
6
+ def self.create(model, meta: Redox::Models::Meta.new)
7
+ meta = CREATE_META.merge(meta)
8
+ return Redox::Models::Model.from_response((RedoxClient.connection.request(body: Redox::Request.build_body(model, meta))))
9
+ end
10
+ end
11
+ end
12
+ end
@@ -0,0 +1,12 @@
1
+ module Redox
2
+ module Request
3
+ class Notes
4
+ CREATE_META = Redox::Models::Meta.new(EventType: 'New', DataModel: 'Notes')
5
+
6
+ def self.create(model, meta: Redox::Models::Meta.new)
7
+ meta = CREATE_META.merge(meta)
8
+ return Redox::Models::Model.from_response((RedoxClient.connection.request(body: Redox::Request.build_body(model, meta))))
9
+ end
10
+ end
11
+ end
12
+ end
data/lib/redox/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module Redox
2
- VERSION = '1.5.2'.freeze
2
+ VERSION = '1.7.1'.freeze
3
3
  end
data/lib/redox.rb CHANGED
@@ -12,6 +12,10 @@ require 'redox/models/provider'
12
12
  require 'redox/models/visit'
13
13
  require 'redox/models/transaction'
14
14
  require 'redox/models/financial'
15
+ require 'redox/models/notes'
16
+ require 'redox/models/note'
17
+ require 'redox/models/media'
18
+ require 'redox/models/media_upload'
15
19
  require 'redox/models/patient/demographics'
16
20
  require 'redox/models/patient/contacts'
17
21
  require 'redox/models/patient/identifier'
@@ -21,10 +25,12 @@ require 'redox/models/potential_matches'
21
25
  require 'redox/models/scheduling'
22
26
  require 'redox/request/request'
23
27
  require 'redox/request/financial'
28
+ require 'redox/request/notes'
24
29
  require 'redox/request/patient_admin'
25
30
  require 'redox/request/patient_search'
26
31
  require 'redox/request/provider'
27
32
  require 'redox/request/scheduling'
33
+ require 'redox/request/media'
28
34
 
29
35
  module Redox
30
36
  class Configuration
metadata CHANGED
@@ -1,16 +1,16 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: redox
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.5.2
4
+ version: 1.7.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Alexander Clark
8
8
  - Mike Crockett
9
9
  - Mike Carr
10
- autorequire:
10
+ autorequire:
11
11
  bindir: exe
12
12
  cert_chain: []
13
- date: 2021-01-08 00:00:00.000000000 Z
13
+ date: 2021-10-07 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: httparty
@@ -130,7 +130,7 @@ dependencies:
130
130
  - - "~>"
131
131
  - !ruby/object:Gem::Version
132
132
  version: '0.9'
133
- description:
133
+ description:
134
134
  email:
135
135
  - alexander.clark@weinfuse.com
136
136
  - mike.crockett@weinfuse.com
@@ -148,8 +148,12 @@ files:
148
148
  - lib/redox/authentication.rb
149
149
  - lib/redox/connection.rb
150
150
  - lib/redox/models/financial.rb
151
+ - lib/redox/models/media.rb
152
+ - lib/redox/models/media_upload.rb
151
153
  - lib/redox/models/meta.rb
152
154
  - lib/redox/models/model.rb
155
+ - lib/redox/models/note.rb
156
+ - lib/redox/models/notes.rb
153
157
  - lib/redox/models/ordering_provider.rb
154
158
  - lib/redox/models/patient.rb
155
159
  - lib/redox/models/patient/contacts.rb
@@ -164,6 +168,8 @@ files:
164
168
  - lib/redox/models/visit.rb
165
169
  - lib/redox/redox_exception.rb
166
170
  - lib/redox/request/financial.rb
171
+ - lib/redox/request/media.rb
172
+ - lib/redox/request/notes.rb
167
173
  - lib/redox/request/patient_admin.rb
168
174
  - lib/redox/request/patient_search.rb
169
175
  - lib/redox/request/provider.rb
@@ -176,7 +182,7 @@ licenses:
176
182
  - MIT
177
183
  metadata:
178
184
  allowed_push_host: https://rubygems.org
179
- post_install_message:
185
+ post_install_message:
180
186
  rdoc_options: []
181
187
  require_paths:
182
188
  - lib
@@ -191,9 +197,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
191
197
  - !ruby/object:Gem::Version
192
198
  version: '0'
193
199
  requirements: []
194
- rubyforge_project:
195
- rubygems_version: 2.7.6
196
- signing_key:
200
+ rubygems_version: 3.0.3
201
+ signing_key:
197
202
  specification_version: 4
198
203
  summary: Ruby wrapper for the Redox Engine API
199
204
  test_files: []