redox 1.5.2 → 1.6.0

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: f210f0ebbfb69117dba40de048d175729ba402cd3407f25f2d9fcf2cdf190bf2
4
+ data.tar.gz: 1e4242fa34e80ab3e0cd786e2217f438f45f5d13a7e8450848b0dfc0cfdb0acc
5
5
  SHA512:
6
- metadata.gz: a434730a3fb38681fdd434ac7451c1c9ee5ed49f9f136292991f2499e97f6f16537c853bb1d1b2c13b25882e3ea0210d2cb301f64594fc97c9a229341a5fc213
7
- data.tar.gz: 7d9ab435afe16ae9288f5a8dea5c18e137d592adc4122ecd3b65dbd6504ecbe22b5ecd0ba1c262abcd797ecc230f8c24ce39963fbabf315c8233eb7d9b0334f7
6
+ metadata.gz: ca76e75a695a38e45d0557b1b3fcb8bcd54a7f6d9128439c64a858dcce8e7beda569c454dbd366af1edc6fa8e05b81f606f6b3f4ffc548427ebef5acd350a6d1
7
+ data.tar.gz: 44e2bd01702cbbb8f035faa933d54ac6bbc2583400adfba2f466649cb0a368cb256ac31f7460a68a61d8026e8547d76d8a757d17752a7526b26957eab2ffb46e
data/CHANGELOG.md CHANGED
@@ -4,6 +4,14 @@ 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.6.0] - 2021-02-04
8
+ ### Added
9
+ - Media model
10
+ - MediaUpdate Model
11
+ - Media#create
12
+ - Visit#CancelReason
13
+ - Visit#DischargeDateTime
14
+
7
15
  ## [1.5.2] - 2021-01-08
8
16
  ### Added
9
17
  - Visit#Type
@@ -41,12 +49,12 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
41
49
  - Visit#as\_json
42
50
 
43
51
  ## [1.3.0] - 2020-09-17
44
- ### Added
52
+ ### Added
45
53
  - Transaction model
46
54
  - Financial#create
47
55
 
48
56
  ## [1.2.0] - 2020-07-30
49
- ### Added
57
+ ### Added
50
58
  - Visit model
51
59
  - Model#insurances helper for Patient.Insurances || Visit.Insurances
52
60
 
data/lib/redox.rb CHANGED
@@ -12,6 +12,8 @@ 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/media'
16
+ require 'redox/models/media_upload'
15
17
  require 'redox/models/patient/demographics'
16
18
  require 'redox/models/patient/contacts'
17
19
  require 'redox/models/patient/identifier'
@@ -25,6 +27,7 @@ require 'redox/request/patient_admin'
25
27
  require 'redox/request/patient_search'
26
28
  require 'redox/request/provider'
27
29
  require 'redox/request/scheduling'
30
+ require 'redox/request/media'
28
31
 
29
32
  module Redox
30
33
  class Configuration
@@ -0,0 +1,19 @@
1
+ module Redox
2
+ module Models
3
+ class Media < AbstractModel
4
+ property :FileType, from: :file_type, required: false
5
+ property :FileName, from: :file_name, required: false
6
+ property :FileContents, from: :file_contents, required: false
7
+ property :DocumentType, from: :document_type, required: false
8
+ property :DocumentID, from: :document_id, required: false
9
+ property :Availability, from: :availability, required: false
10
+
11
+ alias_method :file_type, :FileType
12
+ alias_method :file_name, :FileName
13
+ alias_method :file_contents, :FileContents
14
+ alias_method :document_type, :DocumentType
15
+ alias_method :document_id, :DocumentID
16
+ alias_method :availability, :Availability
17
+ end
18
+ end
19
+ 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
@@ -16,9 +16,12 @@ module Redox
16
16
  property :Type, from: :type, required: false
17
17
  property :Reason, from: :reason, required: false
18
18
  property :Equipment, from: :equipment, required: false
19
+ property :CancelReason, from: :cancel_reason, required: false
20
+ property :DischargeDateTime, from: :end, required: false
19
21
 
20
22
  alias_method :insurances, :Insurances
21
23
  alias_method :start, :VisitDateTime
24
+ alias_method :end, :DischargeDateTime
22
25
 
23
26
  def department=(v)
24
27
  self[:Location] ||= DEFAULT_LOCATION
@@ -45,7 +48,7 @@ module Redox
45
48
  def to_h
46
49
  result = super.to_h
47
50
 
48
- %w[VisitDateTime].each do |k|
51
+ %w[VisitDateTime DischargeDateTime].each do |k|
49
52
  result[key][k] = Redox::Models.format_datetime(result[key][k])
50
53
  end
51
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
data/lib/redox/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module Redox
2
- VERSION = '1.5.2'.freeze
2
+ VERSION = '1.6.0'.freeze
3
3
  end
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.6.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-01-08 00:00:00.000000000 Z
13
+ date: 2021-02-04 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,6 +148,8 @@ 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
153
155
  - lib/redox/models/ordering_provider.rb
@@ -164,6 +166,7 @@ files:
164
166
  - lib/redox/models/visit.rb
165
167
  - lib/redox/redox_exception.rb
166
168
  - lib/redox/request/financial.rb
169
+ - lib/redox/request/media.rb
167
170
  - lib/redox/request/patient_admin.rb
168
171
  - lib/redox/request/patient_search.rb
169
172
  - lib/redox/request/provider.rb
@@ -176,7 +179,7 @@ licenses:
176
179
  - MIT
177
180
  metadata:
178
181
  allowed_push_host: https://rubygems.org
179
- post_install_message:
182
+ post_install_message:
180
183
  rdoc_options: []
181
184
  require_paths:
182
185
  - lib
@@ -191,9 +194,9 @@ required_rubygems_version: !ruby/object:Gem::Requirement
191
194
  - !ruby/object:Gem::Version
192
195
  version: '0'
193
196
  requirements: []
194
- rubyforge_project:
197
+ rubyforge_project:
195
198
  rubygems_version: 2.7.6
196
- signing_key:
199
+ signing_key:
197
200
  specification_version: 4
198
201
  summary: Ruby wrapper for the Redox Engine API
199
202
  test_files: []