daisybill_api 0.1.1 → 0.1.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: fa9c4d79f2f00d0fa216114a6e0ee81be518436d
|
4
|
+
data.tar.gz: d90cb756da021ff6806456e04a847843cb947bc3
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 70def2004f7600e702e096a9a03d9f1f352175539ff5d2eb0add226e123959566698ffe6ba510c4b38a5162a223c816448dc0f6ac2e763728a0cc68463b10288
|
7
|
+
data.tar.gz: a2bb524e11a3340c290a64cb00a0ae24df9408267e4363ef262704c272d46c3cb01f58d5ee808b1b411519a08e48444b86acf3e2f4d4b8240d00be5c0b899f76
|
@@ -5,7 +5,7 @@ module DaisybillApi
|
|
5
5
|
# @private
|
6
6
|
module Data
|
7
7
|
class Client
|
8
|
-
class BasicError <
|
8
|
+
class BasicError < StandardError; end
|
9
9
|
class InternalServerError < BasicError; end
|
10
10
|
class UnauthorizedError < BasicError; end
|
11
11
|
class InvalidParams < BasicError; end
|
@@ -1,12 +1,13 @@
|
|
1
1
|
module DaisybillApi
|
2
2
|
module Models
|
3
3
|
class Injury < DaisybillApi::Models::Base
|
4
|
-
path_prefix
|
4
|
+
path_prefix "/patients", :patient_id
|
5
5
|
rest_actions :index, :show, :create, :update, :destroy
|
6
6
|
|
7
7
|
attributes(
|
8
8
|
id: :integer,
|
9
9
|
claims_administrator: DaisybillApi::Models::ClaimsAdministrator,
|
10
|
+
payer: DaisybillApi::Models::Payer,
|
10
11
|
review_status: :string,
|
11
12
|
review_errors: [:string],
|
12
13
|
diagnosis_codes: [:string],
|
@@ -20,11 +21,12 @@ module DaisybillApi
|
|
20
21
|
start_date: :date,
|
21
22
|
end_date: :date,
|
22
23
|
claims_administrator_id: :integer, #TODO: think how to connect it with claims_administrator attribute
|
24
|
+
payer_id: :integer,
|
23
25
|
employer: DaisybillApi::Models::Employer
|
24
26
|
)
|
25
27
|
|
26
|
-
link :patient, class:
|
27
|
-
has_many :bills, class:
|
28
|
+
link :patient, class: "Patient"
|
29
|
+
has_many :bills, class: "Bill"
|
28
30
|
end
|
29
31
|
end
|
30
32
|
end
|
@@ -1,13 +1,46 @@
|
|
1
|
-
require
|
1
|
+
require "spec_helper"
|
2
2
|
|
3
3
|
describe DaisybillApi::Models::Injury do
|
4
|
-
|
5
|
-
:
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
:
|
10
|
-
|
4
|
+
EXT_ATTRIBUTES = [
|
5
|
+
:id,
|
6
|
+
:adj_number,
|
7
|
+
:claim_number,
|
8
|
+
:claims_administrator_id,
|
9
|
+
:created_at,
|
10
|
+
:description,
|
11
|
+
:end_date,
|
12
|
+
:patient_id,
|
13
|
+
:payer_id,
|
14
|
+
:review_status,
|
15
|
+
:start_date,
|
16
|
+
:updated_at,
|
17
|
+
].freeze
|
18
|
+
|
19
|
+
EXT_ATTRIBUTE_TYPES = {
|
20
|
+
claims_administrator: :model,
|
21
|
+
employer: :model,
|
22
|
+
payer: :model,
|
23
|
+
contacts: :collection,
|
24
|
+
diagnosis_codes: :collection,
|
25
|
+
review_errors: :collection
|
26
|
+
}.freeze
|
27
|
+
|
28
|
+
EXT_SEND_AS_ATTRIBUTES = [
|
29
|
+
:adj_number,
|
30
|
+
:claim_number,
|
31
|
+
:claims_administrator_id,
|
32
|
+
:description,
|
33
|
+
:employer_attributes,
|
34
|
+
:end_date,
|
35
|
+
:patient_id,
|
36
|
+
:payer_id,
|
37
|
+
:start_date
|
38
|
+
].freeze
|
39
|
+
|
40
|
+
it_behaves_like DaisybillApi::Ext::Attributes, *EXT_ATTRIBUTES, EXT_ATTRIBUTE_TYPES
|
41
|
+
it_behaves_like DaisybillApi::Ext::Attributes::SendAs, *EXT_SEND_AS_ATTRIBUTES
|
42
|
+
|
43
|
+
it_behaves_like DaisybillApi::Ext::CRUD, :all, :find, :create, :update, :destroy, "/injuries", patient_id: "/patients"
|
11
44
|
it_behaves_like DaisybillApi::Ext::Associations, :bills
|
12
45
|
it_behaves_like DaisybillApi::Ext::Links, patient: DaisybillApi::Models::Patient
|
13
46
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: daisybill_api
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Ben Liscio
|
@@ -10,20 +10,20 @@ authors:
|
|
10
10
|
autorequire:
|
11
11
|
bindir: bin
|
12
12
|
cert_chain: []
|
13
|
-
date: 2016-
|
13
|
+
date: 2016-10-18 00:00:00.000000000 Z
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
16
16
|
name: activemodel
|
17
17
|
requirement: !ruby/object:Gem::Requirement
|
18
18
|
requirements:
|
19
|
-
- - "
|
19
|
+
- - ">="
|
20
20
|
- !ruby/object:Gem::Version
|
21
21
|
version: '4.2'
|
22
22
|
type: :runtime
|
23
23
|
prerelease: false
|
24
24
|
version_requirements: !ruby/object:Gem::Requirement
|
25
25
|
requirements:
|
26
|
-
- - "
|
26
|
+
- - ">="
|
27
27
|
- !ruby/object:Gem::Version
|
28
28
|
version: '4.2'
|
29
29
|
- !ruby/object:Gem::Dependency
|