redox 1.5.0 → 1.7
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +39 -3
- data/lib/redox.rb +7 -0
- data/lib/redox/models/media.rb +44 -0
- data/lib/redox/models/media_upload.rb +13 -0
- data/lib/redox/models/note.rb +15 -0
- data/lib/redox/models/notes.rb +14 -0
- data/lib/redox/models/patient.rb +6 -0
- data/lib/redox/models/patient/contacts.rb +20 -0
- data/lib/redox/models/patient/demographics.rb +2 -2
- data/lib/redox/models/visit.rb +14 -1
- data/lib/redox/request/media.rb +12 -0
- data/lib/redox/request/notes.rb +12 -0
- data/lib/redox/version.rb +1 -1
- metadata +14 -8
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 1c04b4cb81d01446cc51528405960366d25934c17b46aa32eace6157d813ad5e
|
4
|
+
data.tar.gz: 91949849808961f190b80eb191a82f919306c1d4760b33d353e091a85dd97b65
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a8d026210eb9615ce90417e9f8b21dbd37a4de94ab0e63aa45df41a352bb77ac5f6cedb90e7d032200be3abab4bb74a21f88771d5e50b05e949e19d75e499c21
|
7
|
+
data.tar.gz: 71fa152ba6e140b375d8a33b51c188c8efc4825890323ea8075027e317d43b9147a5289f2b9e3c18e41be2c3640b633d530c0671325551fc2fb12467c2ff54a2
|
data/CHANGELOG.md
CHANGED
@@ -4,6 +4,38 @@ 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] - 2021-06-08
|
8
|
+
### Added
|
9
|
+
- Notes model
|
10
|
+
## [1.6.1] - 2021-03-12
|
11
|
+
### Added
|
12
|
+
- Media model file helper to base64 files under 200KB
|
13
|
+
- Media model available= sets to valid Redox values with true/false
|
14
|
+
- Medai model provider entry
|
15
|
+
|
16
|
+
## [1.6.0] - 2021-02-04
|
17
|
+
### Added
|
18
|
+
- Media model
|
19
|
+
- MediaUpdate Model
|
20
|
+
- Media#create
|
21
|
+
- Visit#CancelReason
|
22
|
+
- Visit#DischargeDateTime
|
23
|
+
|
24
|
+
## [1.5.2] - 2021-01-08
|
25
|
+
### Added
|
26
|
+
- Visit#Type
|
27
|
+
- Visit#Status
|
28
|
+
- Visit#Reason
|
29
|
+
- Visit#Equipment
|
30
|
+
|
31
|
+
## [1.5.1] - 2020-12-22
|
32
|
+
### Added
|
33
|
+
- Contacts model
|
34
|
+
- Patient#contacts
|
35
|
+
|
36
|
+
### Changed
|
37
|
+
- typo of martialstatus is now maritalstatus for Demographics model
|
38
|
+
|
7
39
|
## [1.5.0] - 2020-12-15
|
8
40
|
### Added
|
9
41
|
- Scheduling model
|
@@ -26,12 +58,12 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
|
|
26
58
|
- Visit#as\_json
|
27
59
|
|
28
60
|
## [1.3.0] - 2020-09-17
|
29
|
-
### Added
|
61
|
+
### Added
|
30
62
|
- Transaction model
|
31
63
|
- Financial#create
|
32
64
|
|
33
65
|
## [1.2.0] - 2020-07-30
|
34
|
-
### Added
|
66
|
+
### Added
|
35
67
|
- Visit model
|
36
68
|
- Model#insurances helper for Patient.Insurances || Visit.Insurances
|
37
69
|
|
@@ -44,7 +76,6 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
|
|
44
76
|
- Moving to Requst classes instead of mixing in logic to models (kept backwards compatibility)
|
45
77
|
- Added potential matches to responses and implemented for patient search
|
46
78
|
|
47
|
-
=======
|
48
79
|
### Added
|
49
80
|
- PotentialMatches class
|
50
81
|
|
@@ -129,6 +160,11 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
|
|
129
160
|
### Added
|
130
161
|
- Initial Release
|
131
162
|
|
163
|
+
[1.7]: https://github.com/WeInfuse/redox/compare/v1.6.1...v1.7
|
164
|
+
[1.6.1]: https://github.com/WeInfuse/redox/compare/v1.6.0...v1.6.1
|
165
|
+
[1.6.0]: https://github.com/WeInfuse/redox/compare/v1.5.2...v1.6.0
|
166
|
+
[1.5.2]: https://github.com/WeInfuse/redox/compare/v1.5.1...v1.5.2
|
167
|
+
[1.5.1]: https://github.com/WeInfuse/redox/compare/v1.5.0...v1.5.1
|
132
168
|
[1.5.0]: https://github.com/WeInfuse/redox/compare/v1.4.0...v1.5.0
|
133
169
|
[1.4.0]: https://github.com/WeInfuse/redox/compare/v1.3.1...v1.4.0
|
134
170
|
[1.3.1]: https://github.com/WeInfuse/redox/compare/v1.3.0...v1.3.1
|
data/lib/redox.rb
CHANGED
@@ -12,7 +12,12 @@ 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'
|
20
|
+
require 'redox/models/patient/contacts'
|
16
21
|
require 'redox/models/patient/identifier'
|
17
22
|
require 'redox/models/patient/insurance'
|
18
23
|
require 'redox/models/patient/p_c_p'
|
@@ -20,10 +25,12 @@ require 'redox/models/potential_matches'
|
|
20
25
|
require 'redox/models/scheduling'
|
21
26
|
require 'redox/request/request'
|
22
27
|
require 'redox/request/financial'
|
28
|
+
require 'redox/request/notes'
|
23
29
|
require 'redox/request/patient_admin'
|
24
30
|
require 'redox/request/patient_search'
|
25
31
|
require 'redox/request/provider'
|
26
32
|
require 'redox/request/scheduling'
|
33
|
+
require 'redox/request/media'
|
27
34
|
|
28
35
|
module Redox
|
29
36
|
class Configuration
|
@@ -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
|
data/lib/redox/models/patient.rb
CHANGED
@@ -4,10 +4,12 @@ module Redox
|
|
4
4
|
property :Identifiers, from: :identifiers, required: false, default: []
|
5
5
|
property :Insurances, from: :insurances, required: false, default: []
|
6
6
|
property :Demographics, from: :demographics, required: false
|
7
|
+
property :Contacts, from: :contacts, required: false, default: []
|
7
8
|
property :PCP, from: :primary_care_provider, required: false
|
8
9
|
|
9
10
|
alias_method :identifiers, :Identifiers
|
10
11
|
alias_method :insurances, :Insurances
|
12
|
+
alias_method :contacts, :Contacts
|
11
13
|
|
12
14
|
def demographics
|
13
15
|
self[:Demographics] = Demographics.new(self[:Demographics]) unless self[:Demographics].is_a?(Redox::Models::Demographics)
|
@@ -22,6 +24,10 @@ module Redox
|
|
22
24
|
self[:PCP] ||= PCP.new
|
23
25
|
end
|
24
26
|
|
27
|
+
def contacts
|
28
|
+
self[:Contacts] = self[:Contacts].map {|contact| contact.is_a?(Redox::Models::Contact) ? contact : Contact.new(contact)}
|
29
|
+
end
|
30
|
+
|
25
31
|
def add_identifier(type: , value: )
|
26
32
|
self[:Identifiers] << Identifier.new({'ID' => value, 'IDType' => type})
|
27
33
|
|
@@ -0,0 +1,20 @@
|
|
1
|
+
module Redox
|
2
|
+
module Models
|
3
|
+
class Contact < AbstractModel
|
4
|
+
property :FirstName, required: false, from: :first_name
|
5
|
+
property :MiddleName, required: false, from: :middle_name
|
6
|
+
property :LastName, required: false, from: :last_name
|
7
|
+
property :RelationToPatient, required: false
|
8
|
+
property :EmailAddresses, required: false, default: []
|
9
|
+
property :Address, required: false, default: {}
|
10
|
+
property :PhoneNumber, required: false, default: {}
|
11
|
+
property :Roles, required: false, default: []
|
12
|
+
|
13
|
+
alias_method :first_name, :FirstName
|
14
|
+
alias_method :middle_name, :MiddleName
|
15
|
+
alias_method :last_name, :LastName
|
16
|
+
alias_method :address, :Address
|
17
|
+
alias_method :phone_number, :PhoneNumber
|
18
|
+
end
|
19
|
+
end
|
20
|
+
end
|
@@ -9,7 +9,7 @@ module Redox
|
|
9
9
|
property :Sex, required: false, from: :sex
|
10
10
|
property :Race, required: false, from: :race
|
11
11
|
property :IsHispanic, required: false
|
12
|
-
property :MaritalStatus, required: false, from: :
|
12
|
+
property :MaritalStatus, required: false, from: :marital_status
|
13
13
|
property :IsDeceased, required: false
|
14
14
|
property :DeathDateTime, required: false
|
15
15
|
property :Language, required: false, from: :language
|
@@ -25,7 +25,7 @@ module Redox
|
|
25
25
|
alias_method :ssn, :SSN
|
26
26
|
alias_method :sex, :Sex
|
27
27
|
alias_method :race, :Race
|
28
|
-
alias_method :
|
28
|
+
alias_method :marital_status, :MaritalStatus
|
29
29
|
alias_method :language, :Language
|
30
30
|
alias_method :address, :Address
|
31
31
|
alias_method :phone_number, :PhoneNumber
|
data/lib/redox/models/visit.rb
CHANGED
@@ -12,9 +12,16 @@ module Redox
|
|
12
12
|
property :Duration, from: :duration, required: false
|
13
13
|
property :VisitNumber, from: :visit_number, required: false
|
14
14
|
property :AccountNumber, from: :account_number, required: false
|
15
|
+
property :Status, from: :status, required: false
|
16
|
+
property :Type, from: :type, required: false
|
17
|
+
property :Reason, from: :reason, required: false
|
18
|
+
property :Equipment, from: :equipment, required: false
|
19
|
+
property :CancelReason, from: :cancel_reason, required: false
|
20
|
+
property :DischargeDateTime, from: :end, required: false
|
15
21
|
|
16
22
|
alias_method :insurances, :Insurances
|
17
23
|
alias_method :start, :VisitDateTime
|
24
|
+
alias_method :end, :DischargeDateTime
|
18
25
|
|
19
26
|
def department=(v)
|
20
27
|
self[:Location] ||= DEFAULT_LOCATION
|
@@ -28,6 +35,12 @@ module Redox
|
|
28
35
|
self
|
29
36
|
end
|
30
37
|
|
38
|
+
def add_equipment(description: nil, code: nil)
|
39
|
+
self[:Equipment] ||= []
|
40
|
+
self[:Equipment] << { Description: description, Code: code }
|
41
|
+
self
|
42
|
+
end
|
43
|
+
|
31
44
|
def insurances
|
32
45
|
self[:Insurances] = self[:Insurances].map {|ins| ins.is_a?(Redox::Models::Insurance) ? ins : Insurance.new(ins) }
|
33
46
|
end
|
@@ -35,7 +48,7 @@ module Redox
|
|
35
48
|
def to_h
|
36
49
|
result = super.to_h
|
37
50
|
|
38
|
-
%w[VisitDateTime].each do |k|
|
51
|
+
%w[VisitDateTime DischargeDateTime].each do |k|
|
39
52
|
result[key][k] = Redox::Models.format_datetime(result[key][k])
|
40
53
|
end
|
41
54
|
|
@@ -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
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.
|
4
|
+
version: '1.7'
|
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:
|
13
|
+
date: 2021-06-10 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,10 +148,15 @@ 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
|
159
|
+
- lib/redox/models/patient/contacts.rb
|
155
160
|
- lib/redox/models/patient/demographics.rb
|
156
161
|
- lib/redox/models/patient/identifier.rb
|
157
162
|
- lib/redox/models/patient/insurance.rb
|
@@ -163,6 +168,8 @@ files:
|
|
163
168
|
- lib/redox/models/visit.rb
|
164
169
|
- lib/redox/redox_exception.rb
|
165
170
|
- lib/redox/request/financial.rb
|
171
|
+
- lib/redox/request/media.rb
|
172
|
+
- lib/redox/request/notes.rb
|
166
173
|
- lib/redox/request/patient_admin.rb
|
167
174
|
- lib/redox/request/patient_search.rb
|
168
175
|
- lib/redox/request/provider.rb
|
@@ -175,7 +182,7 @@ licenses:
|
|
175
182
|
- MIT
|
176
183
|
metadata:
|
177
184
|
allowed_push_host: https://rubygems.org
|
178
|
-
post_install_message:
|
185
|
+
post_install_message:
|
179
186
|
rdoc_options: []
|
180
187
|
require_paths:
|
181
188
|
- lib
|
@@ -190,9 +197,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
190
197
|
- !ruby/object:Gem::Version
|
191
198
|
version: '0'
|
192
199
|
requirements: []
|
193
|
-
|
194
|
-
|
195
|
-
signing_key:
|
200
|
+
rubygems_version: 3.1.4
|
201
|
+
signing_key:
|
196
202
|
specification_version: 4
|
197
203
|
summary: Ruby wrapper for the Redox Engine API
|
198
204
|
test_files: []
|