candidhealth 1.14.3 → 1.17.4
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/lib/candid/claims/types/claim.rb +1 -1
- data/lib/candid/client.rb +7 -7
- data/lib/candid/commons/types/{http_service_unavailable_error_message.rb → bad_request_error_message.rb} +1 -1
- data/lib/candid/commons/types/claim_adjustment_group_codes.rb +22 -0
- data/lib/candid/commons/types/internal_error_message.rb +11 -0
- data/lib/candid/commons/types/procedure_modifier.rb +1 -0
- data/lib/candid/contracts/client.rb +5 -0
- data/lib/candid/contracts/v_2/client.rb +4 -0
- data/lib/candid/contracts/v_3/client.rb +176 -0
- data/lib/candid/contracts/v_3/types/contract.rb +18 -0
- data/lib/candid/contracts/v_3/types/contract_base.rb +28 -0
- data/lib/candid/contracts/v_3/types/contract_create.rb +15 -0
- data/lib/candid/contracts/v_3/types/contract_create_union.rb +18 -0
- data/lib/candid/contracts/v_3/types/contract_service_facility.rb +14 -0
- data/lib/candid/contracts/v_3/types/contract_service_facility_base.rb +14 -0
- data/lib/candid/contracts/v_3/types/contract_service_facility_create.rb +15 -0
- data/lib/candid/contracts/v_3/types/contract_service_facility_update.rb +16 -0
- data/lib/candid/contracts/v_3/types/contract_type.rb +16 -0
- data/lib/candid/contracts/v_3/types/contract_union.rb +18 -0
- data/lib/candid/contracts/v_3/types/contract_update.rb +28 -0
- data/lib/candid/contracts/v_3/types/contract_update_union.rb +18 -0
- data/lib/candid/contracts/v_3/types/contract_with_providers_union.rb +18 -0
- data/lib/candid/contracts/v_3/types/contracts_page.rb +15 -0
- data/lib/candid/contracts/v_3/types/get_multi_contracts_request.rb +22 -0
- data/lib/candid/contracts/v_3/types/institutional_contract.rb +15 -0
- data/lib/candid/contracts/v_3/types/institutional_contract_create.rb +15 -0
- data/lib/candid/contracts/v_3/types/institutional_contract_update.rb +13 -0
- data/lib/candid/contracts/v_3/types/professional_contract.rb +13 -0
- data/lib/candid/contracts/v_3/types/professional_contract_create.rb +13 -0
- data/lib/candid/contracts/v_3/types/professional_contract_update.rb +13 -0
- data/lib/candid/eligibility/v_2/client.rb +0 -38
- data/lib/candid/encounter_providers/v_2/types/billing_provider.rb +3 -0
- data/lib/candid/encounter_providers/v_2/types/billing_provider_update.rb +3 -0
- data/lib/candid/encounter_providers/v_2/types/billing_provider_update_with_optional_address.rb +3 -0
- data/lib/candid/encounter_providers/v_2/types/encounter_provider.rb +3 -0
- data/lib/candid/encounter_providers/v_2/types/provider_secondary_identification.rb +16 -0
- data/lib/candid/{expected_network_status/v_2/types/line_of_business.rb → encounter_providers/v_2/types/provider_secondary_identification_qualifier.rb} +4 -5
- data/lib/candid/encounter_providers/v_2/types/rendering_provider.rb +3 -0
- data/lib/candid/encounter_providers/v_2/types/rendering_provider_update.rb +3 -0
- data/lib/candid/encounter_providers/v_2/types/rendering_provider_update_with_optional_address.rb +3 -0
- data/lib/candid/encounters/v_4/client.rb +15 -0
- data/lib/candid/encounters/v_4/types/encounter.rb +3 -0
- data/lib/candid/encounters/v_4/types/encounter_deep_optional.rb +3 -0
- data/lib/candid/encounters_universal/types/universal_encounter_create_base.rb +3 -0
- data/lib/candid/encounters_universal/types/universal_encounter_create_from_pre_encounter_base.rb +3 -0
- data/lib/candid/encounters_universal/types/universal_encounter_update_base.rb +3 -0
- data/lib/candid/{era → eras}/types/era.rb +1 -1
- data/lib/candid/{era → eras}/types/era_base.rb +1 -1
- data/lib/candid/{insurance_payments → events}/client.rb +3 -3
- data/lib/candid/{insurance_payments → events}/v_1/client.rb +11 -15
- data/lib/candid/events/v_1/types/event.rb +18 -0
- data/lib/candid/events/v_1/types/event_scan_page.rb +16 -0
- data/lib/candid/events/v_1/types/get_event_scan_request.rb +17 -0
- data/lib/candid/fee_schedules/v_3/client.rb +9 -1
- data/lib/candid/fee_schedules/v_3/types/payer_threshold.rb +6 -1
- data/lib/candid/financials/types/allocation.rb +1 -0
- data/lib/candid/financials/types/allocation_create.rb +1 -0
- data/lib/candid/financials/types/allocation_earmark_type.rb +19 -0
- data/lib/candid/financials/types/balance_earmark.rb +15 -0
- data/lib/candid/insurance_adjudications/client.rb +17 -0
- data/lib/candid/{expected_network_status → insurance_adjudications}/v_1/client.rb +8 -9
- data/lib/candid/insurance_adjudications/v_1/types/claim_adjudication.rb +23 -0
- data/lib/candid/insurance_adjudications/v_1/types/insurance_adjudication.rb +21 -0
- data/lib/candid/insurance_adjudications/v_1/types/service_line_adjudication.rb +27 -0
- data/lib/candid/insurance_cards/v_2/types/insurance_card_base.rb +1 -0
- data/lib/candid/patient_ar/v_1/client.rb +0 -4
- data/lib/candid/patient_payments/v_4/types/card_payment_method.rb +11 -0
- data/lib/candid/patient_payments/v_4/types/cash_payment_method.rb +11 -0
- data/lib/candid/patient_payments/v_4/types/check_payment_method.rb +13 -0
- data/lib/candid/patient_payments/v_4/types/patient_payment.rb +3 -0
- data/lib/candid/patient_payments/v_4/types/payment_method.rb +19 -0
- data/lib/candid/patient_payments/v_4/types/payment_method_detail.rb +18 -0
- data/lib/candid/pre_encounter/eligibility_checks/v_1/types/eligibility_request.rb +2 -0
- data/lib/candid/related_causes_information/v_1/types/related_causes_code.rb +20 -0
- data/lib/candid/related_causes_information/v_1/types/related_causes_information.rb +19 -0
- data/lib/candid/related_causes_information/v_1/types/related_causes_information_create.rb +11 -0
- data/lib/candid/related_causes_information/v_1/types/related_causes_information_update.rb +11 -0
- data/lib/candid/service_lines/v_2/types/service_line.rb +2 -0
- data/lib/candid/service_lines/v_2/types/service_line_create_base_base.rb +2 -0
- data/lib/candid/service_lines/v_2/types/service_line_create_optional.rb +2 -0
- data/lib/candid/service_lines/v_2/types/service_line_create_standalone.rb +2 -0
- data/lib/candid/service_lines/v_2/types/service_line_update_base.rb +2 -0
- data/lib/candid/service_lines/v_2/types/test_result_type.rb +1 -0
- data/lib/candid/service_lines/v_2/types/universal_service_line_create_standalone.rb +2 -0
- data/lib/candid/tasks/commons/types/task_type.rb +1 -0
- data/lib/candid/version.rb +1 -1
- data/lib/candid/x_12/v_1/types/carc.rb +418 -0
- data/lib/candid/x_12/v_1/types/claim_adjustment_reason_code.rb +15 -0
- data/lib/candid/x_12/v_1/types/rarc.rb +1201 -0
- data/lib/candid/x_12/v_1/types/remittance_advice_remark_code.rb +13 -0
- data/lib/candid.rb +57 -36
- data/reference.md +515 -363
- metadata +55 -34
- data/lib/candid/expected_network_status/client.rb +0 -22
- data/lib/candid/expected_network_status/v_1/types/expected_network_status.rb +0 -17
- data/lib/candid/expected_network_status/v_1/types/expected_network_status_request.rb +0 -24
- data/lib/candid/expected_network_status/v_1/types/expected_network_status_response.rb +0 -17
- data/lib/candid/expected_network_status/v_2/client.rb +0 -66
- data/lib/candid/expected_network_status/v_2/types/compute_all_in_network_providers_request.rb +0 -25
- data/lib/candid/expected_network_status/v_2/types/compute_all_in_network_providers_response.rb +0 -16
- data/lib/candid/expected_network_status/v_2/types/compute_all_in_network_rendering_providers_result.rb +0 -21
- data/lib/candid/expected_network_status/v_2/types/empty_object.rb +0 -11
- data/lib/candid/expected_network_status/v_2/types/expected_network_status_check_error_message.rb +0 -13
- data/lib/candid/expected_network_status/v_2/types/expected_network_status_request_v_2.rb +0 -25
- data/lib/candid/expected_network_status/v_2/types/expected_network_status_response_v_2.rb +0 -16
- data/lib/candid/expected_network_status/v_2/types/expected_network_status_subscriber_information.rb +0 -17
- data/lib/candid/expected_network_status/v_2/types/expected_network_status_v_2.rb +0 -19
- data/lib/candid/expected_network_status/v_2/types/explanation.rb +0 -22
- data/lib/candid/expected_network_status/v_2/types/in_network_rendering_providers_detail.rb +0 -15
- data/lib/candid/expected_network_status/v_2/types/in_network_status.rb +0 -14
- data/lib/candid/expected_network_status/v_2/types/indeterminate_network_status.rb +0 -18
- data/lib/candid/expected_network_status/v_2/types/insurance_type.rb +0 -18
- data/lib/candid/expected_network_status/v_2/types/insurance_type_codes.rb +0 -19
- data/lib/candid/expected_network_status/v_2/types/out_of_network_status.rb +0 -17
- data/lib/candid/expected_network_status/v_2/types/service_type.rb +0 -55
- data/lib/candid/insurance_payments/v_1/types/get_multi_insurance_payment_request.rb +0 -22
- data/lib/candid/insurance_payments/v_1/types/insurance_payment.rb +0 -20
- data/lib/candid/insurance_payments/v_1/types/insurance_payment_sort_field.rb +0 -17
- data/lib/candid/insurance_payments/v_1/types/insurance_payments_page.rb +0 -15
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: c907e57fe09a7b163e6d44585d2a69376f204983c85d43dd26220149a6694d0f
|
|
4
|
+
data.tar.gz: 58cd71bf71c30d23255b0d81e41a2fe8c5a35d53679e4c8223887a960bcbc37a
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 2fe6caaa6612e74c1a87a0e258e38e156f3b9ae297def9cde43e31adaee5a96ab6cccf331029cee82fda77be2995ea447e8f57d65f587b056299d636d380660e
|
|
7
|
+
data.tar.gz: cf1b2956b8919f0adc773ace5820d11453924fa54af5c1d3a4fbcf81948a913ab641f66ef4a976d3487e5370e983cdef59f74cdf7703e97279947712dcfa7629
|
|
@@ -13,7 +13,7 @@ module Candid
|
|
|
13
13
|
field :service_lines, lambda {
|
|
14
14
|
Internal::Types::Array[Candid::ServiceLines::V2::Types::ServiceLine]
|
|
15
15
|
}, optional: false, nullable: false
|
|
16
|
-
field :eras, -> { Internal::Types::Array[Candid::
|
|
16
|
+
field :eras, -> { Internal::Types::Array[Candid::Eras::Types::Era] }, optional: false, nullable: false
|
|
17
17
|
end
|
|
18
18
|
end
|
|
19
19
|
end
|
data/lib/candid/client.rb
CHANGED
|
@@ -7,7 +7,7 @@ module Candid
|
|
|
7
7
|
@raw_client = Candid::Internal::Http::RawClient.new(
|
|
8
8
|
base_url: base_url,
|
|
9
9
|
headers: {
|
|
10
|
-
"User-Agent": "candidhealth/1.
|
|
10
|
+
"User-Agent": "candidhealth/1.17.4",
|
|
11
11
|
"X-Fern-Language": "Ruby"
|
|
12
12
|
}
|
|
13
13
|
)
|
|
@@ -73,9 +73,9 @@ module Candid
|
|
|
73
73
|
@encounters ||= Candid::Encounters::Client.new(client: @raw_client)
|
|
74
74
|
end
|
|
75
75
|
|
|
76
|
-
# @return [Candid::
|
|
77
|
-
def
|
|
78
|
-
@
|
|
76
|
+
# @return [Candid::Events::Client]
|
|
77
|
+
def events
|
|
78
|
+
@events ||= Candid::Events::Client.new(client: @raw_client)
|
|
79
79
|
end
|
|
80
80
|
|
|
81
81
|
# @return [Candid::Exports::Client]
|
|
@@ -108,9 +108,9 @@ module Candid
|
|
|
108
108
|
@import_invoice ||= Candid::ImportInvoice::Client.new(client: @raw_client)
|
|
109
109
|
end
|
|
110
110
|
|
|
111
|
-
# @return [Candid::
|
|
112
|
-
def
|
|
113
|
-
@
|
|
111
|
+
# @return [Candid::InsuranceAdjudications::Client]
|
|
112
|
+
def insurance_adjudications
|
|
113
|
+
@insurance_adjudications ||= Candid::InsuranceAdjudications::Client.new(client: @raw_client)
|
|
114
114
|
end
|
|
115
115
|
|
|
116
116
|
# @return [Candid::InsuranceRefunds::Client]
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Candid
|
|
4
|
+
module Commons
|
|
5
|
+
module Types
|
|
6
|
+
module ClaimAdjustmentGroupCodes
|
|
7
|
+
extend Candid::Internal::Types::Enum
|
|
8
|
+
|
|
9
|
+
CO = "CO"
|
|
10
|
+
CR = "CR"
|
|
11
|
+
DE = "DE"
|
|
12
|
+
MA = "MA"
|
|
13
|
+
OA = "OA"
|
|
14
|
+
PI = "PI"
|
|
15
|
+
PR = "PR"
|
|
16
|
+
RR = "RR"
|
|
17
|
+
NC = "NC"
|
|
18
|
+
UNKNOWN = "UNKNOWN"
|
|
19
|
+
end
|
|
20
|
+
end
|
|
21
|
+
end
|
|
22
|
+
end
|
|
@@ -9,6 +9,8 @@ module Candid
|
|
|
9
9
|
@client = client
|
|
10
10
|
end
|
|
11
11
|
|
|
12
|
+
# This API provides access to Professional Contracts. For Professional and Institutional Contracts use Contracts V3.
|
|
13
|
+
#
|
|
12
14
|
# @return [Candid::Contracts::V2::Types::ContractWithProviders]
|
|
13
15
|
def get(request_options: {}, **params)
|
|
14
16
|
_request = Candid::Internal::JSON::Request.new(
|
|
@@ -30,6 +32,8 @@ module Candid
|
|
|
30
32
|
end
|
|
31
33
|
end
|
|
32
34
|
|
|
35
|
+
# This API provides access to Professional Contracts. For Professional and Institutional Contracts use Contracts V3.
|
|
36
|
+
#
|
|
33
37
|
# @return [Candid::Contracts::V2::Types::ContractsPage]
|
|
34
38
|
def get_multi(request_options: {}, **params)
|
|
35
39
|
params = Candid::Internal::Types::Utils.symbolize_keys(params)
|
|
@@ -0,0 +1,176 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Candid
|
|
4
|
+
module Contracts
|
|
5
|
+
module V3
|
|
6
|
+
class Client
|
|
7
|
+
# @return [Candid::Contracts::V3::Client]
|
|
8
|
+
def initialize(client:)
|
|
9
|
+
@client = client
|
|
10
|
+
end
|
|
11
|
+
|
|
12
|
+
# @return [Candid::Contracts::V3::Types::ContractWithProvidersUnion]
|
|
13
|
+
def get(request_options: {}, **params)
|
|
14
|
+
_request = Candid::Internal::JSON::Request.new(
|
|
15
|
+
base_url: request_options[:base_url] || Candid::Environment::PRODUCTION,
|
|
16
|
+
method: "GET",
|
|
17
|
+
path: "/api/contracts/v3/#{params[:contract_id]}"
|
|
18
|
+
)
|
|
19
|
+
begin
|
|
20
|
+
_response = @client.send(_request)
|
|
21
|
+
rescue Net::HTTPRequestTimeout
|
|
22
|
+
raise Candid::Errors::TimeoutError
|
|
23
|
+
end
|
|
24
|
+
code = _response.code.to_i
|
|
25
|
+
if code.between?(200, 299)
|
|
26
|
+
Candid::Contracts::V3::Types::ContractWithProvidersUnion.load(_response.body)
|
|
27
|
+
else
|
|
28
|
+
error_class = Candid::Errors::ResponseError.subclass_for_code(code)
|
|
29
|
+
raise error_class.new(_response.body, code: code)
|
|
30
|
+
end
|
|
31
|
+
end
|
|
32
|
+
|
|
33
|
+
# @return [Candid::Contracts::V3::Types::ContractsPage]
|
|
34
|
+
def get_multi(request_options: {}, **params)
|
|
35
|
+
params = Candid::Internal::Types::Utils.symbolize_keys(params)
|
|
36
|
+
_query_param_names = %i[page_token limit type contracting_provider_id rendering_provider_ids payer_names
|
|
37
|
+
states contract_status sort sort_direction]
|
|
38
|
+
_query = params.slice(*_query_param_names)
|
|
39
|
+
params.except(*_query_param_names)
|
|
40
|
+
|
|
41
|
+
_request = Candid::Internal::JSON::Request.new(
|
|
42
|
+
base_url: request_options[:base_url] || Candid::Environment::PRODUCTION,
|
|
43
|
+
method: "GET",
|
|
44
|
+
path: "/api/contracts/v3",
|
|
45
|
+
query: _query
|
|
46
|
+
)
|
|
47
|
+
begin
|
|
48
|
+
_response = @client.send(_request)
|
|
49
|
+
rescue Net::HTTPRequestTimeout
|
|
50
|
+
raise Candid::Errors::TimeoutError
|
|
51
|
+
end
|
|
52
|
+
code = _response.code.to_i
|
|
53
|
+
if code.between?(200, 299)
|
|
54
|
+
Candid::Contracts::V3::Types::ContractsPage.load(_response.body)
|
|
55
|
+
else
|
|
56
|
+
error_class = Candid::Errors::ResponseError.subclass_for_code(code)
|
|
57
|
+
raise error_class.new(_response.body, code: code)
|
|
58
|
+
end
|
|
59
|
+
end
|
|
60
|
+
|
|
61
|
+
# Creates a new contract within the user's current organization
|
|
62
|
+
#
|
|
63
|
+
# @return [Candid::Contracts::V3::Types::ContractWithProvidersUnion]
|
|
64
|
+
def create(request_options: {}, **params)
|
|
65
|
+
_request = Candid::Internal::JSON::Request.new(
|
|
66
|
+
base_url: request_options[:base_url] || Candid::Environment::PRODUCTION,
|
|
67
|
+
method: "POST",
|
|
68
|
+
path: "/api/contracts/v3",
|
|
69
|
+
body: Candid::Contracts::V3::Types::ContractCreateUnion.new(params).to_h
|
|
70
|
+
)
|
|
71
|
+
begin
|
|
72
|
+
_response = @client.send(_request)
|
|
73
|
+
rescue Net::HTTPRequestTimeout
|
|
74
|
+
raise Candid::Errors::TimeoutError
|
|
75
|
+
end
|
|
76
|
+
code = _response.code.to_i
|
|
77
|
+
if code.between?(200, 299)
|
|
78
|
+
Candid::Contracts::V3::Types::ContractWithProvidersUnion.load(_response.body)
|
|
79
|
+
else
|
|
80
|
+
error_class = Candid::Errors::ResponseError.subclass_for_code(code)
|
|
81
|
+
raise error_class.new(_response.body, code: code)
|
|
82
|
+
end
|
|
83
|
+
end
|
|
84
|
+
|
|
85
|
+
# @return [untyped]
|
|
86
|
+
def delete(request_options: {}, **params)
|
|
87
|
+
_request = Candid::Internal::JSON::Request.new(
|
|
88
|
+
base_url: request_options[:base_url] || Candid::Environment::PRODUCTION,
|
|
89
|
+
method: "DELETE",
|
|
90
|
+
path: "/api/contracts/v3/#{params[:contract_id]}"
|
|
91
|
+
)
|
|
92
|
+
begin
|
|
93
|
+
_response = @client.send(_request)
|
|
94
|
+
rescue Net::HTTPRequestTimeout
|
|
95
|
+
raise Candid::Errors::TimeoutError
|
|
96
|
+
end
|
|
97
|
+
code = _response.code.to_i
|
|
98
|
+
return if code.between?(200, 299)
|
|
99
|
+
|
|
100
|
+
error_class = Candid::Errors::ResponseError.subclass_for_code(code)
|
|
101
|
+
raise error_class.new(_response.body, code: code)
|
|
102
|
+
end
|
|
103
|
+
|
|
104
|
+
# @return [Candid::Contracts::V3::Types::ContractWithProvidersUnion]
|
|
105
|
+
def update(request_options: {}, **params)
|
|
106
|
+
_request = Candid::Internal::JSON::Request.new(
|
|
107
|
+
base_url: request_options[:base_url] || Candid::Environment::PRODUCTION,
|
|
108
|
+
method: "PATCH",
|
|
109
|
+
path: "/api/contracts/v3/#{params[:contract_id]}",
|
|
110
|
+
body: Candid::Contracts::V3::Types::ContractUpdateUnion.new(params).to_h
|
|
111
|
+
)
|
|
112
|
+
begin
|
|
113
|
+
_response = @client.send(_request)
|
|
114
|
+
rescue Net::HTTPRequestTimeout
|
|
115
|
+
raise Candid::Errors::TimeoutError
|
|
116
|
+
end
|
|
117
|
+
code = _response.code.to_i
|
|
118
|
+
if code.between?(200, 299)
|
|
119
|
+
Candid::Contracts::V3::Types::ContractWithProvidersUnion.load(_response.body)
|
|
120
|
+
else
|
|
121
|
+
error_class = Candid::Errors::ResponseError.subclass_for_code(code)
|
|
122
|
+
raise error_class.new(_response.body, code: code)
|
|
123
|
+
end
|
|
124
|
+
end
|
|
125
|
+
|
|
126
|
+
# @return [Candid::Contracts::V3::Types::ContractServiceFacility]
|
|
127
|
+
def create_contract_service_facility(request_options: {}, **params)
|
|
128
|
+
_path_param_names = ["contract_id"]
|
|
129
|
+
|
|
130
|
+
_request = Candid::Internal::JSON::Request.new(
|
|
131
|
+
base_url: request_options[:base_url] || Candid::Environment::PRODUCTION,
|
|
132
|
+
method: "POST",
|
|
133
|
+
path: "/api/contracts/v3/#{params[:contract_id]}/service-facilities",
|
|
134
|
+
body: params.except(*_path_param_names)
|
|
135
|
+
)
|
|
136
|
+
begin
|
|
137
|
+
_response = @client.send(_request)
|
|
138
|
+
rescue Net::HTTPRequestTimeout
|
|
139
|
+
raise Candid::Errors::TimeoutError
|
|
140
|
+
end
|
|
141
|
+
code = _response.code.to_i
|
|
142
|
+
if code.between?(200, 299)
|
|
143
|
+
Candid::Contracts::V3::Types::ContractServiceFacility.load(_response.body)
|
|
144
|
+
else
|
|
145
|
+
error_class = Candid::Errors::ResponseError.subclass_for_code(code)
|
|
146
|
+
raise error_class.new(_response.body, code: code)
|
|
147
|
+
end
|
|
148
|
+
end
|
|
149
|
+
|
|
150
|
+
# @return [Candid::Contracts::V3::Types::ContractServiceFacility]
|
|
151
|
+
def update_contract_service_facility(request_options: {}, **params)
|
|
152
|
+
_path_param_names = %w[contract_id contract_service_facility_id]
|
|
153
|
+
|
|
154
|
+
_request = Candid::Internal::JSON::Request.new(
|
|
155
|
+
base_url: request_options[:base_url] || Candid::Environment::PRODUCTION,
|
|
156
|
+
method: "PATCH",
|
|
157
|
+
path: "/api/contracts/v3/#{params[:contract_id]}/service-facilities/#{params[:contract_service_facility_id]}",
|
|
158
|
+
body: params.except(*_path_param_names)
|
|
159
|
+
)
|
|
160
|
+
begin
|
|
161
|
+
_response = @client.send(_request)
|
|
162
|
+
rescue Net::HTTPRequestTimeout
|
|
163
|
+
raise Candid::Errors::TimeoutError
|
|
164
|
+
end
|
|
165
|
+
code = _response.code.to_i
|
|
166
|
+
if code.between?(200, 299)
|
|
167
|
+
Candid::Contracts::V3::Types::ContractServiceFacility.load(_response.body)
|
|
168
|
+
else
|
|
169
|
+
error_class = Candid::Errors::ResponseError.subclass_for_code(code)
|
|
170
|
+
raise error_class.new(_response.body, code: code)
|
|
171
|
+
end
|
|
172
|
+
end
|
|
173
|
+
end
|
|
174
|
+
end
|
|
175
|
+
end
|
|
176
|
+
end
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Candid
|
|
4
|
+
module Contracts
|
|
5
|
+
module V3
|
|
6
|
+
module Types
|
|
7
|
+
class Contract < Internal::Types::Model
|
|
8
|
+
field :contract_id, -> { String }, optional: false, nullable: false
|
|
9
|
+
field :contracting_provider, lambda {
|
|
10
|
+
Candid::OrganizationProviders::V2::Types::OrganizationProvider
|
|
11
|
+
}, optional: false, nullable: false
|
|
12
|
+
field :provider_count, -> { Integer }, optional: false, nullable: false
|
|
13
|
+
field :payer, -> { Candid::Payers::V3::Types::Payer }, optional: false, nullable: false
|
|
14
|
+
end
|
|
15
|
+
end
|
|
16
|
+
end
|
|
17
|
+
end
|
|
18
|
+
end
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Candid
|
|
4
|
+
module Contracts
|
|
5
|
+
module V3
|
|
6
|
+
module Types
|
|
7
|
+
class ContractBase < Internal::Types::Model
|
|
8
|
+
field :effective_date, -> { String }, optional: false, nullable: false
|
|
9
|
+
field :expiration_date, -> { String }, optional: true, nullable: false
|
|
10
|
+
field :regions, -> { Candid::Commons::Types::Regions }, optional: false, nullable: false
|
|
11
|
+
field :contract_status, -> { Candid::Contracts::V2::Types::ContractStatus }, optional: true, nullable: false
|
|
12
|
+
field :authorized_signatory, lambda {
|
|
13
|
+
Candid::Contracts::V2::Types::AuthorizedSignatory
|
|
14
|
+
}, optional: true, nullable: false
|
|
15
|
+
field :commercial_insurance_types, lambda {
|
|
16
|
+
Candid::Contracts::V2::Types::InsuranceTypes
|
|
17
|
+
}, optional: false, nullable: false
|
|
18
|
+
field :medicare_insurance_types, lambda {
|
|
19
|
+
Candid::Contracts::V2::Types::InsuranceTypes
|
|
20
|
+
}, optional: false, nullable: false
|
|
21
|
+
field :medicaid_insurance_types, lambda {
|
|
22
|
+
Candid::Contracts::V2::Types::InsuranceTypes
|
|
23
|
+
}, optional: false, nullable: false
|
|
24
|
+
end
|
|
25
|
+
end
|
|
26
|
+
end
|
|
27
|
+
end
|
|
28
|
+
end
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Candid
|
|
4
|
+
module Contracts
|
|
5
|
+
module V3
|
|
6
|
+
module Types
|
|
7
|
+
class ContractCreate < Internal::Types::Model
|
|
8
|
+
field :contract_type, -> { Candid::Contracts::V3::Types::ContractType }, optional: false, nullable: false
|
|
9
|
+
field :contracting_provider_id, -> { String }, optional: false, nullable: false
|
|
10
|
+
field :payer_uuid, -> { String }, optional: false, nullable: false
|
|
11
|
+
end
|
|
12
|
+
end
|
|
13
|
+
end
|
|
14
|
+
end
|
|
15
|
+
end
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Candid
|
|
4
|
+
module Contracts
|
|
5
|
+
module V3
|
|
6
|
+
module Types
|
|
7
|
+
class ContractCreateUnion < Internal::Types::Model
|
|
8
|
+
extend Candid::Internal::Types::Union
|
|
9
|
+
|
|
10
|
+
discriminant :type
|
|
11
|
+
|
|
12
|
+
member -> { Candid::Contracts::V3::Types::ProfessionalContractCreate }, key: "PROFESSIONAL"
|
|
13
|
+
member -> { Candid::Contracts::V3::Types::InstitutionalContractCreate }, key: "INSTITUTIONAL"
|
|
14
|
+
end
|
|
15
|
+
end
|
|
16
|
+
end
|
|
17
|
+
end
|
|
18
|
+
end
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Candid
|
|
4
|
+
module Contracts
|
|
5
|
+
module V3
|
|
6
|
+
module Types
|
|
7
|
+
class ContractServiceFacility < Internal::Types::Model
|
|
8
|
+
field :contract_id, -> { String }, optional: false, nullable: false
|
|
9
|
+
field :contract_service_facility_id, -> { String }, optional: false, nullable: false
|
|
10
|
+
end
|
|
11
|
+
end
|
|
12
|
+
end
|
|
13
|
+
end
|
|
14
|
+
end
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Candid
|
|
4
|
+
module Contracts
|
|
5
|
+
module V3
|
|
6
|
+
module Types
|
|
7
|
+
class ContractServiceFacilityBase < Internal::Types::Model
|
|
8
|
+
field :service_facility_id, -> { String }, optional: false, nullable: false
|
|
9
|
+
field :provider_ids, -> { Internal::Types::Array[String] }, optional: false, nullable: false
|
|
10
|
+
end
|
|
11
|
+
end
|
|
12
|
+
end
|
|
13
|
+
end
|
|
14
|
+
end
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Candid
|
|
4
|
+
module Contracts
|
|
5
|
+
module V3
|
|
6
|
+
module Types
|
|
7
|
+
class ContractServiceFacilityCreate < Internal::Types::Model
|
|
8
|
+
field :contract_id, -> { String }, optional: false, nullable: false
|
|
9
|
+
field :service_facility_id, -> { String }, optional: false, nullable: false
|
|
10
|
+
field :provider_ids, -> { Internal::Types::Array[String] }, optional: false, nullable: false
|
|
11
|
+
end
|
|
12
|
+
end
|
|
13
|
+
end
|
|
14
|
+
end
|
|
15
|
+
end
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Candid
|
|
4
|
+
module Contracts
|
|
5
|
+
module V3
|
|
6
|
+
module Types
|
|
7
|
+
class ContractServiceFacilityUpdate < Internal::Types::Model
|
|
8
|
+
field :contract_id, -> { String }, optional: false, nullable: false
|
|
9
|
+
field :contract_service_facility_id, -> { String }, optional: false, nullable: false
|
|
10
|
+
field :service_facility_id, -> { String }, optional: true, nullable: false
|
|
11
|
+
field :provider_ids, -> { Internal::Types::Array[String] }, optional: true, nullable: false
|
|
12
|
+
end
|
|
13
|
+
end
|
|
14
|
+
end
|
|
15
|
+
end
|
|
16
|
+
end
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Candid
|
|
4
|
+
module Contracts
|
|
5
|
+
module V3
|
|
6
|
+
module Types
|
|
7
|
+
module ContractType
|
|
8
|
+
extend Candid::Internal::Types::Enum
|
|
9
|
+
|
|
10
|
+
PROFESSIONAL = "professional"
|
|
11
|
+
INSTITUTIONAL = "institutional"
|
|
12
|
+
end
|
|
13
|
+
end
|
|
14
|
+
end
|
|
15
|
+
end
|
|
16
|
+
end
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Candid
|
|
4
|
+
module Contracts
|
|
5
|
+
module V3
|
|
6
|
+
module Types
|
|
7
|
+
class ContractUnion < Internal::Types::Model
|
|
8
|
+
extend Candid::Internal::Types::Union
|
|
9
|
+
|
|
10
|
+
discriminant :type
|
|
11
|
+
|
|
12
|
+
member -> { Candid::Contracts::V3::Types::Contract }, key: "PROFESSIONAL"
|
|
13
|
+
member -> { Candid::Contracts::V3::Types::Contract }, key: "INSTITUTIONAL"
|
|
14
|
+
end
|
|
15
|
+
end
|
|
16
|
+
end
|
|
17
|
+
end
|
|
18
|
+
end
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Candid
|
|
4
|
+
module Contracts
|
|
5
|
+
module V3
|
|
6
|
+
module Types
|
|
7
|
+
class ContractUpdate < Internal::Types::Model
|
|
8
|
+
field :effective_date, -> { String }, optional: true, nullable: false
|
|
9
|
+
field :expiration_date, -> { Candid::Contracts::V2::Types::DateUpdate }, optional: true, nullable: false
|
|
10
|
+
field :regions, -> { Candid::Contracts::V2::Types::RegionsUpdate }, optional: true, nullable: false
|
|
11
|
+
field :contract_status, -> { Candid::Contracts::V2::Types::ContractStatus }, optional: true, nullable: false
|
|
12
|
+
field :authorized_signatory, lambda {
|
|
13
|
+
Candid::Contracts::V2::Types::AuthorizedSignatoryUpdate
|
|
14
|
+
}, optional: true, nullable: false
|
|
15
|
+
field :commercial_insurance_types, lambda {
|
|
16
|
+
Candid::Contracts::V2::Types::InsuranceTypes
|
|
17
|
+
}, optional: true, nullable: false
|
|
18
|
+
field :medicare_insurance_types, lambda {
|
|
19
|
+
Candid::Contracts::V2::Types::InsuranceTypes
|
|
20
|
+
}, optional: true, nullable: false
|
|
21
|
+
field :medicaid_insurance_types, lambda {
|
|
22
|
+
Candid::Contracts::V2::Types::InsuranceTypes
|
|
23
|
+
}, optional: true, nullable: false
|
|
24
|
+
end
|
|
25
|
+
end
|
|
26
|
+
end
|
|
27
|
+
end
|
|
28
|
+
end
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Candid
|
|
4
|
+
module Contracts
|
|
5
|
+
module V3
|
|
6
|
+
module Types
|
|
7
|
+
class ContractUpdateUnion < Internal::Types::Model
|
|
8
|
+
extend Candid::Internal::Types::Union
|
|
9
|
+
|
|
10
|
+
discriminant :type
|
|
11
|
+
|
|
12
|
+
member -> { Candid::Contracts::V3::Types::ProfessionalContractUpdate }, key: "PROFESSIONAL"
|
|
13
|
+
member -> { Candid::Contracts::V3::Types::InstitutionalContractUpdate }, key: "INSTITUTIONAL"
|
|
14
|
+
end
|
|
15
|
+
end
|
|
16
|
+
end
|
|
17
|
+
end
|
|
18
|
+
end
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Candid
|
|
4
|
+
module Contracts
|
|
5
|
+
module V3
|
|
6
|
+
module Types
|
|
7
|
+
class ContractWithProvidersUnion < Internal::Types::Model
|
|
8
|
+
extend Candid::Internal::Types::Union
|
|
9
|
+
|
|
10
|
+
discriminant :type
|
|
11
|
+
|
|
12
|
+
member -> { Candid::Contracts::V3::Types::ProfessionalContract }, key: "PROFESSIONAL"
|
|
13
|
+
member -> { Candid::Contracts::V3::Types::InstitutionalContract }, key: "INSTITUTIONAL"
|
|
14
|
+
end
|
|
15
|
+
end
|
|
16
|
+
end
|
|
17
|
+
end
|
|
18
|
+
end
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Candid
|
|
4
|
+
module Contracts
|
|
5
|
+
module V3
|
|
6
|
+
module Types
|
|
7
|
+
class ContractsPage < Internal::Types::Model
|
|
8
|
+
field :items, lambda {
|
|
9
|
+
Internal::Types::Array[Candid::Contracts::V3::Types::ContractUnion]
|
|
10
|
+
}, optional: false, nullable: false
|
|
11
|
+
end
|
|
12
|
+
end
|
|
13
|
+
end
|
|
14
|
+
end
|
|
15
|
+
end
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Candid
|
|
4
|
+
module Contracts
|
|
5
|
+
module V3
|
|
6
|
+
module Types
|
|
7
|
+
class GetMultiContractsRequest < Internal::Types::Model
|
|
8
|
+
field :page_token, -> { String }, optional: true, nullable: false
|
|
9
|
+
field :limit, -> { Integer }, optional: true, nullable: false
|
|
10
|
+
field :type, -> { Candid::Contracts::V3::Types::ContractType }, optional: true, nullable: false
|
|
11
|
+
field :contracting_provider_id, -> { String }, optional: true, nullable: false
|
|
12
|
+
field :rendering_provider_ids, -> { String }, optional: true, nullable: false
|
|
13
|
+
field :payer_names, -> { String }, optional: true, nullable: false
|
|
14
|
+
field :states, -> { Candid::Commons::Types::State }, optional: true, nullable: false
|
|
15
|
+
field :contract_status, -> { Candid::Contracts::V2::Types::ContractStatus }, optional: true, nullable: false
|
|
16
|
+
field :sort, -> { Candid::Contracts::V2::Types::ContractSortField }, optional: true, nullable: false
|
|
17
|
+
field :sort_direction, -> { Candid::Commons::Types::SortDirection }, optional: true, nullable: false
|
|
18
|
+
end
|
|
19
|
+
end
|
|
20
|
+
end
|
|
21
|
+
end
|
|
22
|
+
end
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Candid
|
|
4
|
+
module Contracts
|
|
5
|
+
module V3
|
|
6
|
+
module Types
|
|
7
|
+
class InstitutionalContract < Internal::Types::Model
|
|
8
|
+
field :contract_service_facilities, lambda {
|
|
9
|
+
Internal::Types::Array[Candid::Contracts::V3::Types::ContractServiceFacility]
|
|
10
|
+
}, optional: false, nullable: false
|
|
11
|
+
end
|
|
12
|
+
end
|
|
13
|
+
end
|
|
14
|
+
end
|
|
15
|
+
end
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Candid
|
|
4
|
+
module Contracts
|
|
5
|
+
module V3
|
|
6
|
+
module Types
|
|
7
|
+
class InstitutionalContractCreate < Internal::Types::Model
|
|
8
|
+
field :contract_service_facilities, lambda {
|
|
9
|
+
Internal::Types::Array[Candid::Contracts::V3::Types::ContractServiceFacilityBase]
|
|
10
|
+
}, optional: false, nullable: false
|
|
11
|
+
end
|
|
12
|
+
end
|
|
13
|
+
end
|
|
14
|
+
end
|
|
15
|
+
end
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Candid
|
|
4
|
+
module Contracts
|
|
5
|
+
module V3
|
|
6
|
+
module Types
|
|
7
|
+
class InstitutionalContractUpdate < Internal::Types::Model
|
|
8
|
+
field :contract_service_facility_ids, -> { Internal::Types::Array[String] }, optional: true, nullable: false
|
|
9
|
+
end
|
|
10
|
+
end
|
|
11
|
+
end
|
|
12
|
+
end
|
|
13
|
+
end
|