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 +4 -4
- data/lib/athena_health.rb +2 -0
- data/lib/athena_health/appointment.rb +24 -20
- data/lib/athena_health/endpoints/patients.rb +36 -0
- data/lib/athena_health/question.rb +7 -3
- data/lib/athena_health/social_history.rb +6 -0
- data/lib/athena_health/template.rb +6 -0
- data/lib/athena_health/version.rb +1 -1
- metadata +4 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 4f21e19e2a305b920187fcdd57d1d5924d1a24ea
|
4
|
+
data.tar.gz: d5389eacaf2d370eccbe8df5f6bd6df622fc8f96
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 16e7dcb4cb2f557021a0cbfd1d287c4a4280aea105d2d290735dc8858b944a95330fb7b5c702b705e92faed5d467c5878ee0e49d874ae7d40e85ffebdd52cc28
|
7
|
+
data.tar.gz: 1f1d3fad3c3d44cad2e8816cd4dbdbbc5434ce323a6601e156dbb5ec89225aeedbd5665ed040d4404bc5af276462a61b219bd7a5bd38c618efaf476f5be18864
|
data/lib/athena_health.rb
CHANGED
@@ -1,25 +1,29 @@
|
|
1
1
|
module AthenaHealth
|
2
2
|
class Appointment < BaseModel
|
3
|
-
attribute :
|
4
|
-
attribute :
|
5
|
-
attribute :
|
6
|
-
attribute :
|
7
|
-
attribute :
|
8
|
-
attribute :
|
9
|
-
attribute :
|
10
|
-
attribute :
|
11
|
-
attribute :
|
12
|
-
attribute :
|
13
|
-
attribute :
|
14
|
-
attribute :
|
15
|
-
attribute :
|
16
|
-
attribute :
|
17
|
-
attribute :
|
18
|
-
attribute :
|
19
|
-
attribute :
|
20
|
-
attribute :
|
21
|
-
attribute :
|
22
|
-
attribute :
|
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 :
|
4
|
-
attribute :
|
5
|
-
attribute :
|
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
|
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.
|
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-
|
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:
|