athena_health 0.8.4 → 0.8.5

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
  SHA1:
3
- metadata.gz: 995f91c21aeb1b50ac9b1520e473479b18801758
4
- data.tar.gz: ce15b95c8373f5c103a544b036934102b40e1a0f
3
+ metadata.gz: eedc1de9fb1f77c34f43390fa49635ca045d6694
4
+ data.tar.gz: ef4d070532584d44bf0ce41a60f401ef43f5a44f
5
5
  SHA512:
6
- metadata.gz: 77385cb4805c976a9a1408f466cbd9906de0ebb2ce251e7b2add7345cbe2a214e6f1b65473ff1452e9a34e862d619522a37003ea3d5adb1be0a95103890c5719
7
- data.tar.gz: b0d323d4ab1b50e482caf091d8f748649f1db62b4beed968f8938670060d9f92fef7edcb467b652cbe4c6fc10dc1e8fffef1f6dc114a4434d1c1d3b3d7ff1ff3
6
+ metadata.gz: 1e25253efe4c25be44c260ef752b16b9e03aa42fa962fd8a3ec8e18241b31077ae323bd64f8f08aeb8b0b30b77f6649febf7d54dd884eeb823f9d3dff762d04e
7
+ data.tar.gz: bb922bfdee05ccb0a6fce5d6338fb171cc36e32bf2873705c05e2b92eb2d2c7a20df73b94f089806b8adfb3b102e14530fe3686d3f920e731314e6a2db2394bd
@@ -31,6 +31,8 @@ require 'athena_health/appointment'
31
31
  require 'athena_health/appointment_collection'
32
32
  require 'athena_health/insurance_package'
33
33
  require 'athena_health/insurance_package_collection'
34
+ require 'athena_health/patient_appointment_reason'
35
+ require 'athena_health/patient_appointment_reason_collection'
34
36
 
35
37
  module AthenaHealth
36
38
  end
@@ -11,25 +11,39 @@ module AthenaHealth
11
11
  AppointmentTypeCollection.new(response)
12
12
  end
13
13
 
14
- def open_appointment_slots(practice_id:, department_id:, appointment_type_id:, params: {})
14
+ def open_appointment_slots(practice_id:, department_id:, provider_id:, reason_id:, params: {})
15
15
  response = @api.call(
16
16
  endpoint: "#{practice_id}/appointments/open",
17
17
  method: :get,
18
- params: params.merge(departmentid: department_id, appointmenttypeid: appointment_type_id)
18
+ params: params.merge(
19
+ departmentid: department_id,
20
+ providerid: provider_id,
21
+ reasonid: reason_id
22
+ )
19
23
  )
20
24
 
21
25
  AppointmentCollection.new(response)
22
26
  end
23
27
 
24
- def book_appointment(practice_id:, appointment_id:, patient_id:, appointment_type_id:, params: {})
28
+ def book_appointment(practice_id:, appointment_id:, patient_id:, reason_id:, params: {})
25
29
  response = @api.call(
26
30
  endpoint: "#{practice_id}/appointments/#{appointment_id}",
27
31
  method: :put,
28
- params: params.merge(patientid: patient_id, appointmenttypeid: appointment_type_id)
32
+ params: params.merge(patientid: patient_id, reasonid: reason_id)
29
33
  )
30
34
 
31
35
  Appointment.new(response.first)
32
36
  end
37
+
38
+ def all_patient_appointment_reasons(practice_id:, department_id:, provider_id:, params: {})
39
+ response = @api.call(
40
+ endpoint: "#{practice_id}/patientappointmentreasons",
41
+ method: :get,
42
+ params: params.merge!(departmentid: department_id, providerid: provider_id)
43
+ )
44
+
45
+ PatientAppointmentReasonCollection.new(response)
46
+ end
33
47
  end
34
48
  end
35
49
  end
@@ -0,0 +1,10 @@
1
+ module AthenaHealth
2
+ class PatientAppointmentReason < BaseModel
3
+ attribute :schedulingminhours, Integer
4
+ attribute :reasontype, String
5
+ attribute :reason, String
6
+ attribute :description, String
7
+ attribute :reasonid, Integer
8
+ attribute :schedulingmaxdays, Integer
9
+ end
10
+ end
@@ -0,0 +1,7 @@
1
+ module AthenaHealth
2
+ class PatientAppointmentReasonCollection < BaseCollection
3
+ attribute :patientappointmentreasons, Array[PatientAppointmentReason]
4
+
5
+ alias_method :patient_appointment_reasons, :patientappointmentreasons
6
+ end
7
+ end
@@ -1,3 +1,3 @@
1
1
  module AthenaHealth
2
- VERSION = '0.8.4'.freeze
2
+ VERSION = '0.8.5'.freeze
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: athena_health
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.8.4
4
+ version: 0.8.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Mateusz Urbański
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2016-03-10 00:00:00.000000000 Z
11
+ date: 2016-03-11 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: typhoeus
@@ -147,6 +147,8 @@ files:
147
147
  - lib/athena_health/insurance_package.rb
148
148
  - lib/athena_health/insurance_package_collection.rb
149
149
  - lib/athena_health/patient.rb
150
+ - lib/athena_health/patient_appointment_reason.rb
151
+ - lib/athena_health/patient_appointment_reason_collection.rb
150
152
  - lib/athena_health/patient_collection.rb
151
153
  - lib/athena_health/patient_problem.rb
152
154
  - lib/athena_health/patient_problem_collection.rb