athena_health 0.8.7 → 0.8.8
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 +5 -0
- data/lib/athena_health/client.rb +1 -0
- data/lib/athena_health/encounter.rb +16 -0
- data/lib/athena_health/encounter_collection.rb +5 -0
- data/lib/athena_health/endpoints/encounters.rb +32 -0
- data/lib/athena_health/endpoints/patients.rb +10 -0
- data/lib/athena_health/order.rb +14 -0
- data/lib/athena_health/order_collection.rb +7 -0
- data/lib/athena_health/patient.rb +1 -0
- data/lib/athena_health/version.rb +1 -1
- metadata +7 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: c40fbe5851076fcf1b42409223af2b31e7b67487
|
4
|
+
data.tar.gz: fa410c0f0d4eaaa24efd60d3d9d4ff7d60c18ae1
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b7a61e779efd8623ae92b56d8f6808f90a6eddf1f5c7b6411aee5a1879a732a26d0b15a2ad3ffcbf879b494e482f3f8f1bbb6ad6a9bef7461565eeb02755b28e
|
7
|
+
data.tar.gz: 856fcbd355f57c4c4dd84fca540ec2443587fdf551cf8e41f0369bd8d8c873f491ae00dbe65a204a2bb433d94238bab6fe177b76e69dc0f9190a38b3c47da927
|
data/lib/athena_health.rb
CHANGED
@@ -10,6 +10,7 @@ require 'athena_health/endpoints/patients'
|
|
10
10
|
require 'athena_health/endpoints/appointments'
|
11
11
|
require 'athena_health/endpoints/providers'
|
12
12
|
require 'athena_health/endpoints/insurance_packages'
|
13
|
+
require 'athena_health/endpoints/encounters'
|
13
14
|
require 'athena_health/client'
|
14
15
|
require 'athena_health/base_collection'
|
15
16
|
require 'athena_health/base_model'
|
@@ -33,6 +34,10 @@ require 'athena_health/insurance_package'
|
|
33
34
|
require 'athena_health/insurance_package_collection'
|
34
35
|
require 'athena_health/patient_appointment_reason'
|
35
36
|
require 'athena_health/patient_appointment_reason_collection'
|
37
|
+
require 'athena_health/encounter'
|
38
|
+
require 'athena_health/encounter_collection'
|
39
|
+
require 'athena_health/order'
|
40
|
+
require 'athena_health/order_collection'
|
36
41
|
|
37
42
|
module AthenaHealth
|
38
43
|
end
|
data/lib/athena_health/client.rb
CHANGED
@@ -0,0 +1,16 @@
|
|
1
|
+
module AthenaHealth
|
2
|
+
class Encounter < BaseModel
|
3
|
+
attribute :encountertype, String
|
4
|
+
attribute :patientstatusid, Integer
|
5
|
+
attribute :stage, String
|
6
|
+
attribute :status, String
|
7
|
+
attribute :appointmentid, Integer
|
8
|
+
attribute :patientlocationid, Integer
|
9
|
+
attribute :encounterdate, String
|
10
|
+
attribute :encountervisitname, String
|
11
|
+
attribute :patientlocation, String
|
12
|
+
attribute :encounterid, Integer
|
13
|
+
attribute :lastupdated, String
|
14
|
+
attribute :patientstatus, String
|
15
|
+
end
|
16
|
+
end
|
@@ -0,0 +1,32 @@
|
|
1
|
+
module AthenaHealth
|
2
|
+
module Endpoints
|
3
|
+
module Encounters
|
4
|
+
def find_encounter(practice_id:, encounter_id:)
|
5
|
+
response = @api.call(
|
6
|
+
endpoint: "#{practice_id}/chart/encounter/#{encounter_id}",
|
7
|
+
method: :get
|
8
|
+
)
|
9
|
+
|
10
|
+
Encounter.new(response.first)
|
11
|
+
end
|
12
|
+
|
13
|
+
def encounter_orders(practice_id:, encounter_id:)
|
14
|
+
response = @api.call(
|
15
|
+
endpoint: "#{practice_id}/chart/encounter/#{encounter_id}/orders",
|
16
|
+
method: :get
|
17
|
+
)
|
18
|
+
|
19
|
+
OrderCollection.new(response.first)
|
20
|
+
end
|
21
|
+
|
22
|
+
def encounter_order(practice_id:, encounter_id:, order_id:)
|
23
|
+
response = @api.call(
|
24
|
+
endpoint: "#{practice_id}/chart/encounter/#{encounter_id}/orders/#{order_id}",
|
25
|
+
method: :get
|
26
|
+
)
|
27
|
+
|
28
|
+
Order.new(response)
|
29
|
+
end
|
30
|
+
end
|
31
|
+
end
|
32
|
+
end
|
@@ -62,6 +62,16 @@ module AthenaHealth
|
|
62
62
|
|
63
63
|
PatientProblemCollection.new(response)
|
64
64
|
end
|
65
|
+
|
66
|
+
def patient_encounters(practice_id:, department_id:, patient_id:)
|
67
|
+
response = @api.call(
|
68
|
+
endpoint: "#{practice_id}/chart/#{patient_id}/encounters",
|
69
|
+
method: :get,
|
70
|
+
params: { departmentid: department_id }
|
71
|
+
)
|
72
|
+
|
73
|
+
EncounterCollection.new(response)
|
74
|
+
end
|
65
75
|
end
|
66
76
|
end
|
67
77
|
end
|
@@ -0,0 +1,14 @@
|
|
1
|
+
module AthenaHealth
|
2
|
+
class Order < BaseModel
|
3
|
+
attribute :status, String
|
4
|
+
attribute :description, String
|
5
|
+
attribute :ordertype, String
|
6
|
+
attribute :documentid, Integer
|
7
|
+
attribute :documents, Array
|
8
|
+
attribute :documentationonly, Boolean
|
9
|
+
attribute :classdescription, String
|
10
|
+
attribute :orderingprovider, String
|
11
|
+
attribute :assigneduser, String
|
12
|
+
attribute :dateordered, String
|
13
|
+
end
|
14
|
+
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
|
+
version: 0.8.8
|
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-
|
11
|
+
date: 2016-03-30 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: typhoeus
|
@@ -136,8 +136,11 @@ files:
|
|
136
136
|
- lib/athena_health/connection.rb
|
137
137
|
- lib/athena_health/department.rb
|
138
138
|
- lib/athena_health/department_collection.rb
|
139
|
+
- lib/athena_health/encounter.rb
|
140
|
+
- lib/athena_health/encounter_collection.rb
|
139
141
|
- lib/athena_health/endpoints/appointments.rb
|
140
142
|
- lib/athena_health/endpoints/departments.rb
|
143
|
+
- lib/athena_health/endpoints/encounters.rb
|
141
144
|
- lib/athena_health/endpoints/insurance_packages.rb
|
142
145
|
- lib/athena_health/endpoints/patients.rb
|
143
146
|
- lib/athena_health/endpoints/practices.rb
|
@@ -146,6 +149,8 @@ files:
|
|
146
149
|
- lib/athena_health/event.rb
|
147
150
|
- lib/athena_health/insurance_package.rb
|
148
151
|
- lib/athena_health/insurance_package_collection.rb
|
152
|
+
- lib/athena_health/order.rb
|
153
|
+
- lib/athena_health/order_collection.rb
|
149
154
|
- lib/athena_health/patient.rb
|
150
155
|
- lib/athena_health/patient_appointment_reason.rb
|
151
156
|
- lib/athena_health/patient_appointment_reason_collection.rb
|