athena_health 0.8.8 → 0.8.9

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: c40fbe5851076fcf1b42409223af2b31e7b67487
4
- data.tar.gz: fa410c0f0d4eaaa24efd60d3d9d4ff7d60c18ae1
3
+ metadata.gz: 77f28f7fb6f75d0c78670d5608b00a4f34aefd85
4
+ data.tar.gz: 714605373ba4fa7a1e76e64a079e1c0c95e1886f
5
5
  SHA512:
6
- metadata.gz: b7a61e779efd8623ae92b56d8f6808f90a6eddf1f5c7b6411aee5a1879a732a26d0b15a2ad3ffcbf879b494e482f3f8f1bbb6ad6a9bef7461565eeb02755b28e
7
- data.tar.gz: 856fcbd355f57c4c4dd84fca540ec2443587fdf551cf8e41f0369bd8d8c873f491ae00dbe65a204a2bb433d94238bab6fe177b76e69dc0f9190a38b3c47da927
6
+ metadata.gz: b860acb68646014a2659d3a1be9ae9f2ce2c08ff71391c5f3975816a406be1b4656d31c8c9b9cd8e9082cc3b70adbcba6912a3c0a5839aed0ffbe9d4be1be2de
7
+ data.tar.gz: 12d47e52d7da3891f6112a007d95bd6ca89eb6b8ffcb0ff0b0e5be0e91781da11288c44a9636ac54065a3f0004f0fb3bf8785628759791013bcaf14a36e3d3f8
data/lib/athena_health.rb CHANGED
@@ -38,6 +38,12 @@ require 'athena_health/encounter'
38
38
  require 'athena_health/encounter_collection'
39
39
  require 'athena_health/order'
40
40
  require 'athena_health/order_collection'
41
+ require 'athena_health/lab_result'
42
+ require 'athena_health/lab_result_collection'
43
+ require 'athena_health/question'
44
+ require 'athena_health/question_collection'
45
+ require 'athena_health/prescription'
46
+ require 'athena_health/prescription_collection'
41
47
 
42
48
  module AthenaHealth
43
49
  end
@@ -72,6 +72,36 @@ module AthenaHealth
72
72
 
73
73
  EncounterCollection.new(response)
74
74
  end
75
+
76
+ def patient_lab_results(practice_id:, department_id:, patient_id:)
77
+ response = @api.call(
78
+ endpoint: "#{practice_id}/chart/#{patient_id}/labresults",
79
+ method: :get,
80
+ params: { departmentid: department_id }
81
+ )
82
+
83
+ LabResultCollection.new(response)
84
+ end
85
+
86
+ def patient_medical_history(practice_id:, department_id:, patient_id:)
87
+ response = @api.call(
88
+ endpoint: "#{practice_id}/chart/#{patient_id}/labresults",
89
+ method: :get,
90
+ params: { departmentid: department_id }
91
+ )
92
+
93
+ QuestionCollection.new(response)
94
+ end
95
+
96
+ def patient_prescriptions(practice_id:, department_id:, patient_id:)
97
+ response = @api.call(
98
+ endpoint: "#{practice_id}/patients/#{patient_id}/documents/prescriptions",
99
+ method: :get,
100
+ params: { departmentid: department_id }
101
+ )
102
+
103
+ PrescriptionCollection.new(response)
104
+ end
75
105
  end
76
106
  end
77
107
  end
@@ -0,0 +1,9 @@
1
+ module AthenaHealth
2
+ class LabResult < BaseModel
3
+ attribute :labresultdate, String
4
+ attribute :labresultnote, String
5
+ attribute :labresultid, Integer
6
+ attribute :analytes, Array
7
+ attribute :description, String
8
+ end
9
+ end
@@ -0,0 +1,5 @@
1
+ module AthenaHealth
2
+ class LabResultCollection < BaseCollection
3
+ attribute :results, Array[LabResult]
4
+ end
5
+ end
@@ -0,0 +1,17 @@
1
+ module AthenaHealth
2
+ class Prescription < BaseModel
3
+ attribute :prescriptionid, Integer
4
+ attribute :priority, Integer
5
+ attribute :assignedto, String
6
+ attribute :documentclass, String
7
+ attribute :createddatetime, String
8
+ attribute :documentroute, String
9
+ attribute :documentsource, String
10
+ attribute :createddate, String
11
+ attribute :status, String
12
+ attribute :documentdescription, String
13
+ attribute :encounterdate, String
14
+ attribute :lastmodifieddatetime, String
15
+ attribute :documentsubclass, String
16
+ end
17
+ end
@@ -0,0 +1,5 @@
1
+ module AthenaHealth
2
+ class PrescriptionCollection < BaseCollection
3
+ attribute :prescriptions, Array[Prescription]
4
+ end
5
+ end
@@ -0,0 +1,7 @@
1
+ module AthenaHealth
2
+ class Question < BaseModel
3
+ attribute :question, String
4
+ attribute :answer, String
5
+ attribute :questionid, Integer
6
+ end
7
+ end
@@ -0,0 +1,5 @@
1
+ module AthenaHealth
2
+ class QuestionCollection < BaseCollection
3
+ attribute :questions, Array[Question]
4
+ end
5
+ end
@@ -1,3 +1,3 @@
1
1
  module AthenaHealth
2
- VERSION = '0.8.8'.freeze
2
+ VERSION = '0.8.9'.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.8
4
+ version: 0.8.9
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-30 00:00:00.000000000 Z
11
+ date: 2016-03-31 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: typhoeus
@@ -149,6 +149,8 @@ files:
149
149
  - lib/athena_health/event.rb
150
150
  - lib/athena_health/insurance_package.rb
151
151
  - lib/athena_health/insurance_package_collection.rb
152
+ - lib/athena_health/lab_result.rb
153
+ - lib/athena_health/lab_result_collection.rb
152
154
  - lib/athena_health/order.rb
153
155
  - lib/athena_health/order_collection.rb
154
156
  - lib/athena_health/patient.rb
@@ -159,8 +161,12 @@ files:
159
161
  - lib/athena_health/patient_problem_collection.rb
160
162
  - lib/athena_health/practice.rb
161
163
  - lib/athena_health/practice_collection.rb
164
+ - lib/athena_health/prescription.rb
165
+ - lib/athena_health/prescription_collection.rb
162
166
  - lib/athena_health/provider.rb
163
167
  - lib/athena_health/provider_collection.rb
168
+ - lib/athena_health/question.rb
169
+ - lib/athena_health/question_collection.rb
164
170
  - lib/athena_health/version.rb
165
171
  homepage: https://github.com/zywy/athena_health
166
172
  licenses: