redox 1.7.1 → 1.8.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +23 -0
- data/README.md +5 -1
- data/lib/redox/models/administration.rb +15 -0
- data/lib/redox/models/component.rb +13 -0
- data/lib/redox/models/medication.rb +19 -0
- data/lib/redox/models/medications.rb +18 -0
- data/lib/redox/models/note.rb +2 -0
- data/lib/redox/models/visit.rb +28 -0
- data/lib/redox/request/medications.rb +12 -0
- data/lib/redox/version.rb +1 -1
- data/lib/redox.rb +5 -0
- metadata +8 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 52129e89bbf755b7383fba9e868d3bd6abb6aa2077f65ebec55a3fe3ecb8ffea
|
4
|
+
data.tar.gz: e99434f6db3552bf09486a82dfb7f86b51c4fa2bd45cab74f22a8ff71e5db484
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 6788da488aa1bd063ffc90d18133c8a1ae7c9ea72d7b74b73785abeef270276965fe74c6df3b5a448d829e2d228ac3329f9531e5e2a43edc713eea564c513dfd
|
7
|
+
data.tar.gz: 8ec2dcb63378b23ccf8cbdfa62626f3872fba874753d5f0e38559b05c35947230aa70519f412d83fcb90c641be62d3e75bf79ac80acaab30471f21375b01ac52
|
data/CHANGELOG.md
CHANGED
@@ -4,6 +4,24 @@ 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.8.0] - 2021-12-13
|
8
|
+
### Added
|
9
|
+
- Medications Model
|
10
|
+
- Medications#administration
|
11
|
+
|
12
|
+
## [1.7.4] - 2021-12-2
|
13
|
+
### Added
|
14
|
+
- Component Model ID Property Changed
|
15
|
+
|
16
|
+
## [1.7.3] - 2021-11-24
|
17
|
+
### Added
|
18
|
+
- Visit#AttendingProvider and helpers for ID, IDType, FirstName, LastName
|
19
|
+
|
20
|
+
## [1.7.2] - 2021-11-18
|
21
|
+
### Added
|
22
|
+
- Component Model
|
23
|
+
- Notes#Components
|
24
|
+
|
7
25
|
## [1.7.1] - 2021-10-07
|
8
26
|
### Added
|
9
27
|
- Visit#ReferringProvider and helpers for ID, IDType, FirstName, LastName
|
@@ -165,6 +183,11 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
|
|
165
183
|
### Added
|
166
184
|
- Initial Release
|
167
185
|
|
186
|
+
[1.8.0]: https://github.com/WeInfuse/redox/compare/v1.7.4...v1.8.0
|
187
|
+
[1.7.4]: https://github.com/WeInfuse/redox/compare/v1.7.3...v1.7.4
|
188
|
+
[1.7.3]: https://github.com/WeInfuse/redox/compare/v1.7.2...v1.7.3
|
189
|
+
[1.7.2]: https://github.com/WeInfuse/redox/compare/v1.7.1...v1.7.2
|
190
|
+
[1.7.1]: https://github.com/WeInfuse/redox/compare/v1.7...v1.7.1
|
168
191
|
[1.7]: https://github.com/WeInfuse/redox/compare/v1.6.1...v1.7
|
169
192
|
[1.6.1]: https://github.com/WeInfuse/redox/compare/v1.6.0...v1.6.1
|
170
193
|
[1.6.0]: https://github.com/WeInfuse/redox/compare/v1.5.2...v1.6.0
|
data/README.md
CHANGED
@@ -111,7 +111,11 @@ end
|
|
111
111
|
|
112
112
|
After checking out the repo, run `bin/setup` to install dependencies. Then, run `rake test` to run the tests. You can also run `bin/console` for an interactive prompt that will allow you to experiment.
|
113
113
|
|
114
|
-
To install this gem onto your local machine, run `bundle exec rake install`.
|
114
|
+
To install this gem onto your local machine, run `bundle exec rake install`.
|
115
|
+
|
116
|
+
If you have already merged changes into the master branch of this repo and are looking to release a new version, remember to switch out of your local feature branch (if you are on one) to the master or main branch of this repo. Then pull all changes down so you have an up to date code base.
|
117
|
+
|
118
|
+
To actually release a new version, update the version number in `version.rb`, and then run `bundle exec rake release`, which will create a git tag for the version, push git commits and tags, and push the `.gem` file to [rubygems.org](https://rubygems.org).
|
115
119
|
|
116
120
|
## Contributing
|
117
121
|
|
@@ -0,0 +1,15 @@
|
|
1
|
+
module Redox
|
2
|
+
module Models
|
3
|
+
class Administration < AbstractModel
|
4
|
+
property :Status, required: false, from: :status
|
5
|
+
property :Medication, required: false, from: :medication, default: Redox::Models::Medication.new
|
6
|
+
property :StartDate, required: false, from: :start_date
|
7
|
+
property :EndDate, required: false, from: :end_date
|
8
|
+
|
9
|
+
alias_method :status, :Status
|
10
|
+
alias_method :medication, :Medication
|
11
|
+
alias_method :start_date, :StartDate
|
12
|
+
alias_method :end_date, :EndDate
|
13
|
+
end
|
14
|
+
end
|
15
|
+
end
|
@@ -0,0 +1,13 @@
|
|
1
|
+
module Redox
|
2
|
+
module Models
|
3
|
+
class Component < AbstractModel
|
4
|
+
property :ID, required: false, from: :id
|
5
|
+
property :Name, required: false, from: :name
|
6
|
+
property :Value, required: false, from: :value
|
7
|
+
|
8
|
+
alias_method :id, :ID
|
9
|
+
alias_method :name, :Name
|
10
|
+
alias_method :value, :Value
|
11
|
+
end
|
12
|
+
end
|
13
|
+
end
|
@@ -0,0 +1,19 @@
|
|
1
|
+
module Redox
|
2
|
+
module Models
|
3
|
+
class Medication < AbstractModel
|
4
|
+
property :Order, required: false, from: :order, default: {}
|
5
|
+
property :LotNumber, required: false, from: :lot_number
|
6
|
+
property :Dose, required: false, from: :dose, default: {}
|
7
|
+
property :Rate, required: false, from: :rate, default: {}
|
8
|
+
property :Route, required: false, from: :route, default: {}
|
9
|
+
property :Product, required: false, from: :product, default: {}
|
10
|
+
|
11
|
+
alias_method :order, :Order
|
12
|
+
alias_method :lot_number, :LotNumber
|
13
|
+
alias_method :dose, :Dose
|
14
|
+
alias_method :rate, :Rate
|
15
|
+
alias_method :route, :Route
|
16
|
+
alias_method :product, :Product
|
17
|
+
end
|
18
|
+
end
|
19
|
+
end
|
@@ -0,0 +1,18 @@
|
|
1
|
+
module Redox
|
2
|
+
module Models
|
3
|
+
class Medications < AbstractModel
|
4
|
+
property :Visit, required: false, from: :visit, default: Redox::Models::Visit.new
|
5
|
+
property :Patient, required: false, from: :patient, default: Redox::Models::Patient.new
|
6
|
+
property :Administrations, required: false, from: :administrations, default: []
|
7
|
+
|
8
|
+
alias_method :patient, :Patient
|
9
|
+
alias_method :visit, :Visit
|
10
|
+
alias_method :administrations, :Administrations
|
11
|
+
|
12
|
+
def create(meta: Meta.new)
|
13
|
+
Redox::Request::Medications.administration(patient: self, meta: meta)
|
14
|
+
end
|
15
|
+
|
16
|
+
end
|
17
|
+
end
|
18
|
+
end
|
data/lib/redox/models/note.rb
CHANGED
@@ -5,11 +5,13 @@ module Redox
|
|
5
5
|
property :DocumentType, from: :document_type, required: false
|
6
6
|
property :DocumentID, from: :document_id, required: false
|
7
7
|
property :Provider, required: false, from: :provider, default: {}
|
8
|
+
property :Components, required: false, from: :components, default: []
|
8
9
|
|
9
10
|
alias_method :content_type, :ContentType
|
10
11
|
alias_method :document_type, :DocumentType
|
11
12
|
alias_method :document_id, :DocumentID
|
12
13
|
alias_method :provider, :Provider
|
14
|
+
alias_method :components, :Components
|
13
15
|
end
|
14
16
|
end
|
15
17
|
end
|
data/lib/redox/models/visit.rb
CHANGED
@@ -11,6 +11,12 @@ module Redox
|
|
11
11
|
FirstName: nil,
|
12
12
|
LastName: nil
|
13
13
|
}
|
14
|
+
DEFAULT_ATTENDING_PROVIDER = {
|
15
|
+
ID: nil,
|
16
|
+
IDType: nil,
|
17
|
+
FirstName: nil,
|
18
|
+
LastName: nil
|
19
|
+
}
|
14
20
|
|
15
21
|
property :Insurances, from: :insurances, required: false, default: []
|
16
22
|
property :Location, from: :location, required: false, default: DEFAULT_LOCATION
|
@@ -25,11 +31,13 @@ module Redox
|
|
25
31
|
property :CancelReason, from: :cancel_reason, required: false
|
26
32
|
property :DischargeDateTime, from: :end, required: false
|
27
33
|
property :ReferringProvider, from: :referring_provider, required: false, default: DEFAULT_REFERRING_PROVIDER
|
34
|
+
property :AttendingProvider, from: :attending_provider, required: false, default: DEFAULT_ATTENDING_PROVIDER
|
28
35
|
|
29
36
|
alias_method :insurances, :Insurances
|
30
37
|
alias_method :start, :VisitDateTime
|
31
38
|
alias_method :end, :DischargeDateTime
|
32
39
|
alias_method :referring_provider, :ReferringProvider
|
40
|
+
alias_method :attending_provider, :AttendingProvider
|
33
41
|
|
34
42
|
def department=(v)
|
35
43
|
self[:Location] ||= DEFAULT_LOCATION
|
@@ -43,6 +51,26 @@ module Redox
|
|
43
51
|
self
|
44
52
|
end
|
45
53
|
|
54
|
+
def attending_provider_id=(v)
|
55
|
+
self[:AttendingProvider] ||= DEFAULT_ATTENDING_PROVIDER
|
56
|
+
self[:AttendingProvider][:ID] = v
|
57
|
+
end
|
58
|
+
|
59
|
+
def attending_provider_id_type=(v)
|
60
|
+
self[:AttendingProvider] ||= DEFAULT_ATTENDING_PROVIDER
|
61
|
+
self[:AttendingProvider][:IDType] = v
|
62
|
+
end
|
63
|
+
|
64
|
+
def attending_provider_first_name=(v)
|
65
|
+
self[:AttendingProvider] ||= DEFAULT_ATTENDING_PROVIDER
|
66
|
+
self[:AttendingProvider][:FirstName] = v
|
67
|
+
end
|
68
|
+
|
69
|
+
def attending_provider_last_name=(v)
|
70
|
+
self[:AttendingProvider] ||= DEFAULT_ATTENDING_PROVIDER
|
71
|
+
self[:AttendingProvider][:LastName] = v
|
72
|
+
end
|
73
|
+
|
46
74
|
def referring_provider_id=(v)
|
47
75
|
self[:ReferringProvider] ||= DEFAULT_REFERRING_PROVIDER
|
48
76
|
self[:ReferringProvider][:ID] = v
|
@@ -0,0 +1,12 @@
|
|
1
|
+
module Redox
|
2
|
+
module Request
|
3
|
+
class Medications
|
4
|
+
ADMINISTRATION_META = Redox::Models::Meta.new(EventType: 'Administration', DataModel: 'Medications')
|
5
|
+
|
6
|
+
def self.administration(model, meta: Redox::Models::Meta.new)
|
7
|
+
meta = ADMINISTRATION_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
data/lib/redox.rb
CHANGED
@@ -16,6 +16,9 @@ require 'redox/models/notes'
|
|
16
16
|
require 'redox/models/note'
|
17
17
|
require 'redox/models/media'
|
18
18
|
require 'redox/models/media_upload'
|
19
|
+
require 'redox/models/medication'
|
20
|
+
require 'redox/models/medications'
|
21
|
+
require 'redox/models/administration'
|
19
22
|
require 'redox/models/patient/demographics'
|
20
23
|
require 'redox/models/patient/contacts'
|
21
24
|
require 'redox/models/patient/identifier'
|
@@ -23,6 +26,7 @@ require 'redox/models/patient/insurance'
|
|
23
26
|
require 'redox/models/patient/p_c_p'
|
24
27
|
require 'redox/models/potential_matches'
|
25
28
|
require 'redox/models/scheduling'
|
29
|
+
require 'redox/models/component'
|
26
30
|
require 'redox/request/request'
|
27
31
|
require 'redox/request/financial'
|
28
32
|
require 'redox/request/notes'
|
@@ -31,6 +35,7 @@ require 'redox/request/patient_search'
|
|
31
35
|
require 'redox/request/provider'
|
32
36
|
require 'redox/request/scheduling'
|
33
37
|
require 'redox/request/media'
|
38
|
+
require 'redox/request/medications'
|
34
39
|
|
35
40
|
module Redox
|
36
41
|
class Configuration
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: redox
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
4
|
+
version: 1.8.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Alexander Clark
|
@@ -10,7 +10,7 @@ authors:
|
|
10
10
|
autorequire:
|
11
11
|
bindir: exe
|
12
12
|
cert_chain: []
|
13
|
-
date: 2021-
|
13
|
+
date: 2021-12-13 00:00:00.000000000 Z
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
16
16
|
name: httparty
|
@@ -147,9 +147,13 @@ files:
|
|
147
147
|
- lib/redox.rb
|
148
148
|
- lib/redox/authentication.rb
|
149
149
|
- lib/redox/connection.rb
|
150
|
+
- lib/redox/models/administration.rb
|
151
|
+
- lib/redox/models/component.rb
|
150
152
|
- lib/redox/models/financial.rb
|
151
153
|
- lib/redox/models/media.rb
|
152
154
|
- lib/redox/models/media_upload.rb
|
155
|
+
- lib/redox/models/medication.rb
|
156
|
+
- lib/redox/models/medications.rb
|
153
157
|
- lib/redox/models/meta.rb
|
154
158
|
- lib/redox/models/model.rb
|
155
159
|
- lib/redox/models/note.rb
|
@@ -169,6 +173,7 @@ files:
|
|
169
173
|
- lib/redox/redox_exception.rb
|
170
174
|
- lib/redox/request/financial.rb
|
171
175
|
- lib/redox/request/media.rb
|
176
|
+
- lib/redox/request/medications.rb
|
172
177
|
- lib/redox/request/notes.rb
|
173
178
|
- lib/redox/request/patient_admin.rb
|
174
179
|
- lib/redox/request/patient_search.rb
|
@@ -197,7 +202,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
197
202
|
- !ruby/object:Gem::Version
|
198
203
|
version: '0'
|
199
204
|
requirements: []
|
200
|
-
rubygems_version: 3.
|
205
|
+
rubygems_version: 3.1.4
|
201
206
|
signing_key:
|
202
207
|
specification_version: 4
|
203
208
|
summary: Ruby wrapper for the Redox Engine API
|