athena_health 1.0.2 → 1.0.3

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: 77b09b6139b263f17e096b21626e9b54b8c895c6
4
- data.tar.gz: f5eecc7358c14ac7e2831ab65c78ded4fb5a5481
3
+ metadata.gz: 57c85cdd400fc6b61b2c470a4e5cc38d246ab5c5
4
+ data.tar.gz: f8c1aab84df5786f5a544d111331ddf86a2c8c80
5
5
  SHA512:
6
- metadata.gz: cec8a45ea1c3777fbc0c01ab5825ac189bff49b5fd96caf1f25d458495ba353242f7c3a8ce37f3923a5416efa13b8addee291fe4b71c29a93ce94ad2f65a7fb9
7
- data.tar.gz: 85faab10ad44fc9a354014e4894c37d47e53cccc8cb72555f0a7b01f4f32c1af9ef9ee1d6394e520c4666401eb9e800aff0a6455c0bfaa2cabc837e73eff1d3d
6
+ metadata.gz: 4fe2064e01bbde07bce4099d0c77a43afe3205ef75ccef3b1e50603096cf6a481cdd8c96e8895d36a1c74c97ff2e38fda3b6984599b3157c68fdb56287e7e249
7
+ data.tar.gz: 4b465ebb1fed713c333a52119591063d366c8f55df54d2be64e29d0a2bf3b1162339209d59d3774728d7b8e0793a1dc865cec40a5a077f05ddaf1165d3ca9e2b
data/lib/athena_health.rb CHANGED
@@ -52,6 +52,8 @@ require 'athena_health/document_collection'
52
52
  require 'athena_health/facility'
53
53
  require 'athena_health/pharmacy'
54
54
  require 'athena_health/pharmacy_collection'
55
+ require 'athena_health/medication'
56
+ require 'athena_health/allergy'
55
57
 
56
58
  module AthenaHealth
57
59
  end
@@ -0,0 +1,6 @@
1
+ module AthenaHealth
2
+ class Allergy < BaseModel
3
+ attribute :allergyid, Integer
4
+ attribute :allergy, String
5
+ end
6
+ end
@@ -10,6 +10,26 @@ module AthenaHealth
10
10
 
11
11
  response.map {|facility| AthenaHealth::Facility.new(facility) }
12
12
  end
13
+
14
+ def all_medications(practice_id:, search_value:)
15
+ response = @api.call(
16
+ endpoint: "#{practice_id}/reference/medications",
17
+ method: :get,
18
+ params: { searchvalue: search_value }
19
+ )
20
+
21
+ response.map {|medication| AthenaHealth::Medication.new(medication) }
22
+ end
23
+
24
+ def all_allergies(practice_id:, search_value:)
25
+ response = @api.call(
26
+ endpoint: "#{practice_id}/reference/allergies",
27
+ method: :get,
28
+ params: { searchvalue: search_value }
29
+ )
30
+
31
+ response.map {|allergy| AthenaHealth::Allergy.new(allergy) }
32
+ end
13
33
  end
14
34
  end
15
35
  end
@@ -0,0 +1,6 @@
1
+ module AthenaHealth
2
+ class Medication < BaseModel
3
+ attribute :medicationid, Integer
4
+ attribute :medication, String
5
+ end
6
+ end
@@ -1,3 +1,3 @@
1
1
  module AthenaHealth
2
- VERSION = '1.0.2'.freeze
2
+ VERSION = '1.0.3'.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.2
4
+ version: 1.0.3
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-21 00:00:00.000000000 Z
11
+ date: 2016-04-22 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: typhoeus
@@ -125,6 +125,7 @@ files:
125
125
  - Rakefile
126
126
  - athena_health.gemspec
127
127
  - lib/athena_health.rb
128
+ - lib/athena_health/allergy.rb
128
129
  - lib/athena_health/analyte.rb
129
130
  - lib/athena_health/analyte_collection.rb
130
131
  - lib/athena_health/appointment.rb
@@ -157,6 +158,7 @@ files:
157
158
  - lib/athena_health/insurance_package_collection.rb
158
159
  - lib/athena_health/lab_result.rb
159
160
  - lib/athena_health/lab_result_collection.rb
161
+ - lib/athena_health/medication.rb
160
162
  - lib/athena_health/order.rb
161
163
  - lib/athena_health/order_collection.rb
162
164
  - lib/athena_health/patient.rb