redox 1.4.0 → 1.5.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: e2c926b510dc2e56b85369003ee89caf82292929308a18775df049e4a57e1d95
4
- data.tar.gz: 9799c173cb24daa74f3dfe02eefb3f8c2a456557dafa819fb7ca2760621a3b4e
3
+ metadata.gz: 70df1547b07206629c70b4add746e3398a31344cb650ad7ed76ed3c445b5f671
4
+ data.tar.gz: ca6e9a96303e38d2e34cbfb6919862255b05ef1d10d5a1f676788bd2257f7e89
5
5
  SHA512:
6
- metadata.gz: 1499bf55b2c53f0a0dafc2d68d3b420bc5a0a0760d4258103360d32526b32e4f418a59fddb50afb3feb80ac45a979045b943018d24a717129e7db072c7233faf
7
- data.tar.gz: 2b2eeebee1f5a35c028cee6c77f582e0dff10734cec40ce620fdc02617c01daf42f73d62e4960ec7a7b77ed4290f733c3fb0ce46f408566f826fa86f1d71a970
6
+ metadata.gz: d083b4a806a96484248be1b1e3fd03684ed24a5217f79eddd7963ac5c22fc0e327d573bcab7c6f6c986db01fee7696f30b33c4d01f04b06627be45bed1045af7
7
+ data.tar.gz: e945ddb514dcb1f0bff7fd8fd829c6d9cb828eed2787773846b4841aad6fbd86a108ad90c8cecc9ba18ade16023a65c78272896f9d3c1a086dc4a5beaa1160d6
@@ -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.5.0] - 2020-12-15
8
+ ### Added
9
+ - Scheduling model
10
+ - Scheduling#create
11
+ - Scheduling#cancel
12
+ - Scheduling#reschedule
13
+ - Scheduling#modification
14
+
7
15
  ## [1.4.0] - 2020-10-13
8
16
  ### Added
9
17
  - AbstractModel that does not add top level key
@@ -121,6 +129,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
121
129
  ### Added
122
130
  - Initial Release
123
131
 
132
+ [1.5.0]: https://github.com/WeInfuse/redox/compare/v1.4.0...v1.5.0
124
133
  [1.4.0]: https://github.com/WeInfuse/redox/compare/v1.3.1...v1.4.0
125
134
  [1.3.1]: https://github.com/WeInfuse/redox/compare/v1.3.0...v1.3.1
126
135
  [1.3.0]: https://github.com/WeInfuse/redox/compare/v1.2.0...v1.3.0
@@ -17,11 +17,13 @@ require 'redox/models/patient/identifier'
17
17
  require 'redox/models/patient/insurance'
18
18
  require 'redox/models/patient/p_c_p'
19
19
  require 'redox/models/potential_matches'
20
+ require 'redox/models/scheduling'
20
21
  require 'redox/request/request'
21
22
  require 'redox/request/financial'
22
23
  require 'redox/request/patient_admin'
23
24
  require 'redox/request/patient_search'
24
25
  require 'redox/request/provider'
26
+ require 'redox/request/scheduling'
25
27
 
26
28
  module Redox
27
29
  class Configuration
@@ -0,0 +1,24 @@
1
+ module Redox
2
+ module Models
3
+ class Scheduling < 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 :AppointmentInfo, required: false, from: :appointment_info, default: []
7
+
8
+ alias_method :patient, :Patient
9
+ alias_method :visit, :Visit
10
+ alias_method :appointment_info, :AppointmentInfo
11
+
12
+ def add_appointment_info(code: nil, codeset: nil, description: nil, value: nil)
13
+ self[:AppointmentInfo] << {
14
+ Code: code,
15
+ Codeset: codeset,
16
+ Description: description,
17
+ Value: value
18
+ }
19
+
20
+ self
21
+ end
22
+ end
23
+ end
24
+ end
@@ -9,6 +9,7 @@ module Redox
9
9
  property :Insurances, from: :insurances, required: false, default: []
10
10
  property :Location, from: :location, required: false, default: DEFAULT_LOCATION
11
11
  property :VisitDateTime, from: :start, required: false
12
+ property :Duration, from: :duration, required: false
12
13
  property :VisitNumber, from: :visit_number, required: false
13
14
  property :AccountNumber, from: :account_number, required: false
14
15
 
@@ -0,0 +1,30 @@
1
+ module Redox
2
+ module Request
3
+ class Scheduling
4
+ CREATE_META = Redox::Models::Meta.new(EventType: 'New', DataModel: 'Scheduling')
5
+ CANCEL_META = Redox::Models::Meta.new(EventType: 'Cancel', DataModel: 'Scheduling')
6
+ RESCHEDULE_META = Redox::Models::Meta.new(EventType: 'Reschedule', DataModel: 'Scheduling')
7
+ MODIFICATION_META = Redox::Models::Meta.new(EventType: 'Modification', DataModel: 'Scheduling')
8
+
9
+ def self.create(model, meta: Redox::Models::Meta.new)
10
+ meta = CREATE_META.merge(meta)
11
+ return Redox::Models::Model.from_response((RedoxClient.connection.request(body: Redox::Request.build_body(model, meta))))
12
+ end
13
+
14
+ def self.cancel(model, meta: Redox::Models::Meta.new)
15
+ meta = CANCEL_META.merge(meta)
16
+ return Redox::Models::Model.from_response((RedoxClient.connection.request(body: Redox::Request.build_body(model, meta))))
17
+ end
18
+
19
+ def self.reschedule(model, meta: Redox::Models::Meta.new)
20
+ meta = RESCHEDULE_META.merge(meta)
21
+ return Redox::Models::Model.from_response((RedoxClient.connection.request(body: Redox::Request.build_body(model, meta))))
22
+ end
23
+
24
+ def self.modification(model, meta: Redox::Models::Meta.new)
25
+ meta = MODIFICATION_META.merge(meta)
26
+ return Redox::Models::Model.from_response((RedoxClient.connection.request(body: Redox::Request.build_body(model, meta))))
27
+ end
28
+ end
29
+ end
30
+ end
@@ -1,3 +1,3 @@
1
1
  module Redox
2
- VERSION = '1.4.0'.freeze
2
+ VERSION = '1.5.0'.freeze
3
3
  end
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.0
4
+ version: 1.5.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: 2020-10-13 00:00:00.000000000 Z
13
+ date: 2020-12-15 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: httparty
@@ -158,6 +158,7 @@ files:
158
158
  - lib/redox/models/patient/p_c_p.rb
159
159
  - lib/redox/models/potential_matches.rb
160
160
  - lib/redox/models/provider.rb
161
+ - lib/redox/models/scheduling.rb
161
162
  - lib/redox/models/transaction.rb
162
163
  - lib/redox/models/visit.rb
163
164
  - lib/redox/redox_exception.rb
@@ -166,6 +167,7 @@ files:
166
167
  - lib/redox/request/patient_search.rb
167
168
  - lib/redox/request/provider.rb
168
169
  - lib/redox/request/request.rb
170
+ - lib/redox/request/scheduling.rb
169
171
  - lib/redox/version.rb
170
172
  - redox.gemspec
171
173
  homepage: https://github.com/WeInfuse/redox