redox 1.7.4 → 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 +6 -0
- data/lib/redox/models/administration.rb +15 -0
- data/lib/redox/models/medication.rb +19 -0
- data/lib/redox/models/medications.rb +18 -0
- data/lib/redox/request/medications.rb +12 -0
- data/lib/redox/version.rb +1 -1
- data/lib/redox.rb +4 -0
- metadata +10 -6
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,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.8.0] - 2021-12-13
|
8
|
+
### Added
|
9
|
+
- Medications Model
|
10
|
+
- Medications#administration
|
11
|
+
|
7
12
|
## [1.7.4] - 2021-12-2
|
8
13
|
### Added
|
9
14
|
- Component Model ID Property Changed
|
@@ -178,6 +183,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
|
|
178
183
|
### Added
|
179
184
|
- Initial Release
|
180
185
|
|
186
|
+
[1.8.0]: https://github.com/WeInfuse/redox/compare/v1.7.4...v1.8.0
|
181
187
|
[1.7.4]: https://github.com/WeInfuse/redox/compare/v1.7.3...v1.7.4
|
182
188
|
[1.7.3]: https://github.com/WeInfuse/redox/compare/v1.7.2...v1.7.3
|
183
189
|
[1.7.2]: https://github.com/WeInfuse/redox/compare/v1.7.1...v1.7.2
|
@@ -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,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
|
@@ -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'
|
@@ -32,6 +35,7 @@ require 'redox/request/patient_search'
|
|
32
35
|
require 'redox/request/provider'
|
33
36
|
require 'redox/request/scheduling'
|
34
37
|
require 'redox/request/media'
|
38
|
+
require 'redox/request/medications'
|
35
39
|
|
36
40
|
module Redox
|
37
41
|
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.
|
4
|
+
version: 1.8.0
|
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-12-
|
13
|
+
date: 2021-12-13 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
|
@@ -147,10 +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
|
150
151
|
- lib/redox/models/component.rb
|
151
152
|
- lib/redox/models/financial.rb
|
152
153
|
- lib/redox/models/media.rb
|
153
154
|
- lib/redox/models/media_upload.rb
|
155
|
+
- lib/redox/models/medication.rb
|
156
|
+
- lib/redox/models/medications.rb
|
154
157
|
- lib/redox/models/meta.rb
|
155
158
|
- lib/redox/models/model.rb
|
156
159
|
- lib/redox/models/note.rb
|
@@ -170,6 +173,7 @@ files:
|
|
170
173
|
- lib/redox/redox_exception.rb
|
171
174
|
- lib/redox/request/financial.rb
|
172
175
|
- lib/redox/request/media.rb
|
176
|
+
- lib/redox/request/medications.rb
|
173
177
|
- lib/redox/request/notes.rb
|
174
178
|
- lib/redox/request/patient_admin.rb
|
175
179
|
- lib/redox/request/patient_search.rb
|
@@ -183,7 +187,7 @@ licenses:
|
|
183
187
|
- MIT
|
184
188
|
metadata:
|
185
189
|
allowed_push_host: https://rubygems.org
|
186
|
-
post_install_message:
|
190
|
+
post_install_message:
|
187
191
|
rdoc_options: []
|
188
192
|
require_paths:
|
189
193
|
- lib
|
@@ -199,7 +203,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
199
203
|
version: '0'
|
200
204
|
requirements: []
|
201
205
|
rubygems_version: 3.1.4
|
202
|
-
signing_key:
|
206
|
+
signing_key:
|
203
207
|
specification_version: 4
|
204
208
|
summary: Ruby wrapper for the Redox Engine API
|
205
209
|
test_files: []
|