athena_health 0.9.6 → 0.9.7

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: c6b9312ad84245da31088e1581aacf7193e5c029
4
- data.tar.gz: 39576dde0e78b63e645f87ff88b5bcb02dfc5a20
3
+ metadata.gz: ac5ecd23087e19580ec6b60ada623db091d803b6
4
+ data.tar.gz: a1f72931aff618ebf002a4a77060e8d1d8eb4694
5
5
  SHA512:
6
- metadata.gz: ceb1e0ebd88847672ca2b1f2e732a6168f2d66db5488cc9a0a705a21af0ae1ad9d99892a9a83ce5aa2936d363e11a40d389a841c6610cf3fc531360b90d18090
7
- data.tar.gz: 6d71a2f14838c844747ca07e71ddf1d1cd83537af76c54afba0566f063d2ccaa14859d1b2d882b30615c9f4478be1f94b8328a866fccd0662e2ccdf7d26e504b
6
+ metadata.gz: 69ec39b4605ab5353b48c20ba1d95ffee0930607b564571985fb23e935f3a30833cb9c714ea037193fcaaeaa24f66f42cde27468e66d9622e63f9fe69fd20e7f
7
+ data.tar.gz: be2f6b3e0c06cabbf7a2e545d0ecc7d33e2c9de38baedfafe7eda047737db5db06ee7688929ddea4efd07e91151bc7602489327e8c6cead87c906af6392b8093
@@ -46,6 +46,8 @@ require 'athena_health/question'
46
46
  require 'athena_health/question_collection'
47
47
  require 'athena_health/prescription'
48
48
  require 'athena_health/prescription_collection'
49
+ require 'athena_health/document'
50
+ require 'athena_health/document_collection'
49
51
 
50
52
  module AthenaHealth
51
53
  end
@@ -0,0 +1,19 @@
1
+ module AthenaHealth
2
+ class Document < BaseModel
3
+ attribute :prescriptionid, Integer
4
+ attribute :encounterid, Integer
5
+ attribute :providerid, Integer
6
+ attribute :priority, Integer
7
+ attribute :assignedto, String
8
+ attribute :documentclass, String
9
+ attribute :createddatetime, String
10
+ attribute :documentroute, String
11
+ attribute :documentsource, String
12
+ attribute :createddate, String
13
+ attribute :status, String
14
+ attribute :documentdescription, String
15
+ attribute :encounterdate, String
16
+ attribute :lastmodifieddatetime, String
17
+ attribute :documentsubclass, String
18
+ end
19
+ end
@@ -0,0 +1,5 @@
1
+ module AthenaHealth
2
+ class DocumentCollection < BaseCollection
3
+ attribute :documents, Array[Document]
4
+ end
5
+ end
@@ -95,7 +95,7 @@ module AthenaHealth
95
95
 
96
96
  def patient_prescriptions(practice_id:, department_id:, patient_id:)
97
97
  response = @api.call(
98
- endpoint: "#{practice_id}/patients/#{patient_id}/documents/prescriptions",
98
+ endpoint: "#{practice_id}/patients/#{patient_id}/documents/prescription",
99
99
  method: :get,
100
100
  params: { departmentid: department_id }
101
101
  )
@@ -123,14 +123,14 @@ module AthenaHealth
123
123
  AppointmentCollection.new(response)
124
124
  end
125
125
 
126
- def patient_appointment(practice_id:, patient_id:, appointment_id:, params: {})
127
- response = @api.call(
128
- endpoint: "#{practice_id}/patients/#{patient_id}/appointments/#{appointment_id}",
129
- method: :get,
130
- params: params
131
- )
126
+ def patient_documents(practice_id:, department_id:, patient_id:, params: {})
127
+ response = @api.call(
128
+ endpoint: "#{practice_id}/patients/#{patient_id}/documents",
129
+ method: :get,
130
+ params: params.merge!(departmentid: department_id)
131
+ )
132
132
 
133
- AppointmentCollection.new(response)
133
+ DocumentCollection.new(response)
134
134
  end
135
135
  end
136
136
  end
@@ -1,3 +1,3 @@
1
1
  module AthenaHealth
2
- VERSION = '0.9.6'.freeze
2
+ VERSION = '0.9.7'.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.9.6
4
+ version: 0.9.7
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-11 00:00:00.000000000 Z
11
+ date: 2016-04-12 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: typhoeus
@@ -138,6 +138,8 @@ files:
138
138
  - lib/athena_health/connection.rb
139
139
  - lib/athena_health/department.rb
140
140
  - lib/athena_health/department_collection.rb
141
+ - lib/athena_health/document.rb
142
+ - lib/athena_health/document_collection.rb
141
143
  - lib/athena_health/encounter.rb
142
144
  - lib/athena_health/encounter_collection.rb
143
145
  - lib/athena_health/endpoints/appointments.rb