daisybill_api 0.1.4 → 0.1.5
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 +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
|
@@ -1,22 +1,24 @@
|
|
|
1
|
-
require
|
|
1
|
+
require "spec_helper"
|
|
2
2
|
|
|
3
3
|
describe DaisybillApi::Ext::Attributes::TypeCastings do
|
|
4
4
|
let(:converter) { described_class }
|
|
5
5
|
|
|
6
|
-
it { expect(converter.convert_to(
|
|
6
|
+
it { expect(converter.convert_to("2015-03-13", :date)).to eq Date.new(2015, 3, 13) }
|
|
7
7
|
it { expect(converter.convert_to(DateTime.new(2015, 3, 3, 12, 27, 13), :date)).to eq Date.new(2015, 3, 3) }
|
|
8
|
-
it { expect(converter.convert_to(
|
|
9
|
-
it { expect(converter.convert_to(
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
8
|
+
it { expect(converter.convert_to("not a date", :date)).to be_nil }
|
|
9
|
+
it { expect(converter.convert_to("", :date)).to be_nil }
|
|
10
|
+
|
|
11
|
+
it "casting of date time" do
|
|
12
|
+
casted = converter.convert_to("2015-03-13T12:27:13.666-08:00", :datetime)
|
|
13
|
+
expect(casted).to eq DateTime.new(2015, 3, 13, 12, 27, 13.666, "-8")
|
|
13
14
|
end
|
|
15
|
+
|
|
14
16
|
it { expect(converter.convert_to(Date.new(2015, 3, 13), :datetime)).to eq DateTime.new(2015, 3, 13) }
|
|
15
|
-
it { expect(converter.convert_to(
|
|
16
|
-
it { expect(converter.convert_to(
|
|
17
|
-
it { expect(converter.convert_to(
|
|
18
|
-
it { expect(converter.convert_to(123, :string)).to eq
|
|
19
|
-
it { expect(converter.convert_to(
|
|
17
|
+
it { expect(converter.convert_to("not a datetime", :datetime)).to be_nil }
|
|
18
|
+
it { expect(converter.convert_to("", :datetime)).to be_nil }
|
|
19
|
+
it { expect(converter.convert_to("123", :integer)).to eq 123 }
|
|
20
|
+
it { expect(converter.convert_to(123, :string)).to eq "123" }
|
|
21
|
+
it { expect(converter.convert_to(" ", :integer)).to be_nil }
|
|
20
22
|
it { expect(converter.convert_to(nil, :integer)).to be_nil }
|
|
21
23
|
it { expect(converter.convert_to(nil, [:integer])).to be_empty }
|
|
22
24
|
it { expect(converter.convert_to(%w(1 2 3), [:integer])).to eq [1, 2, 3] }
|
|
@@ -25,14 +27,15 @@ describe DaisybillApi::Ext::Attributes::TypeCastings do
|
|
|
25
27
|
it { expect(converter.convert_to(nil, :date)).to be_nil }
|
|
26
28
|
it { expect(converter.convert_to(nil, :datetime)).to be_nil }
|
|
27
29
|
it { expect(converter.convert_to({}, DaisybillApi::Models::Address)).to be_a DaisybillApi::Models::Address }
|
|
30
|
+
it { expect(converter.convert_to({ key: :value }, :hash)).to eq({ key: :value }) }
|
|
28
31
|
|
|
29
|
-
context
|
|
32
|
+
context "attachment", vcr: true do
|
|
30
33
|
it { expect(converter.convert_to(nil, :attachment)).to be_nil }
|
|
31
|
-
it { expect(converter.convert_to(
|
|
34
|
+
it { expect(converter.convert_to("http://path.to/attachment", :attachment)).to be_a StringIO }
|
|
32
35
|
it { expect(converter.convert_to(File.open(__FILE__), :attachment)).to be_a File }
|
|
33
36
|
end
|
|
34
37
|
|
|
35
|
-
context
|
|
38
|
+
context "convert collection of hashes to collection of models" do
|
|
36
39
|
let(:clazz) { DaisybillApi::Models::Address }
|
|
37
40
|
subject { converter.convert_to([{}, {}, {}], [clazz]) }
|
|
38
41
|
|
|
@@ -41,10 +44,11 @@ describe DaisybillApi::Ext::Attributes::TypeCastings do
|
|
|
41
44
|
it { is_expected.to all( be_a clazz ) }
|
|
42
45
|
end
|
|
43
46
|
|
|
44
|
-
it
|
|
47
|
+
it "when converting model" do
|
|
45
48
|
clazz = DaisybillApi::Models::Address
|
|
46
49
|
expect(converter.convert_to(clazz.new, clazz)).to be_a clazz
|
|
47
50
|
end
|
|
48
|
-
|
|
49
|
-
it { expect
|
|
51
|
+
|
|
52
|
+
it { expect(converter.convert_to("{}", DaisybillApi::Models::Address)).to be_nil }
|
|
53
|
+
it { expect{ converter.convert_to("some value", :unknown) }.to raise_error }
|
|
50
54
|
end
|
|
@@ -1,49 +1,49 @@
|
|
|
1
|
-
require
|
|
1
|
+
require "spec_helper"
|
|
2
2
|
|
|
3
3
|
describe DaisybillApi::Ext::Links::Link do
|
|
4
|
-
subject { described_class.new :rendering_provider,
|
|
4
|
+
subject { described_class.new :rendering_provider, "DaisybillApi::Models::RenderingProvider" }
|
|
5
5
|
|
|
6
6
|
let(:status) { 200 }
|
|
7
7
|
let(:response) { {} }
|
|
8
8
|
|
|
9
9
|
before do
|
|
10
|
-
subject.href =
|
|
10
|
+
subject.href = "/api/v1/some/url/:id"
|
|
11
11
|
client = doubled_client status, response
|
|
12
12
|
allow(DaisybillApi::Data::Client).to receive(:new).and_return(client)
|
|
13
13
|
end
|
|
14
14
|
|
|
15
15
|
its(:value) { is_expected.to be_a DaisybillApi::Models::RenderingProvider }
|
|
16
|
-
its(:foreign_id) { is_expected.to eq(
|
|
16
|
+
its(:foreign_id) { is_expected.to eq(":id") }
|
|
17
17
|
|
|
18
|
-
it
|
|
18
|
+
it "when href is nil" do
|
|
19
19
|
subject.href = nil
|
|
20
20
|
expect(subject.value).to be_nil
|
|
21
21
|
end
|
|
22
22
|
|
|
23
|
-
it
|
|
24
|
-
expect(DaisybillApi::Data::Client).to receive(:new).with(:get,
|
|
23
|
+
it "must send data to correct url" do
|
|
24
|
+
expect(DaisybillApi::Data::Client).to receive(:new).with(:get, "/some/url/:id", {})
|
|
25
25
|
subject.value
|
|
26
26
|
end
|
|
27
27
|
|
|
28
|
-
context
|
|
28
|
+
context "when link was not found" do
|
|
29
29
|
let(:status) { 404 }
|
|
30
|
-
let(:response) { {
|
|
30
|
+
let(:response) { { "error" => "Record Not Found" } }
|
|
31
31
|
|
|
32
32
|
its(:value) { is_expected.to be nil }
|
|
33
33
|
end
|
|
34
34
|
|
|
35
|
-
context
|
|
35
|
+
context "when was server error" do
|
|
36
36
|
let(:status) { 500 }
|
|
37
|
-
let(:message) {
|
|
38
|
-
let(:response) { {
|
|
37
|
+
let(:message) { "Internal Server Error" }
|
|
38
|
+
let(:response) { { "error" => message } }
|
|
39
39
|
|
|
40
40
|
it { expect{ subject.value }.to raise_error(DaisybillApi::Data::Client::InternalServerError).with_message(message) }
|
|
41
41
|
end
|
|
42
42
|
|
|
43
|
-
context
|
|
43
|
+
context "when was server error" do
|
|
44
44
|
let(:status) { 401 }
|
|
45
|
-
let(:message) {
|
|
46
|
-
let(:response) { {
|
|
45
|
+
let(:message) { "Not Authorized" }
|
|
46
|
+
let(:response) { { "error" => message } }
|
|
47
47
|
|
|
48
48
|
it { expect{ subject.value }.to raise_error(DaisybillApi::Data::Client::UnauthorizedError).with_message(message) }
|
|
49
49
|
end
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
require
|
|
1
|
+
require "spec_helper"
|
|
2
2
|
|
|
3
3
|
describe DaisybillApi::Models::Attachment do
|
|
4
4
|
it_behaves_like DaisybillApi::Ext::Attributes, :id, :document_url, :inactive, :report_type, :document,
|
|
5
5
|
:bill_id, :created_at, :updated_at, :review_status, :document_file_name,
|
|
6
|
-
:document_content_type, :document_file_size, review_errors: :collection
|
|
6
|
+
:document_content_type, :document_file_size, review_errors: :collection, review_warnings: :collection
|
|
7
7
|
|
|
8
8
|
it_behaves_like DaisybillApi::Ext::Attributes::SendAs, :report_type, :document, :bill_id
|
|
9
|
-
it_behaves_like DaisybillApi::Ext::CRUD, :all, :find, :create, :update, :destroy,
|
|
9
|
+
it_behaves_like DaisybillApi::Ext::CRUD, :all, :find, :create, :update, :destroy, "/attachments", bill_id: "/bills"
|
|
10
10
|
it_behaves_like DaisybillApi::Ext::Links, bill: DaisybillApi::Models::Bill
|
|
11
11
|
end
|
|
@@ -1,10 +1,12 @@
|
|
|
1
|
-
require
|
|
1
|
+
require "spec_helper"
|
|
2
2
|
|
|
3
3
|
describe DaisybillApi::Models::BillPayment do
|
|
4
4
|
it_behaves_like DaisybillApi::Ext::Attributes, :id, :payment_amount_cents, :check_amount, :check_number,
|
|
5
5
|
:check_effective_date, :payment_source, :created_at, :updated_at, :bill_id, :bill_submission_id,
|
|
6
|
-
:payer_claim_control_number, service_line_items: :collection
|
|
7
|
-
|
|
6
|
+
:payer_claim_control_number, service_line_items: :collection, claim_adjustment_reasons: :collection,
|
|
7
|
+
service_line_item_payments: :collection
|
|
8
|
+
|
|
9
|
+
it_behaves_like DaisybillApi::Ext::CRUD, :all, :find, "/bill_payments", bill_id: "/bills"
|
|
8
10
|
it_behaves_like DaisybillApi::Ext::Links, bill: DaisybillApi::Models::Bill,
|
|
9
11
|
bill_submission: DaisybillApi::Models::BillSubmission
|
|
10
12
|
end
|
|
@@ -1,17 +1,17 @@
|
|
|
1
|
-
require
|
|
1
|
+
require "spec_helper"
|
|
2
2
|
|
|
3
3
|
describe DaisybillApi::Models::Bill do
|
|
4
4
|
it_behaves_like DaisybillApi::Ext::Attributes, :id, :date_of_service, :authorization_number, :status,
|
|
5
5
|
:admission_date, :practice_bill_id, :additional_information, :charge_cents, :expected_payment_cents,
|
|
6
6
|
:allowed_cents, :balance_due_cents, :write_off_cents, :created_at, :updated_at, :injury_id,
|
|
7
7
|
:place_of_service_id, :rendering_provider_id, :referring_provider_id, :supervising_provider_id,
|
|
8
|
-
:review_status, :diagnosis_type, review_errors: :collection,
|
|
9
|
-
service_line_items: :collection
|
|
8
|
+
:review_status, :diagnosis_type, review_errors: :collection, review_warnings: :collection,
|
|
9
|
+
diagnosis_codes: :collection, service_line_items: :collection
|
|
10
10
|
it_behaves_like DaisybillApi::Ext::Attributes::SendAs, :date_of_service, :place_of_service_id,
|
|
11
11
|
:rendering_provider_id, :referring_provider_id, :supervising_provider_id, :authorization_number,
|
|
12
12
|
:admission_date, :additional_information, :practice_bill_id, :diagnosis_type, :diagnosis_codes,
|
|
13
13
|
:service_line_items_attributes, :injury_id
|
|
14
|
-
it_behaves_like DaisybillApi::Ext::CRUD, :all, :find, :create, :update, :destroy,
|
|
14
|
+
it_behaves_like DaisybillApi::Ext::CRUD, :all, :find, :create, :update, :destroy, :write_off, "/bills", injury_id: "/injuries"
|
|
15
15
|
it_behaves_like DaisybillApi::Ext::Links, injury: DaisybillApi::Models::Injury,
|
|
16
16
|
place_of_service: DaisybillApi::Models::PlaceOfService,
|
|
17
17
|
rendering_provider: DaisybillApi::Models::RenderingProvider,
|
|
@@ -19,4 +19,6 @@ describe DaisybillApi::Models::Bill do
|
|
|
19
19
|
supervising_provider: DaisybillApi::Models::RenderingProvider
|
|
20
20
|
it_behaves_like DaisybillApi::Ext::Associations, :bill_submissions
|
|
21
21
|
it_behaves_like DaisybillApi::Ext::Associations, :attachments
|
|
22
|
+
it_behaves_like DaisybillApi::Ext::Associations, :error_reports
|
|
23
|
+
it_behaves_like DaisybillApi::Ext::Associations, :tasks
|
|
22
24
|
end
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
require
|
|
1
|
+
require "spec_helper"
|
|
2
2
|
|
|
3
3
|
describe DaisybillApi::Models::BillSubmission do
|
|
4
4
|
it_behaves_like DaisybillApi::Ext::Attributes, :id, :type, :mode, :bill_id,
|
|
@@ -6,6 +6,6 @@ describe DaisybillApi::Models::BillSubmission do
|
|
|
6
6
|
|
|
7
7
|
it_behaves_like DaisybillApi::Ext::Attributes::SendAs, :comment, :supporting_document_ids, :bill_id
|
|
8
8
|
|
|
9
|
-
it_behaves_like DaisybillApi::Ext::CRUD, :all, :find, :create,
|
|
9
|
+
it_behaves_like DaisybillApi::Ext::CRUD, :all, :find, :create, "/bill_submissions", bill_id: "/bills"
|
|
10
10
|
it_behaves_like DaisybillApi::Ext::Links, bill: DaisybillApi::Models::Bill
|
|
11
11
|
end
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
require
|
|
1
|
+
require "spec_helper"
|
|
2
2
|
|
|
3
3
|
describe DaisybillApi::Models::BillingProvider do
|
|
4
4
|
it_behaves_like DaisybillApi::Ext::Attributes, :id, :name, :fein, :npi, :telephone, :fax_number,
|
|
5
5
|
:created_at, :updated_at, :dol_provider_number, physical_address: :model, pay_to_address: :model
|
|
6
6
|
it_behaves_like DaisybillApi::Ext::Attributes::SendAs
|
|
7
|
-
it_behaves_like DaisybillApi::Ext::CRUD, :all, :find,
|
|
7
|
+
it_behaves_like DaisybillApi::Ext::CRUD, :all, :find, "/billing_providers"
|
|
8
8
|
it_behaves_like DaisybillApi::Ext::Associations, :patients
|
|
9
9
|
it_behaves_like DaisybillApi::Ext::Associations, :rendering_providers
|
|
10
10
|
it_behaves_like DaisybillApi::Ext::Associations, :referring_providers
|
|
@@ -1,8 +1,9 @@
|
|
|
1
|
-
require
|
|
1
|
+
require "spec_helper"
|
|
2
2
|
|
|
3
3
|
describe DaisybillApi::Models::ClaimsAdministrator do
|
|
4
4
|
it_behaves_like DaisybillApi::Ext::Attributes, :id, :name, :created_at, :updated_at, :description
|
|
5
5
|
it_behaves_like DaisybillApi::Ext::Attributes::SendAs
|
|
6
6
|
it_behaves_like DaisybillApi::Ext::Associations, :payers
|
|
7
|
-
it_behaves_like DaisybillApi::Ext::
|
|
7
|
+
it_behaves_like DaisybillApi::Ext::Associations, :bill_mailing_addresses
|
|
8
|
+
it_behaves_like DaisybillApi::Ext::CRUD, :all, :find, "/claims_administrators"
|
|
8
9
|
end
|
|
@@ -1,6 +1,32 @@
|
|
|
1
|
-
require
|
|
1
|
+
require "spec_helper"
|
|
2
2
|
|
|
3
3
|
describe DaisybillApi::Models::Contact do
|
|
4
|
-
it_behaves_like DaisybillApi::Ext::Attributes,
|
|
5
|
-
:
|
|
4
|
+
it_behaves_like DaisybillApi::Ext::Attributes,
|
|
5
|
+
:id,
|
|
6
|
+
:injury_id,
|
|
7
|
+
:type,
|
|
8
|
+
:first_name,
|
|
9
|
+
:last_name,
|
|
10
|
+
:company,
|
|
11
|
+
:role,
|
|
12
|
+
:telephone,
|
|
13
|
+
:email,
|
|
14
|
+
:fax,
|
|
15
|
+
:created_at,
|
|
16
|
+
:updated_at,
|
|
17
|
+
address: :model
|
|
18
|
+
|
|
19
|
+
it_behaves_like DaisybillApi::Ext::Attributes::SendAs,
|
|
20
|
+
:injury_id,
|
|
21
|
+
:first_name,
|
|
22
|
+
:last_name,
|
|
23
|
+
:company,
|
|
24
|
+
:telephone,
|
|
25
|
+
:email,
|
|
26
|
+
:fax,
|
|
27
|
+
:type,
|
|
28
|
+
:address_attributes
|
|
29
|
+
|
|
30
|
+
it_behaves_like DaisybillApi::Ext::CRUD, :all, :find, :create, :update, "/contacts", injury_id: "/injuries"
|
|
31
|
+
it_behaves_like DaisybillApi::Ext::Links, injury: DaisybillApi::Models::Injury
|
|
6
32
|
end
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
require "spec_helper"
|
|
2
|
+
|
|
3
|
+
describe DaisybillApi::Models::ErrorReport do
|
|
4
|
+
it_behaves_like DaisybillApi::Ext::Attributes, :id, :bill_id, :error_type, :comment,
|
|
5
|
+
:name, :telephone, :role, :call_reference_number, :created_at, :updated_at
|
|
6
|
+
it_behaves_like DaisybillApi::Ext::Attributes::SendAs, :bill_id, :error_type, :comment,
|
|
7
|
+
:name, :telephone, :role, :call_reference_number
|
|
8
|
+
it_behaves_like DaisybillApi::Ext::CRUD, :all, :find, :create, "/error_reports", bill_id: "/bills"
|
|
9
|
+
it_behaves_like DaisybillApi::Ext::Links, bill: DaisybillApi::Models::Bill
|
|
10
|
+
end
|
|
@@ -1,8 +1,9 @@
|
|
|
1
|
-
require
|
|
1
|
+
require "spec_helper"
|
|
2
2
|
|
|
3
3
|
describe DaisybillApi::Models::PaperEor do
|
|
4
|
-
it_behaves_like DaisybillApi::Ext::Attributes, :id, :remittance_id, :created_at,
|
|
5
|
-
|
|
4
|
+
it_behaves_like DaisybillApi::Ext::Attributes, :id, :remittance_id, :created_at,
|
|
5
|
+
:updated_at, review_errors: :collection, review_warnings: :collection
|
|
6
|
+
it_behaves_like DaisybillApi::Ext::CRUD, :all, "/paper_eors", remittance_id: "/remittances"
|
|
6
7
|
it_behaves_like DaisybillApi::Ext::Associations
|
|
7
8
|
it_behaves_like DaisybillApi::Ext::Links, remittance: DaisybillApi::Models::Remittance
|
|
8
9
|
end
|
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
require
|
|
1
|
+
require "spec_helper"
|
|
2
2
|
|
|
3
3
|
describe DaisybillApi::Models::Patient do
|
|
4
4
|
it_behaves_like DaisybillApi::Ext::Attributes, :id, :first_name, :last_name, :middle_initial, :suffix,
|
|
5
5
|
:gender, :practice_internal_id, :date_of_birth, :ssn, :telephone, :created_at, :updated_at,
|
|
6
|
-
:billing_provider_id, :review_status, review_errors: :collection, address: :model
|
|
6
|
+
:billing_provider_id, :review_status, review_errors: :collection, review_warnings: :collection, address: :model
|
|
7
7
|
it_behaves_like DaisybillApi::Ext::Attributes::SendAs, :first_name, :last_name, :gender, :date_of_birth,
|
|
8
8
|
:ssn, :address_attributes, :suffix, :middle_initial, :practice_internal_id, :telephone,
|
|
9
9
|
:billing_provider_id
|
|
10
|
-
it_behaves_like DaisybillApi::Ext::CRUD, :all, :find, :create, :update, :destroy, :search,
|
|
11
|
-
billing_provider_id:
|
|
10
|
+
it_behaves_like DaisybillApi::Ext::CRUD, :all, :find, :create, :update, :destroy, :search, "/patients",
|
|
11
|
+
billing_provider_id: "/billing_providers"
|
|
12
12
|
it_behaves_like DaisybillApi::Ext::Associations, :injuries
|
|
13
13
|
it_behaves_like DaisybillApi::Ext::Links, billing_provider: DaisybillApi::Models::BillingProvider
|
|
14
14
|
end
|
|
@@ -1,8 +1,9 @@
|
|
|
1
|
-
require
|
|
1
|
+
require "spec_helper"
|
|
2
2
|
|
|
3
3
|
describe DaisybillApi::Models::Payer do
|
|
4
4
|
it_behaves_like DaisybillApi::Ext::Attributes, :id, :name, :description, :main, :claims_administrator_id,
|
|
5
5
|
:created_at, :updated_at
|
|
6
6
|
it_behaves_like DaisybillApi::Ext::Attributes::SendAs
|
|
7
|
-
it_behaves_like DaisybillApi::Ext::CRUD, :all, :find,
|
|
7
|
+
it_behaves_like DaisybillApi::Ext::CRUD, :all, :find, "/payers", claims_administrator_id: "/claims_administrators"
|
|
8
|
+
it_behaves_like DaisybillApi::Ext::Associations, :bill_mailing_addresses
|
|
8
9
|
end
|
|
@@ -1,23 +1,24 @@
|
|
|
1
|
-
require
|
|
1
|
+
require "spec_helper"
|
|
2
2
|
|
|
3
3
|
describe DaisybillApi::Models::PharmacyBill do
|
|
4
4
|
it_behaves_like DaisybillApi::Ext::Attributes,
|
|
5
5
|
:id, :date_of_service, :authorization_number, :status, :product_type,
|
|
6
6
|
:prescription_date, :fill_number, :prescription_number, :days_supply,
|
|
7
|
-
:dispense_as_written_code, :unit_of_measurement, :compound_name,
|
|
7
|
+
:dispense_as_written_code, :unit_of_measurement, :compound_name, :practice_bill_id,
|
|
8
8
|
:dosage_form, :route_of_administration, :charge_cents, :number_of_containers,
|
|
9
9
|
:expected_payment_cents, :allowed_cents, :balance_due_cents, :created_at,
|
|
10
10
|
:updated_at, :injury_id, :place_of_service_id, :prescribing_provider_id,
|
|
11
|
-
:review_status, review_errors: :collection,
|
|
11
|
+
:review_status, review_errors: :collection, review_warnings: :collection,
|
|
12
|
+
service_line_items: :collection
|
|
12
13
|
it_behaves_like DaisybillApi::Ext::Attributes::SendAs,
|
|
13
14
|
:date_of_service, :authorization_number, :product_type, :prescription_date,
|
|
14
15
|
:fill_number, :prescription_number, :days_supply, :dispense_as_written_code,
|
|
15
|
-
:unit_of_measurement, :compound_name, :dosage_form,
|
|
16
|
+
:unit_of_measurement, :compound_name, :practice_bill_id, :dosage_form,
|
|
16
17
|
:route_of_administration, :number_of_containers, :injury_id, :place_of_service_id,
|
|
17
18
|
:prescribing_provider_id, :service_line_items_attributes
|
|
18
19
|
it_behaves_like DaisybillApi::Ext::CRUD,
|
|
19
|
-
:all, :find, :create, :update, :destroy,
|
|
20
|
-
|
|
20
|
+
:all, :find, :create, :update, :destroy, :write_off,
|
|
21
|
+
"/pharmacy_bills", injury_id: "/injuries"
|
|
21
22
|
it_behaves_like DaisybillApi::Ext::Links,
|
|
22
23
|
injury: DaisybillApi::Models::Injury,
|
|
23
24
|
place_of_service: DaisybillApi::Models::PlaceOfService,
|
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
require
|
|
1
|
+
require "spec_helper"
|
|
2
2
|
|
|
3
3
|
describe DaisybillApi::Models::PlaceOfService do
|
|
4
4
|
it_behaves_like DaisybillApi::Ext::Attributes, :id, :name, :nick_name, :county, :npi, :active,
|
|
5
5
|
:authorization_telephone_number, :authorization_fax_number, :place_of_service_type_code,
|
|
6
|
-
:billing_provider_id, :created_at, :updated_at, address: :model
|
|
6
|
+
:billing_provider_id, :telephone, :created_at, :updated_at, address: :model
|
|
7
7
|
it_behaves_like DaisybillApi::Ext::Attributes::SendAs, :name, :nick_name, :place_of_service_type_code,
|
|
8
8
|
:county, :address_attributes, :npi, :authorization_fax_number, :authorization_telephone_number,
|
|
9
|
-
:billing_provider_id, :active
|
|
10
|
-
it_behaves_like DaisybillApi::Ext::CRUD, :all, :find, :create, :update,
|
|
11
|
-
billing_provider_id:
|
|
9
|
+
:billing_provider_id, :telephone, :active
|
|
10
|
+
it_behaves_like DaisybillApi::Ext::CRUD, :all, :find, :create, :update, "/places_of_service",
|
|
11
|
+
billing_provider_id: "/billing_providers"
|
|
12
12
|
it_behaves_like DaisybillApi::Ext::Associations
|
|
13
13
|
it_behaves_like DaisybillApi::Ext::Links, billing_provider: DaisybillApi::Models::BillingProvider
|
|
14
14
|
end
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
require
|
|
1
|
+
require "spec_helper"
|
|
2
2
|
|
|
3
3
|
describe DaisybillApi::Models::PrescribingProvider do
|
|
4
4
|
it_behaves_like DaisybillApi::Ext::Attributes,
|
|
@@ -8,7 +8,7 @@ describe DaisybillApi::Models::PrescribingProvider do
|
|
|
8
8
|
:first_name, :last_name, :npi, :middle_initial,
|
|
9
9
|
:suffix, :billing_provider_id, :address_attributes
|
|
10
10
|
it_behaves_like DaisybillApi::Ext::CRUD, :all, :find, :create, :update,
|
|
11
|
-
|
|
11
|
+
"/prescribing_providers", billing_provider_id: "/billing_providers"
|
|
12
12
|
it_behaves_like DaisybillApi::Ext::Associations
|
|
13
13
|
it_behaves_like DaisybillApi::Ext::Links,
|
|
14
14
|
billing_provider: DaisybillApi::Models::BillingProvider
|