redox 1.7.4 → 1.8.2

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: 57da9db9aec3b58889c9c7bdbc64849f9ff608ebcb40692d4d739cdd88a75799
4
- data.tar.gz: 48da259a058cc7dcb0ad3f35a5417f2adf4fd9f1e04853c0ddad23d61ee1167e
3
+ metadata.gz: 74c2f64a9a4dfe39d514cef7ffffbc202129e08d6a2803447b956abe8dbecf4b
4
+ data.tar.gz: 23f406cb77dfd9de5bd4f1a6313c29165a7aded6919497c4f1db2f1e34818085
5
5
  SHA512:
6
- metadata.gz: 62f418206aab1d377c6800e8c28d2abbc1a68b9f5426875e0039bd01a7097ead79139e21166d0dec7dc08771036a8056f37254038f6800290931dadee74187ac
7
- data.tar.gz: 4df580b57ce8ccdc0255439d3b1a1702d7dacaaf2fbd90ffe85ecaaf6aa70b5f5eabc2ddfcaa810af2819c5a5d479288f251c5ae9c6214a91e8d01c0f80427bc
6
+ metadata.gz: c54ecafcd9e150808e99dfb81fb6dda136a444c4ad547faef43be920063ae433ab7ccaa5c6f697026ddcd9d8d89b736ef45eb760c4440af36ef0d9b992f177a0
7
+ data.tar.gz: 2824189ac1f5c5984fafdd8aabafd24f08a5188dfb62d7ec8a1b214614e883cbdfc0ad4d8545b0705ed0c33a59c2a7a57776f2fb3197f639694571778fce2f01
data/CHANGELOG.md CHANGED
@@ -4,6 +4,18 @@ 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.2] - 2022-2-23
8
+ ### Added
9
+ - DirectAddressFrom and DirectAddressTo to Media Model
10
+ ## [1.8.1] - 2022-1-25
11
+ ### Added
12
+ - Components, OrderedBy, Indications, and AdministeringProvider to Medication Model
13
+
14
+ ## [1.8.0] - 2021-12-13
15
+ ### Added
16
+ - Medications Model
17
+ - Medications#administration
18
+
7
19
  ## [1.7.4] - 2021-12-2
8
20
  ### Added
9
21
  - Component Model ID Property Changed
@@ -178,6 +190,9 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
178
190
  ### Added
179
191
  - Initial Release
180
192
 
193
+ [1.8.2]: https://github.com/WeInfuse/redox/compare/v1.8.1...v1.8.2
194
+ [1.8.1]: https://github.com/WeInfuse/redox/compare/v1.8.0...v1.8.1
195
+ [1.8.0]: https://github.com/WeInfuse/redox/compare/v1.7.4...v1.8.0
181
196
  [1.7.4]: https://github.com/WeInfuse/redox/compare/v1.7.3...v1.7.4
182
197
  [1.7.3]: https://github.com/WeInfuse/redox/compare/v1.7.2...v1.7.3
183
198
  [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
@@ -10,6 +10,8 @@ module Redox
10
10
  property :DocumentID, from: :document_id, required: false
11
11
  property :Availability, from: :availability, required: false
12
12
  property :Provider, from: :provider, required: false
13
+ property :DirectAddressFrom, from: :direct_address_from, required: false
14
+ property :DirectAddressTo, from: :direct_address_to, required: false
13
15
 
14
16
  alias_method :file_type, :FileType
15
17
  alias_method :file_name, :FileName
@@ -18,6 +20,8 @@ module Redox
18
20
  alias_method :document_id, :DocumentID
19
21
  alias_method :availability, :Availability
20
22
  alias_method :provider, :Provider
23
+ alias_method :direct_address_from, :DirectAddressFrom
24
+ alias_method :direct_address_to, :DirectAddressTo
21
25
 
22
26
  def availability=(value)
23
27
  case value
@@ -0,0 +1,27 @@
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
+ property :Components, required: false, from: :components, default: []
11
+ property :OrderedBy, required: false, from: :ordered_by, default: {}
12
+ property :Indications, required: false, from: :indications, default: []
13
+ property :AdministeringProvider, required: false, from: :administering_provider, default: {}
14
+
15
+ alias_method :order, :Order
16
+ alias_method :lot_number, :LotNumber
17
+ alias_method :dose, :Dose
18
+ alias_method :rate, :Rate
19
+ alias_method :route, :Route
20
+ alias_method :product, :Product
21
+ alias_method :components, :Components
22
+ alias_method :ordered_by, :OrderedBy
23
+ alias_method :indications, :Indications
24
+ alias_method :administering_provider, :AdministeringProvider
25
+ end
26
+ end
27
+ 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
@@ -1,3 +1,3 @@
1
1
  module Redox
2
- VERSION = '1.7.4'.freeze
2
+ VERSION = '1.8.2'.freeze
3
3
  end
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,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: redox
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.7.4
4
+ version: 1.8.2
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-12-02 00:00:00.000000000 Z
13
+ date: 2022-02-23 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: httparty
@@ -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