athena_health 1.0.50 → 1.0.51

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
  SHA256:
3
- metadata.gz: b3f00019546f05d47fd5d66fa4b172be1b4e1201f75cd48c397b6a71c9b6c733
4
- data.tar.gz: 87ea74a718f602a4cf584fec2799653344b2bcddd90c13dc1deb613db1cf2fc7
3
+ metadata.gz: 07d8184d8d4496efed5f56797d1bccf9a2bf4495ffc847f93615c754d03227cf
4
+ data.tar.gz: f66da575c19fdea4691e0ef8509eed1d50cdcd048deb4a293530c16fb4149fd9
5
5
  SHA512:
6
- metadata.gz: 56d2c4dc4262c8002a067b6acf1e1680a7cc2fba7485660e9e1cb819706288a3a0763293d9487646ce6eabeb7abbbf787c6e76295a16a345a7d4a873ee688309
7
- data.tar.gz: 1279e39af9a99ecdf8eec9cbbfd3c49e88114bda330f17ff7e2c5c66d46c9a3f90350083a8d29cbb60c7bc47ca929166c5a3f05553e095b402e12bb8334cf5c0
6
+ metadata.gz: 0b2244cf5dd99f900160a5487ed2361051d40a4797e41ec64518356475d4f3120410408a26ce057a01d4d8f9a3c98fd7e9cf3a37f92ef126497d11d026f797a1
7
+ data.tar.gz: 026bfaa5ef3a32054e0cb98304d7207c1c0514890fbb29f80cdf9f565cb3917cf752e9a5a550cbcd25c6625450d63f89356fc439de69d99a5233f9f2b14755c7
@@ -13,9 +13,13 @@ require 'athena_health/endpoints/insurance_packages'
13
13
  require 'athena_health/endpoints/encounters'
14
14
  require 'athena_health/endpoints/configurations'
15
15
  require 'athena_health/endpoints/subscriptions'
16
+ require 'athena_health/endpoints/claims'
17
+ require 'athena_health/endpoints/custom_fields'
16
18
  require 'athena_health/client'
17
19
  require 'athena_health/base_collection'
18
20
  require 'athena_health/base_model'
21
+ require 'athena_health/custom_field'
22
+ require 'athena_health/custom_field_data'
19
23
  require 'athena_health/practice'
20
24
  require 'athena_health/practice_collection'
21
25
  require 'athena_health/department'
@@ -75,6 +79,8 @@ require 'athena_health/user_medication_sig'
75
79
  require 'athena_health/user_medication'
76
80
  require 'athena_health/user_medication_collection'
77
81
  require 'athena_health/subscription'
82
+ require 'athena_health/claim/claim'
83
+ require 'athena_health/claim/claim_collection'
78
84
 
79
85
  module AthenaHealth
80
86
  end
@@ -0,0 +1,30 @@
1
+ # frozen_string_literal: true
2
+
3
+ require 'athena_health/claim/diagnosis'
4
+ require 'athena_health/claim/payer'
5
+ require 'athena_health/claim/procedure'
6
+ module AthenaHealth
7
+ module Claim
8
+ class Claim < BaseModel
9
+ attribute :diagnoses, Array[Diagnosis]
10
+ attribute :primaryinsurancepayer, Payer
11
+ attribute :patientpayer, Payer
12
+ attribute :claimcreatedate, String
13
+ attribute :billedproviderid, Integer
14
+ attribute :billedservicedate, String
15
+ attribute :appointmentid, Integer
16
+ attribute :patientid, Integer
17
+ attribute :departmentid, Integer
18
+ attribute :customfields, Array[CustomFieldData]
19
+ attribute :reserved19, String
20
+ attribute :referringproviderid, Integer
21
+ attribute :procedures, Array[Procedure]
22
+ attribute :referralauthid, Integer
23
+ attribute :secondaryinsurancepayer, Payer
24
+ attribute :chargeamount, String
25
+ attribute :transactiondetails, Hash
26
+ attribute :claimid, Integer
27
+ attribute :transactionid, Integer
28
+ end
29
+ end
30
+ end
@@ -0,0 +1,9 @@
1
+ # frozen_string_literal: true
2
+
3
+ module AthenaHealth
4
+ module Claim
5
+ class ClaimCollection < BaseCollection
6
+ attribute :claims, Array[Claim]
7
+ end
8
+ end
9
+ end
@@ -0,0 +1,14 @@
1
+ # frozen_string_literal: true
2
+
3
+ module AthenaHealth
4
+ module Claim
5
+ class Diagnosis < BaseModel
6
+ attribute :diagnosisid, Integer
7
+ attribute :diagnosiscategory, String
8
+ attribute :diagnosisrawcode, String
9
+ attribute :diagnosiscodeset, String
10
+ attribute :diagnosisdescription, String
11
+ attribute :deleteddiagnosis, Boolean
12
+ end
13
+ end
14
+ end
@@ -0,0 +1,17 @@
1
+ # frozen_string_literal: true
2
+
3
+ module AthenaHealth
4
+ module Claim
5
+ class Payer < BaseModel
6
+ attribute :patientinsuranceid, Integer
7
+ attribute :status, String
8
+ attribute :chargeamount, String
9
+ attribute :note, String
10
+
11
+ def initialize(args)
12
+ self.patientinsuranceid = args['primarypatientinsuranceid'] || args['secondarypatientinsuranceid']
13
+ super(args)
14
+ end
15
+ end
16
+ end
17
+ end
@@ -0,0 +1,16 @@
1
+ # frozen_string_literal: true
2
+
3
+ module AthenaHealth
4
+ module Claim
5
+ class Procedure < BaseModel
6
+ attribute :transactionid, Integer
7
+ attribute :allowableamount, String
8
+ attribute :procedurecategory, String
9
+ attribute :allowablemin, String
10
+ attribute :proceduredescription, String
11
+ attribute :chargeamount, String
12
+ attribute :procedurecode, String
13
+ attribute :allowablemax, String
14
+ end
15
+ end
16
+ end
@@ -18,5 +18,7 @@ module AthenaHealth
18
18
  include Endpoints::Encounters
19
19
  include Endpoints::Configurations
20
20
  include Endpoints::Subscriptions
21
+ include Endpoints::Claims
22
+ include Endpoints::CustomFields
21
23
  end
22
24
  end
@@ -0,0 +1,17 @@
1
+ # frozen_string_literal: true
2
+
3
+ module AthenaHealth
4
+ class CustomField < BaseModel
5
+ attribute :ordering, String
6
+ attribute :name, String
7
+ attribute :length, String
8
+ attribute :type, String
9
+ attribute :disallowupdateyn, Boolean
10
+ attribute :casesensitiveyn, Boolean
11
+ attribute :searchableyn, Boolean
12
+ attribute :selectyn, Boolean
13
+
14
+ attribute :customfieldid, Integer
15
+ attribute :selectlist, Array[Hash]
16
+ end
17
+ end
@@ -0,0 +1,7 @@
1
+ module AthenaHealth
2
+ class CustomFieldData < BaseModel
3
+ attribute :customfieldvalue, String
4
+ attribute :customfieldid, Integer
5
+ attribute :optionid, Integer
6
+ end
7
+ end
@@ -0,0 +1,17 @@
1
+ # frozen_string_literal: true
2
+
3
+ module AthenaHealth
4
+ module Endpoints
5
+ module Claims
6
+ def find_claim(practice_id:, claim_id:, params: {})
7
+ response = @api.call(
8
+ endpoint: "#{practice_id}/claims/#{claim_id}",
9
+ method: :get,
10
+ params: params
11
+ )
12
+
13
+ Claim::Claim.new(response)
14
+ end
15
+ end
16
+ end
17
+ end
@@ -0,0 +1,16 @@
1
+ # frozen_string_literal: true
2
+
3
+ module AthenaHealth
4
+ module Endpoints
5
+ module CustomFields
6
+ def all_custom_fields(practice_id:, params: {})
7
+ response = @api.call(
8
+ endpoint: "#{practice_id}/customfields",
9
+ method: :get,
10
+ params: params
11
+ )
12
+ response.map { |field| CustomField.new(field) }
13
+ end
14
+ end
15
+ end
16
+ end
@@ -51,6 +51,12 @@ module AthenaHealth
51
51
  path: 'prescriptions',
52
52
  name: 'prescription',
53
53
  plural_name: 'prescriptions'
54
+ },
55
+ {
56
+ collection_class: 'Claim::ClaimCollection',
57
+ path: 'claims',
58
+ name: 'claim',
59
+ plural_name: 'claims'
54
60
  }
55
61
  ].freeze
56
62
 
@@ -1,3 +1,3 @@
1
1
  module AthenaHealth
2
- VERSION = '1.0.50'.freeze
2
+ VERSION = '1.0.51'.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.50
4
+ version: 1.0.51
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: 2020-03-16 00:00:00.000000000 Z
11
+ date: 2020-03-17 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: typhoeus
@@ -124,8 +124,15 @@ files:
124
124
  - lib/athena_health/balance.rb
125
125
  - lib/athena_health/base_collection.rb
126
126
  - lib/athena_health/base_model.rb
127
+ - lib/athena_health/claim/claim.rb
128
+ - lib/athena_health/claim/claim_collection.rb
129
+ - lib/athena_health/claim/diagnosis.rb
130
+ - lib/athena_health/claim/payer.rb
131
+ - lib/athena_health/claim/procedure.rb
127
132
  - lib/athena_health/client.rb
128
133
  - lib/athena_health/connection.rb
134
+ - lib/athena_health/custom_field.rb
135
+ - lib/athena_health/custom_field_data.rb
129
136
  - lib/athena_health/department.rb
130
137
  - lib/athena_health/department_collection.rb
131
138
  - lib/athena_health/document.rb
@@ -134,7 +141,9 @@ files:
134
141
  - lib/athena_health/encounter_collection.rb
135
142
  - lib/athena_health/encounter_summary.rb
136
143
  - lib/athena_health/endpoints/appointments.rb
144
+ - lib/athena_health/endpoints/claims.rb
137
145
  - lib/athena_health/endpoints/configurations.rb
146
+ - lib/athena_health/endpoints/custom_fields.rb
138
147
  - lib/athena_health/endpoints/departments.rb
139
148
  - lib/athena_health/endpoints/encounters.rb
140
149
  - lib/athena_health/endpoints/insurance_packages.rb
@@ -204,7 +213,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
204
213
  - !ruby/object:Gem::Version
205
214
  version: '0'
206
215
  requirements: []
207
- rubygems_version: 3.1.2
216
+ rubygems_version: 3.0.3
208
217
  signing_key:
209
218
  specification_version: 4
210
219
  summary: Ruby wrapper for Athenahealth API.