athena_health 1.0.1 → 1.0.2

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: a4bbca238d70649f6ed84bdb51362df5d826ad02
4
- data.tar.gz: e127e4f1d410186b5485f2ddbe0688463f87ec42
3
+ metadata.gz: 77b09b6139b263f17e096b21626e9b54b8c895c6
4
+ data.tar.gz: f5eecc7358c14ac7e2831ab65c78ded4fb5a5481
5
5
  SHA512:
6
- metadata.gz: 455f7c749c53f0459a7523f8919cfab3f77fa0a499d5e0c4867ead4771a9308ccdfbcc98cea8c872af45765ea8b9301489f19019e9103bb939350aa05f755d90
7
- data.tar.gz: 4c92c7645a466146d83093e84a844424798ec3d3518bdb3fc34643677b551a9eeede21ea9bb4f49b468abfec984c07b9014fd3b206908c0af6ed8d874386d1c5
6
+ metadata.gz: cec8a45ea1c3777fbc0c01ab5825ac189bff49b5fd96caf1f25d458495ba353242f7c3a8ce37f3923a5416efa13b8addee291fe4b71c29a93ce94ad2f65a7fb9
7
+ data.tar.gz: 85faab10ad44fc9a354014e4894c37d47e53cccc8cb72555f0a7b01f4f32c1af9ef9ee1d6394e520c4666401eb9e800aff0a6455c0bfaa2cabc837e73eff1d3d
data/lib/athena_health.rb CHANGED
@@ -50,6 +50,8 @@ require 'athena_health/prescription_collection'
50
50
  require 'athena_health/document'
51
51
  require 'athena_health/document_collection'
52
52
  require 'athena_health/facility'
53
+ require 'athena_health/pharmacy'
54
+ require 'athena_health/pharmacy_collection'
53
55
 
54
56
  module AthenaHealth
55
57
  end
@@ -132,6 +132,42 @@ module AthenaHealth
132
132
 
133
133
  DocumentCollection.new(response)
134
134
  end
135
+
136
+ def patient_default_pharmacy(practice_id:, department_id:, patient_id:)
137
+ response = @api.call(
138
+ endpoint: "#{practice_id}/chart/#{patient_id}/pharmacies/default",
139
+ method: :get,
140
+ params: { departmentid: department_id }
141
+ )
142
+
143
+ Pharmacy.new(response)
144
+ end
145
+
146
+ def set_patient_default_pharmacy(practice_id:, department_id:, patient_id:, params: {})
147
+ @api.call(
148
+ endpoint: "#{practice_id}/chart/#{patient_id}/pharmacies/default",
149
+ method: :put,
150
+ params: params.merge!(departmentid: department_id)
151
+ )
152
+ end
153
+
154
+ def patient_preferred_pharmacies(practice_id:, department_id:, patient_id:, params: {})
155
+ response = @api.call(
156
+ endpoint: "#{practice_id}/chart/#{patient_id}/pharmacies/preferred",
157
+ method: :get,
158
+ params: params.merge!(departmentid: department_id)
159
+ )
160
+
161
+ PharmacyCollection.new(response)
162
+ end
163
+
164
+ def add_patient_preferred_pharmacy(practice_id:, department_id:, patient_id:, params: {})
165
+ @api.call(
166
+ endpoint: "#{practice_id}/chart/#{patient_id}/pharmacies/preferred",
167
+ method: :put,
168
+ params: params.merge!(departmentid: department_id)
169
+ )
170
+ end
135
171
  end
136
172
  end
137
173
  end
@@ -0,0 +1,16 @@
1
+ module AthenaHealth
2
+ class Pharmacy < BaseModel
3
+ attribute :clinicalproviderid, Integer
4
+ attribute :clinicalprovidername, String
5
+ attribute :address1, String
6
+ attribute :address2, String
7
+ attribute :city, String
8
+ attribute :state, String
9
+ attribute :zip, String
10
+ attribute :phonenumber, String
11
+ attribute :faxnumber, String
12
+ attribute :acceptfax, Boolean
13
+ attribute :pharmacytype, String
14
+ attribute :receivertype, String
15
+ end
16
+ end
@@ -0,0 +1,5 @@
1
+ module AthenaHealth
2
+ class PharmacyCollection < BaseCollection
3
+ attribute :pharmacies, Array[Pharmacy]
4
+ end
5
+ end
@@ -1,3 +1,3 @@
1
1
  module AthenaHealth
2
- VERSION = '1.0.1'.freeze
2
+ VERSION = '1.0.2'.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.1
4
+ version: 1.0.2
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-04-20 00:00:00.000000000 Z
11
+ date: 2016-04-21 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: typhoeus
@@ -165,6 +165,8 @@ files:
165
165
  - lib/athena_health/patient_collection.rb
166
166
  - lib/athena_health/patient_problem.rb
167
167
  - lib/athena_health/patient_problem_collection.rb
168
+ - lib/athena_health/pharmacy.rb
169
+ - lib/athena_health/pharmacy_collection.rb
168
170
  - lib/athena_health/practice.rb
169
171
  - lib/athena_health/practice_collection.rb
170
172
  - lib/athena_health/prescription.rb