daisybill_api 0.1.4 → 0.1.5
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Rakefile +6 -6
- data/lib/daisybill_api.rb +5 -5
- data/lib/daisybill_api/configuration.rb +3 -3
- data/lib/daisybill_api/data.rb +2 -2
- data/lib/daisybill_api/data/client.rb +18 -12
- data/lib/daisybill_api/data/url.rb +2 -2
- data/lib/daisybill_api/ext.rb +5 -5
- data/lib/daisybill_api/ext/associations.rb +1 -0
- data/lib/daisybill_api/ext/attributes.rb +2 -2
- data/lib/daisybill_api/ext/attributes/type_castings.rb +10 -4
- data/lib/daisybill_api/ext/crud.rb +12 -11
- data/lib/daisybill_api/ext/crud/create.rb +2 -2
- data/lib/daisybill_api/ext/crud/update.rb +1 -1
- data/lib/daisybill_api/ext/crud/write_off.rb +11 -0
- data/lib/daisybill_api/ext/links.rb +3 -3
- data/lib/daisybill_api/ext/links/link.rb +2 -2
- data/lib/daisybill_api/models.rb +31 -26
- data/lib/daisybill_api/models/attachment.rb +3 -2
- data/lib/daisybill_api/models/base.rb +1 -1
- data/lib/daisybill_api/models/bill.rb +23 -10
- data/lib/daisybill_api/models/bill_mailing_address.rb +16 -0
- data/lib/daisybill_api/models/bill_payment.rb +6 -5
- data/lib/daisybill_api/models/bill_submission.rb +2 -2
- data/lib/daisybill_api/models/billing_provider.rb +10 -10
- data/lib/daisybill_api/models/claim_adjustment_reason.rb +11 -0
- data/lib/daisybill_api/models/claims_administrator.rb +2 -1
- data/lib/daisybill_api/models/contact.rb +19 -11
- data/lib/daisybill_api/models/error_report.rb +30 -0
- data/lib/daisybill_api/models/injury.rb +1 -0
- data/lib/daisybill_api/models/paper_eor.rb +6 -3
- data/lib/daisybill_api/models/patient.rb +4 -3
- data/lib/daisybill_api/models/payer.rb +3 -1
- data/lib/daisybill_api/models/pharmacy_bill.rb +20 -8
- data/lib/daisybill_api/models/place_of_service.rb +4 -3
- data/lib/daisybill_api/models/prescribing_provider.rb +2 -2
- data/lib/daisybill_api/models/referring_provider.rb +2 -2
- data/lib/daisybill_api/models/remittance.rb +3 -3
- data/lib/daisybill_api/models/rendering_provider.rb +2 -2
- data/lib/daisybill_api/models/request_for_second_review.rb +3 -3
- data/lib/daisybill_api/models/service_line_item_payment.rb +14 -0
- data/lib/daisybill_api/models/task.rb +26 -0
- data/lib/daisybill_api/models/user.rb +16 -0
- data/lib/daisybill_api/version.rb +1 -1
- data/spec/daisybill_api/configuration_spec.rb +3 -3
- data/spec/daisybill_api/data/client_spec.rb +44 -38
- data/spec/daisybill_api/data/rest_client/payload_spec.rb +6 -6
- data/spec/daisybill_api/data/url_spec.rb +6 -6
- data/spec/daisybill_api/ext/attributes/attribute_spec.rb +32 -32
- data/spec/daisybill_api/ext/attributes/type_castings_spec.rb +22 -18
- data/spec/daisybill_api/ext/links/link_spec.rb +15 -15
- data/spec/daisybill_api/ext/pageable_collection_spec.rb +1 -1
- data/spec/daisybill_api/models/address_spec.rb +1 -1
- data/spec/daisybill_api/models/attachment_spec.rb +3 -3
- data/spec/daisybill_api/models/bill_mailing_address_spec.rb +6 -0
- data/spec/daisybill_api/models/bill_payment_spec.rb +5 -3
- data/spec/daisybill_api/models/bill_spec.rb +6 -4
- data/spec/daisybill_api/models/bill_submission_spec.rb +2 -2
- data/spec/daisybill_api/models/billing_provider_spec.rb +2 -2
- data/spec/daisybill_api/models/claim_number_verification_spec.rb +1 -1
- data/spec/daisybill_api/models/claims_administrator_spec.rb +3 -2
- data/spec/daisybill_api/models/contact_spec.rb +29 -3
- data/spec/daisybill_api/models/disputed_service_spec.rb +1 -1
- data/spec/daisybill_api/models/employer_spec.rb +1 -1
- data/spec/daisybill_api/models/error_report_spec.rb +10 -0
- data/spec/daisybill_api/models/injury_spec.rb +2 -1
- data/spec/daisybill_api/models/paper_eor_spec.rb +4 -3
- data/spec/daisybill_api/models/patient_spec.rb +4 -4
- data/spec/daisybill_api/models/payer_spec.rb +3 -2
- data/spec/daisybill_api/models/{pharamcy_bill_spec.rb → pharmacy_bill_spec.rb} +7 -6
- data/spec/daisybill_api/models/place_of_service_spec.rb +5 -5
- data/spec/daisybill_api/models/prescribing_provider_spec.rb +2 -2
- data/spec/daisybill_api/models/referring_provider_spec.rb +2 -2
- data/spec/daisybill_api/models/remittance_spec.rb +2 -2
- data/spec/daisybill_api/models/rendering_provider_spec.rb +2 -2
- data/spec/daisybill_api/models/request_for_second_review_spec.rb +2 -2
- data/spec/daisybill_api/models/service_line_item_payment_spec.rb +6 -0
- data/spec/daisybill_api/models/service_line_item_spec.rb +1 -1
- data/spec/daisybill_api/models/task_spec.rb +19 -0
- data/spec/daisybill_api/models/user_spec.rb +14 -0
- data/spec/daisybill_api_spec.rb +10 -10
- metadata +21 -4
@@ -2,7 +2,7 @@ module DaisybillApi
|
|
2
2
|
module Models
|
3
3
|
class Attachment < DaisybillApi::Models::Base
|
4
4
|
rest_actions :index, :create, :update, :show, :destroy
|
5
|
-
path_prefix
|
5
|
+
path_prefix "/bills", :bill_id
|
6
6
|
|
7
7
|
attributes(
|
8
8
|
id: :integer,
|
@@ -10,6 +10,7 @@ module DaisybillApi
|
|
10
10
|
inactive: :boolean,
|
11
11
|
review_status: :string,
|
12
12
|
review_errors: [:string],
|
13
|
+
review_warnings: [:string],
|
13
14
|
document_file_name: :string,
|
14
15
|
document_content_type: :string,
|
15
16
|
document_file_size: :integer,
|
@@ -21,7 +22,7 @@ module DaisybillApi
|
|
21
22
|
document: :attachment
|
22
23
|
)
|
23
24
|
|
24
|
-
link :bill, class:
|
25
|
+
link :bill, class: "Bill"
|
25
26
|
end
|
26
27
|
end
|
27
28
|
end
|
@@ -1,8 +1,8 @@
|
|
1
1
|
module DaisybillApi
|
2
2
|
module Models
|
3
3
|
class Bill < DaisybillApi::Models::Base
|
4
|
-
path_prefix
|
5
|
-
rest_actions :index, :show, :create, :update, :destroy
|
4
|
+
path_prefix "/injuries", :injury_id
|
5
|
+
rest_actions :index, :show, :create, :update, :destroy, :write_off
|
6
6
|
|
7
7
|
attributes(
|
8
8
|
id: :integer,
|
@@ -14,6 +14,7 @@ module DaisybillApi
|
|
14
14
|
write_off_cents: :integer,
|
15
15
|
review_status: :string,
|
16
16
|
review_errors: [:string],
|
17
|
+
review_warnings: [:string],
|
17
18
|
readonly: true,
|
18
19
|
)
|
19
20
|
|
@@ -28,15 +29,27 @@ module DaisybillApi
|
|
28
29
|
service_line_items: [DaisybillApi::Models::ServiceLineItem]
|
29
30
|
)
|
30
31
|
|
31
|
-
link :injury, class:
|
32
|
-
link :place_of_service, class:
|
33
|
-
link :rendering_provider, class:
|
34
|
-
link :referring_provider, class:
|
35
|
-
link :supervising_provider, class:
|
32
|
+
link :injury, class: "Injury"
|
33
|
+
link :place_of_service, class: "PlaceOfService"
|
34
|
+
link :rendering_provider, class: "RenderingProvider"
|
35
|
+
link :referring_provider, class: "ReferringProvider"
|
36
|
+
link :supervising_provider, class: "RenderingProvider"
|
36
37
|
|
37
|
-
has_many :attachments, class:
|
38
|
-
has_many :bill_payments, class:
|
39
|
-
has_many :bill_submissions, class:
|
38
|
+
has_many :attachments, class: "Attachment"
|
39
|
+
has_many :bill_payments, class: "BillPayment"
|
40
|
+
has_many :bill_submissions, class: "BillSubmission"
|
41
|
+
has_many :error_reports, class: "ErrorReport"
|
42
|
+
has_many :tasks, class: "Task"
|
43
|
+
|
44
|
+
def write_off
|
45
|
+
@written_off = send_data :post, write_off_path
|
46
|
+
end
|
47
|
+
|
48
|
+
private
|
49
|
+
|
50
|
+
def write_off_path
|
51
|
+
"#{show_path}/write_off"
|
52
|
+
end
|
40
53
|
end
|
41
54
|
end
|
42
55
|
end
|
@@ -0,0 +1,16 @@
|
|
1
|
+
module DaisybillApi
|
2
|
+
module Models
|
3
|
+
class BillMailingAddress < DaisybillApi::Models::Base
|
4
|
+
rest_actions :index
|
5
|
+
|
6
|
+
attributes(
|
7
|
+
name: :string,
|
8
|
+
submission_type: :string,
|
9
|
+
company: :string,
|
10
|
+
bill_treatment_types: [:string],
|
11
|
+
address: DaisybillApi::Models::Address,
|
12
|
+
readonly: true
|
13
|
+
)
|
14
|
+
end
|
15
|
+
end
|
16
|
+
end
|
@@ -1,8 +1,8 @@
|
|
1
1
|
module DaisybillApi
|
2
2
|
module Models
|
3
3
|
class BillPayment < DaisybillApi::Models::Base
|
4
|
-
rest_actions :index
|
5
|
-
path_prefix
|
4
|
+
rest_actions :index, :show
|
5
|
+
path_prefix "/bills", :bill_id
|
6
6
|
|
7
7
|
attributes(
|
8
8
|
id: :integer,
|
@@ -10,6 +10,8 @@ module DaisybillApi
|
|
10
10
|
check_number: :string,
|
11
11
|
check_effective_date: :date,
|
12
12
|
payment_source: :string,
|
13
|
+
claim_adjustment_reasons: [DaisybillApi::Models::ClaimAdjustmentReason],
|
14
|
+
service_line_item_payments: [DaisybillApi::Models::ServiceLineItemPayment],
|
13
15
|
readonly: true
|
14
16
|
)
|
15
17
|
|
@@ -19,9 +21,8 @@ module DaisybillApi
|
|
19
21
|
payment_amount_cents: :integer
|
20
22
|
)
|
21
23
|
|
22
|
-
link :bill_submission, class:
|
23
|
-
link :bill, class:
|
24
|
+
link :bill_submission, class: "BillSubmission"
|
25
|
+
link :bill, class: "Bill"
|
24
26
|
end
|
25
27
|
end
|
26
28
|
end
|
27
|
-
|
@@ -2,7 +2,7 @@ module DaisybillApi
|
|
2
2
|
module Models
|
3
3
|
class BillSubmission < DaisybillApi::Models::Base
|
4
4
|
rest_actions :index, :show, :create
|
5
|
-
path_prefix
|
5
|
+
path_prefix "/bills", :bill_id
|
6
6
|
|
7
7
|
attributes(
|
8
8
|
comment: :string,
|
@@ -17,7 +17,7 @@ module DaisybillApi
|
|
17
17
|
readonly: true
|
18
18
|
)
|
19
19
|
|
20
|
-
link :bill, class:
|
20
|
+
link :bill, class: "Bill"
|
21
21
|
end
|
22
22
|
end
|
23
23
|
end
|
@@ -16,16 +16,16 @@ module DaisybillApi
|
|
16
16
|
readonly: true
|
17
17
|
)
|
18
18
|
|
19
|
-
has_many :patients, class:
|
20
|
-
has_many :rendering_providers, class:
|
21
|
-
has_many :referring_providers, class:
|
22
|
-
has_many :prescribing_providers, class:
|
23
|
-
has_many :places_of_service, class:
|
24
|
-
has_many :remittances, class:
|
25
|
-
has_many :attachments, class:
|
26
|
-
has_many :bills, class:
|
27
|
-
has_many :pharmacy_bills, class:
|
28
|
-
has_many :injuries, class:
|
19
|
+
has_many :patients, class: "Patient"
|
20
|
+
has_many :rendering_providers, class: "RenderingProvider"
|
21
|
+
has_many :referring_providers, class: "ReferringProvider"
|
22
|
+
has_many :prescribing_providers, class: "PrescribingProvider"
|
23
|
+
has_many :places_of_service, class: "PlaceOfService"
|
24
|
+
has_many :remittances, class: "Remittance"
|
25
|
+
has_many :attachments, class: "Attachment", set_path: true, collection_key: "billing_provider_attachments"
|
26
|
+
has_many :bills, class: "Bill", set_path: true
|
27
|
+
has_many :pharmacy_bills, class: "PharmacyBill", set_path: true
|
28
|
+
has_many :injuries, class: "Injury", set_path: true
|
29
29
|
end
|
30
30
|
end
|
31
31
|
end
|
@@ -1,19 +1,27 @@
|
|
1
1
|
module DaisybillApi
|
2
2
|
module Models
|
3
|
-
class Contact
|
4
|
-
|
3
|
+
class Contact < DaisybillApi::Models::Base
|
4
|
+
path_prefix "/injuries", :injury_id
|
5
|
+
rest_actions :index, :show, :create, :update
|
5
6
|
|
6
7
|
attributes(
|
7
|
-
id:
|
8
|
-
|
9
|
-
|
10
|
-
company: :string,
|
11
|
-
role: :string,
|
12
|
-
telephone: :string,
|
13
|
-
email: :string,
|
14
|
-
fax: :string,
|
15
|
-
address: DaisybillApi::Models::Address
|
8
|
+
id: :integer,
|
9
|
+
role: :string,
|
10
|
+
readonly: true
|
16
11
|
)
|
12
|
+
|
13
|
+
attributes(
|
14
|
+
first_name: :string,
|
15
|
+
last_name: :string,
|
16
|
+
company: :string,
|
17
|
+
telephone: :string,
|
18
|
+
email: :string,
|
19
|
+
fax: :string,
|
20
|
+
type: :string,
|
21
|
+
address: DaisybillApi::Models::Address
|
22
|
+
)
|
23
|
+
|
24
|
+
link :injury, class: "Injury"
|
17
25
|
end
|
18
26
|
end
|
19
27
|
end
|
@@ -0,0 +1,30 @@
|
|
1
|
+
module DaisybillApi
|
2
|
+
module Models
|
3
|
+
class ErrorReport < DaisybillApi::Models::Base
|
4
|
+
path_prefix "/bills", :bill_id
|
5
|
+
rest_actions :index, :show, :create
|
6
|
+
|
7
|
+
attributes(
|
8
|
+
id: :integer,
|
9
|
+
error_type: :string,
|
10
|
+
comment: :string,
|
11
|
+
name: :string,
|
12
|
+
telephone: :string,
|
13
|
+
role: :string,
|
14
|
+
call_reference_number: :string,
|
15
|
+
readonly: true
|
16
|
+
)
|
17
|
+
|
18
|
+
attributes(
|
19
|
+
error_type: :string,
|
20
|
+
comment: :string,
|
21
|
+
name: :string,
|
22
|
+
telephone: :string,
|
23
|
+
role: :string,
|
24
|
+
call_reference_number: :string,
|
25
|
+
)
|
26
|
+
|
27
|
+
link :bill, class: "Bill"
|
28
|
+
end
|
29
|
+
end
|
30
|
+
end
|
@@ -1,12 +1,15 @@
|
|
1
1
|
module DaisybillApi
|
2
2
|
module Models
|
3
3
|
class PaperEor < DaisybillApi::Models::Base
|
4
|
-
path_prefix
|
4
|
+
path_prefix "/remittances", :remittance_id
|
5
5
|
rest_actions :index
|
6
6
|
|
7
|
-
attributes id: :integer,
|
7
|
+
attributes id: :integer,
|
8
|
+
review_errors: [:string],
|
9
|
+
review_warnings: [:string],
|
10
|
+
readonly: true
|
8
11
|
|
9
|
-
link :remittance, class:
|
12
|
+
link :remittance, class: "Remittance"
|
10
13
|
end
|
11
14
|
end
|
12
15
|
end
|
@@ -1,13 +1,14 @@
|
|
1
1
|
module DaisybillApi
|
2
2
|
module Models
|
3
3
|
class Patient < DaisybillApi::Models::Base
|
4
|
-
path_prefix
|
4
|
+
path_prefix "/billing_providers", :billing_provider_id
|
5
5
|
rest_actions :index, :show, :create, :update, :destroy, :search
|
6
6
|
|
7
7
|
attributes(
|
8
8
|
id: :integer,
|
9
9
|
review_status: :string,
|
10
10
|
review_errors: [:string],
|
11
|
+
review_warnings: [:string],
|
11
12
|
readonly: true
|
12
13
|
)
|
13
14
|
attributes(
|
@@ -23,9 +24,9 @@ module DaisybillApi
|
|
23
24
|
address: DaisybillApi::Models::Address
|
24
25
|
)
|
25
26
|
|
26
|
-
has_many :injuries, class:
|
27
|
+
has_many :injuries, class: "Injury"
|
27
28
|
|
28
|
-
link :billing_provider, class:
|
29
|
+
link :billing_provider, class: "BillingProvider"
|
29
30
|
end
|
30
31
|
end
|
31
32
|
end
|
@@ -1,7 +1,7 @@
|
|
1
1
|
module DaisybillApi
|
2
2
|
module Models
|
3
3
|
class Payer < DaisybillApi::Models::Base
|
4
|
-
path_prefix
|
4
|
+
path_prefix "/claims_administrators", :claims_administrator_id
|
5
5
|
rest_actions :index, :show
|
6
6
|
|
7
7
|
attributes(
|
@@ -11,6 +11,8 @@ module DaisybillApi
|
|
11
11
|
main: :boolean,
|
12
12
|
readonly: true
|
13
13
|
)
|
14
|
+
|
15
|
+
has_many :bill_mailing_addresses, class: "BillMailingAddress", set_path: true
|
14
16
|
end
|
15
17
|
end
|
16
18
|
end
|
@@ -1,8 +1,8 @@
|
|
1
1
|
module DaisybillApi
|
2
2
|
module Models
|
3
3
|
class PharmacyBill < DaisybillApi::Models::Base
|
4
|
-
path_prefix
|
5
|
-
rest_actions :index, :show, :create, :update, :destroy
|
4
|
+
path_prefix "/injuries", :injury_id
|
5
|
+
rest_actions :index, :show, :create, :update, :destroy, :write_off
|
6
6
|
|
7
7
|
attributes(
|
8
8
|
id: :integer,
|
@@ -13,6 +13,7 @@ module DaisybillApi
|
|
13
13
|
balance_due_cents: :integer,
|
14
14
|
review_status: :string,
|
15
15
|
review_errors: [:string],
|
16
|
+
review_warnings: [:string],
|
16
17
|
readonly: true
|
17
18
|
)
|
18
19
|
|
@@ -27,19 +28,30 @@ module DaisybillApi
|
|
27
28
|
unit_of_measurement: :string,
|
28
29
|
authorization_number: :string,
|
29
30
|
compound_name: :string,
|
31
|
+
practice_bill_id: :string,
|
30
32
|
dosage_form: :integer,
|
31
33
|
route_of_administration: :integer,
|
32
34
|
number_of_containers: :integer,
|
33
35
|
service_line_items: [DaisybillApi::Models::ServiceLineItem]
|
34
36
|
)
|
35
37
|
|
36
|
-
link :injury, class:
|
37
|
-
link :place_of_service, class:
|
38
|
-
link :prescribing_provider, class:
|
38
|
+
link :injury, class: "Injury"
|
39
|
+
link :place_of_service, class: "PlaceOfService"
|
40
|
+
link :prescribing_provider, class: "PrescribingProvider"
|
39
41
|
|
40
|
-
has_many :attachments,
|
41
|
-
has_many :bill_payments,
|
42
|
-
has_many :bill_submissions, class:
|
42
|
+
has_many :attachments, class: "Attachment", set_path: true, use_path_prefix: true
|
43
|
+
has_many :bill_payments, class: "BillPayment", set_path: true, use_path_prefix: true
|
44
|
+
has_many :bill_submissions, class: "BillSubmission", set_path: true, use_path_prefix: true
|
45
|
+
|
46
|
+
def write_off
|
47
|
+
@written_off = send_data :post, write_off_path
|
48
|
+
end
|
49
|
+
|
50
|
+
private
|
51
|
+
|
52
|
+
def write_off_path
|
53
|
+
"#{show_path}/write_off"
|
54
|
+
end
|
43
55
|
end
|
44
56
|
end
|
45
57
|
end
|
@@ -2,10 +2,10 @@ module DaisybillApi
|
|
2
2
|
module Models
|
3
3
|
class PlaceOfService < DaisybillApi::Models::Base
|
4
4
|
def self.plural_key
|
5
|
-
|
5
|
+
"places_of_service"
|
6
6
|
end
|
7
7
|
|
8
|
-
path_prefix
|
8
|
+
path_prefix "/billing_providers", :billing_provider_id
|
9
9
|
rest_actions :index, :show, :create, :update
|
10
10
|
|
11
11
|
attribute :id, :integer, readonly: true
|
@@ -18,11 +18,12 @@ module DaisybillApi
|
|
18
18
|
active: :boolean,
|
19
19
|
authorization_telephone_number: :string,
|
20
20
|
authorization_fax_number: :string,
|
21
|
+
telephone: :string,
|
21
22
|
place_of_service_type_code: :string,
|
22
23
|
address: DaisybillApi::Models::Address
|
23
24
|
)
|
24
25
|
|
25
|
-
link :billing_provider, class:
|
26
|
+
link :billing_provider, class: "BillingProvider"
|
26
27
|
end
|
27
28
|
end
|
28
29
|
end
|
@@ -1,7 +1,7 @@
|
|
1
1
|
module DaisybillApi
|
2
2
|
module Models
|
3
3
|
class PrescribingProvider < DaisybillApi::Models::Base
|
4
|
-
path_prefix
|
4
|
+
path_prefix "/billing_providers", :billing_provider_id
|
5
5
|
rest_actions :index, :show, :create, :update
|
6
6
|
|
7
7
|
attribute :id, :integer, readonly: true
|
@@ -14,7 +14,7 @@ module DaisybillApi
|
|
14
14
|
address: DaisybillApi::Models::Address
|
15
15
|
)
|
16
16
|
|
17
|
-
link :billing_provider, class:
|
17
|
+
link :billing_provider, class: "BillingProvider"
|
18
18
|
end
|
19
19
|
end
|
20
20
|
end
|