athena_health 1.0.13 → 1.0.14

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: ab7b04de7b904154825fe88ed61d2fd61bde66c1
4
- data.tar.gz: f764c8ccfcf065152421d1a3148e3b38d6493e2a
3
+ metadata.gz: 4f21e19e2a305b920187fcdd57d1d5924d1a24ea
4
+ data.tar.gz: d5389eacaf2d370eccbe8df5f6bd6df622fc8f96
5
5
  SHA512:
6
- metadata.gz: 580d313b0933e2d9def9fc9999cf053bbeeb1c45bad5e9a77bfab5187fc05bc1b05c58f9d85f7451f37915e22cb3fc78eb37ea936a6448ee90b9f7b9c1d18401
7
- data.tar.gz: 6b24b66242b4e0da8a7ce4f0218b63717a31f30cd5a79368d79430822f0d3b9a9b2ff0c8b88fb45fa3efe13b342f96275bc3589717b157af44e8606b235d8e25
6
+ metadata.gz: 16e7dcb4cb2f557021a0cbfd1d287c4a4280aea105d2d290735dc8858b944a95330fb7b5c702b705e92faed5d467c5878ee0e49d874ae7d40e85ffebdd52cc28
7
+ data.tar.gz: 1f1d3fad3c3d44cad2e8816cd4dbdbbc5434ce323a6601e156dbb5ec89225aeedbd5665ed040d4404bc5af276462a61b219bd7a5bd38c618efaf476f5be18864
@@ -57,6 +57,8 @@ require 'athena_health/allergy'
57
57
  require 'athena_health/laboratory'
58
58
  require 'athena_health/note'
59
59
  require 'athena_health/note_collection'
60
+ require 'athena_health/template'
61
+ require 'athena_health/social_history'
60
62
 
61
63
  module AthenaHealth
62
64
  end
@@ -1,25 +1,29 @@
1
1
  module AthenaHealth
2
2
  class Appointment < BaseModel
3
- attribute :appointmentid, Integer
4
- attribute :appointmentstatus, String
5
- attribute :appointmenttype, String
6
- attribute :appointmenttypeid, Integer
7
- attribute :coordinatorenterprise, Boolean
8
- attribute :date, String
9
- attribute :departmentid, Integer
10
- attribute :duration, Integer
11
- attribute :encounterstatus, String
12
- attribute :frozen, Boolean
13
- attribute :lastmodified, String
14
- attribute :patient, Patient
15
- attribute :patientappointmenttypename, String
16
- attribute :patientid, Integer
17
- attribute :providerid, Integer
18
- attribute :rescheduledappointmentid, Integer
19
- attribute :scheduledby, String
20
- attribute :scheduleddatetime, String
21
- attribute :starttime, String
22
- attribute :templateappointmentid, Integer
3
+ attribute :appointmentconfirmationname, String
4
+ attribute :appointmentid, Integer
5
+ attribute :appointmentstatus, String
6
+ attribute :appointmenttype, String
7
+ attribute :appointmenttypeid, Integer
8
+ attribute :cancelleddatetime, String
9
+ attribute :cancelreasonname, String
10
+ attribute :cancelreasonnoshow, Boolean
11
+ attribute :coordinatorenterprise, Boolean
12
+ attribute :date, String
13
+ attribute :departmentid, Integer
14
+ attribute :duration, Integer
15
+ attribute :encounterstatus, String
16
+ attribute :frozen, Boolean
17
+ attribute :lastmodified, String
18
+ attribute :patient, Patient
19
+ attribute :patientappointmenttypename, String
20
+ attribute :patientid, Integer
21
+ attribute :providerid, Integer
22
+ attribute :rescheduledappointmentid, Integer
23
+ attribute :scheduledby, String
24
+ attribute :scheduleddatetime, String
25
+ attribute :starttime, String
26
+ attribute :templateappointmentid, Integer
23
27
 
24
28
  def appointment_status
25
29
  {
@@ -194,6 +194,42 @@ module AthenaHealth
194
194
  params: params.merge!(departmentid: department_id)
195
195
  )
196
196
  end
197
+
198
+ def patient_social_history_templates(practice_id:, department_id:, patient_id:)
199
+ response = @api.call(
200
+ endpoint: "#{practice_id}/chart/#{patient_id}/socialhistory/templates",
201
+ method: :get,
202
+ params: { departmentid: department_id }
203
+ )
204
+
205
+ response.map {|template| AthenaHealth::Template.new(template) }
206
+ end
207
+
208
+ def set_patient_social_history_templates(practice_id:, department_id:, patient_id:, template_ids: [])
209
+ response = @api.call(
210
+ endpoint: "#{practice_id}/chart/#{patient_id}/socialhistory/templates",
211
+ method: :put,
212
+ params: { departmentid: department_id, templateids: template_ids.join(', ') }
213
+ )
214
+ end
215
+
216
+ def update_patient_social_history(practice_id:, department_id:, patient_id:, questions:)
217
+ response = @api.call(
218
+ endpoint: "#{practice_id}/chart/#{patient_id}/socialhistory",
219
+ method: :put,
220
+ params: { departmentid: department_id, questions: questions.to_json }
221
+ )
222
+ end
223
+
224
+ def patient_social_history(practice_id:, department_id:, patient_id:, params: {})
225
+ response = @api.call(
226
+ endpoint: "#{practice_id}/chart/#{patient_id}/socialhistory",
227
+ method: :get,
228
+ params: params.merge!(departmentid: department_id)
229
+ )
230
+
231
+ SocialHistory.new(response)
232
+ end
197
233
  end
198
234
  end
199
235
  end
@@ -1,7 +1,11 @@
1
1
  module AthenaHealth
2
2
  class Question < BaseModel
3
- attribute :question, String
4
- attribute :answer, String
5
- attribute :questionid, Integer
3
+ attribute :answer, String
4
+ attribute :key, String
5
+ attribute :lastupdated, Integer
6
+ attribute :ordering, Integer
7
+ attribute :templateid, Integer
8
+ attribute :question, String
9
+ attribute :questionid, Integer
6
10
  end
7
11
  end
@@ -0,0 +1,6 @@
1
+ module AthenaHealth
2
+ class SocialHistory < BaseModel
3
+ attribute :templates, Array[Template]
4
+ attribute :questions, Array[Question]
5
+ end
6
+ end
@@ -0,0 +1,6 @@
1
+ module AthenaHealth
2
+ class Template < BaseModel
3
+ attribute :templatename, String
4
+ attribute :templateid, Integer
5
+ end
6
+ end
@@ -1,3 +1,3 @@
1
1
  module AthenaHealth
2
- VERSION = '1.0.13'.freeze
2
+ VERSION = '1.0.14'.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: 1.0.13
4
+ version: 1.0.14
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-05-18 00:00:00.000000000 Z
11
+ date: 2016-05-19 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: typhoeus
@@ -166,6 +166,8 @@ files:
166
166
  - lib/athena_health/provider_collection.rb
167
167
  - lib/athena_health/question.rb
168
168
  - lib/athena_health/question_collection.rb
169
+ - lib/athena_health/social_history.rb
170
+ - lib/athena_health/template.rb
169
171
  - lib/athena_health/version.rb
170
172
  homepage: https://github.com/zywy/athena_health
171
173
  licenses: