candidhealth 1.14.3 → 1.17.1
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/client.rb +9 -4
- data/lib/candid/commons/types/bad_request_error_message.rb +11 -0
- 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/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 +13 -0
- 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_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/{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/insurance_adjudications/client.rb +17 -0
- data/lib/candid/insurance_adjudications/v_1/client.rb +37 -0
- 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/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 +1 -0
- data/lib/candid/service_lines/v_2/types/service_line_create_base_base.rb +1 -0
- data/lib/candid/service_lines/v_2/types/service_line_create_optional.rb +1 -0
- data/lib/candid/service_lines/v_2/types/service_line_create_standalone.rb +1 -0
- data/lib/candid/service_lines/v_2/types/service_line_update_base.rb +1 -0
- data/lib/candid/service_lines/v_2/types/universal_service_line_create_standalone.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 +50 -7
- data/reference.md +627 -121
- metadata +50 -7
- 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
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Candid
|
|
4
|
+
module Contracts
|
|
5
|
+
module V3
|
|
6
|
+
module Types
|
|
7
|
+
class ProfessionalContractCreate < Internal::Types::Model
|
|
8
|
+
field :rendering_provider_ids, -> { Internal::Types::Array[String] }, optional: false, nullable: false
|
|
9
|
+
end
|
|
10
|
+
end
|
|
11
|
+
end
|
|
12
|
+
end
|
|
13
|
+
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 ProfessionalContractUpdate < Internal::Types::Model
|
|
8
|
+
field :rendering_provider_ids, -> { Internal::Types::Array[String] }, optional: true, nullable: false
|
|
9
|
+
end
|
|
10
|
+
end
|
|
11
|
+
end
|
|
12
|
+
end
|
|
13
|
+
end
|
|
@@ -20,6 +20,9 @@ module Candid
|
|
|
20
20
|
field :provider_commercial_license_type, lambda {
|
|
21
21
|
Candid::Commons::Types::BillingProviderCommercialLicenseType
|
|
22
22
|
}, optional: true, nullable: false
|
|
23
|
+
field :secondary_identification, lambda {
|
|
24
|
+
Candid::EncounterProviders::V2::Types::ProviderSecondaryIdentification
|
|
25
|
+
}, optional: true, nullable: false
|
|
23
26
|
end
|
|
24
27
|
end
|
|
25
28
|
end
|
|
@@ -20,6 +20,9 @@ module Candid
|
|
|
20
20
|
field :provider_commercial_license_type, lambda {
|
|
21
21
|
Candid::Commons::Types::BillingProviderCommercialLicenseType
|
|
22
22
|
}, optional: true, nullable: false
|
|
23
|
+
field :secondary_identification, lambda {
|
|
24
|
+
Candid::EncounterProviders::V2::Types::ProviderSecondaryIdentification
|
|
25
|
+
}, optional: true, nullable: false
|
|
23
26
|
end
|
|
24
27
|
end
|
|
25
28
|
end
|
data/lib/candid/encounter_providers/v_2/types/billing_provider_update_with_optional_address.rb
CHANGED
|
@@ -21,6 +21,9 @@ module Candid
|
|
|
21
21
|
field :provider_commercial_license_type, lambda {
|
|
22
22
|
Candid::Commons::Types::BillingProviderCommercialLicenseType
|
|
23
23
|
}, optional: true, nullable: false
|
|
24
|
+
field :secondary_identification, lambda {
|
|
25
|
+
Candid::EncounterProviders::V2::Types::ProviderSecondaryIdentification
|
|
26
|
+
}, optional: true, nullable: false
|
|
24
27
|
end
|
|
25
28
|
end
|
|
26
29
|
end
|
|
@@ -14,6 +14,9 @@ module Candid
|
|
|
14
14
|
field :provider_commercial_license_type, lambda {
|
|
15
15
|
Candid::Commons::Types::BillingProviderCommercialLicenseType
|
|
16
16
|
}, optional: true, nullable: false
|
|
17
|
+
field :secondary_identification, lambda {
|
|
18
|
+
Candid::EncounterProviders::V2::Types::ProviderSecondaryIdentification
|
|
19
|
+
}, optional: true, nullable: false
|
|
17
20
|
end
|
|
18
21
|
end
|
|
19
22
|
end
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Candid
|
|
4
|
+
module EncounterProviders
|
|
5
|
+
module V2
|
|
6
|
+
module Types
|
|
7
|
+
class ProviderSecondaryIdentification < Internal::Types::Model
|
|
8
|
+
field :reference_identification, -> { String }, optional: false, nullable: false
|
|
9
|
+
end
|
|
10
|
+
end
|
|
11
|
+
end
|
|
12
|
+
end
|
|
13
|
+
end
|
|
@@ -8,6 +8,9 @@ module Candid
|
|
|
8
8
|
field :npi, -> { String }, optional: false, nullable: false
|
|
9
9
|
field :taxonomy_code, -> { String }, optional: true, nullable: false
|
|
10
10
|
field :address, -> { Candid::Commons::Types::StreetAddressLongZip }, optional: true, nullable: false
|
|
11
|
+
field :secondary_identification, lambda {
|
|
12
|
+
Candid::EncounterProviders::V2::Types::ProviderSecondaryIdentification
|
|
13
|
+
}, optional: true, nullable: false
|
|
11
14
|
end
|
|
12
15
|
end
|
|
13
16
|
end
|
|
@@ -8,6 +8,9 @@ module Candid
|
|
|
8
8
|
field :npi, -> { String }, optional: true, nullable: false
|
|
9
9
|
field :taxonomy_code, -> { String }, optional: true, nullable: false
|
|
10
10
|
field :address, -> { Candid::Commons::Types::StreetAddressLongZip }, optional: true, nullable: false
|
|
11
|
+
field :secondary_identification, lambda {
|
|
12
|
+
Candid::EncounterProviders::V2::Types::ProviderSecondaryIdentification
|
|
13
|
+
}, optional: true, nullable: false
|
|
11
14
|
end
|
|
12
15
|
end
|
|
13
16
|
end
|
data/lib/candid/encounter_providers/v_2/types/rendering_provider_update_with_optional_address.rb
CHANGED
|
@@ -8,6 +8,9 @@ module Candid
|
|
|
8
8
|
field :npi, -> { String }, optional: true, nullable: false
|
|
9
9
|
field :taxonomy_code, -> { String }, optional: true, nullable: false
|
|
10
10
|
field :address, -> { Candid::Commons::Types::StreetAddressShortZipOptional }, optional: true, nullable: false
|
|
11
|
+
field :secondary_identification, lambda {
|
|
12
|
+
Candid::EncounterProviders::V2::Types::ProviderSecondaryIdentification
|
|
13
|
+
}, optional: true, nullable: false
|
|
11
14
|
end
|
|
12
15
|
end
|
|
13
16
|
end
|
|
@@ -58,6 +58,11 @@ module Candid
|
|
|
58
58
|
end
|
|
59
59
|
end
|
|
60
60
|
|
|
61
|
+
# Notice: The UB-04 Data File, 2025, is copyrighted by American Hospital Association (AHA), Chicago, Illinois.
|
|
62
|
+
# No portion of the THE UB-04 Data File, may be reproduced, stored in a retrieval system, or transmitted,
|
|
63
|
+
# in any form or by any means, electronic, mechanical, photocopying, recording, or otherwise, without prior
|
|
64
|
+
# express, written consent of AHA.
|
|
65
|
+
#
|
|
61
66
|
# @return [Candid::Encounters::V4::Types::Encounter]
|
|
62
67
|
def create_universal(request_options: {}, **params)
|
|
63
68
|
_request = Candid::Internal::JSON::Request.new(
|
|
@@ -119,6 +124,11 @@ module Candid
|
|
|
119
124
|
# Utilizing this endpoint opts you into automatic updating of the encounter when the patient or appointment is updated, assuming the
|
|
120
125
|
# encounter has not already been submitted or adjudicated.
|
|
121
126
|
#
|
|
127
|
+
# Notice: The UB-04 Data File, 2025, is copyrighted by American Hospital Association (AHA), Chicago, Illinois.
|
|
128
|
+
# No portion of the THE UB-04 Data File, may be reproduced, stored in a retrieval system, or transmitted,
|
|
129
|
+
# in any form or by any means, electronic, mechanical, photocopying, recording, or otherwise, without prior
|
|
130
|
+
# express, written consent of AHA.
|
|
131
|
+
#
|
|
122
132
|
# @return [Candid::Encounters::V4::Types::Encounter]
|
|
123
133
|
def create_from_pre_encounter_patient_universal(request_options: {}, **params)
|
|
124
134
|
_request = Candid::Internal::JSON::Request.new(
|
|
@@ -180,6 +190,11 @@ module Candid
|
|
|
180
190
|
end
|
|
181
191
|
end
|
|
182
192
|
|
|
193
|
+
# Notice: The UB-04 Data File, 2025, is copyrighted by American Hospital Association (AHA), Chicago, Illinois.
|
|
194
|
+
# No portion of the THE UB-04 Data File, may be reproduced, stored in a retrieval system, or transmitted,
|
|
195
|
+
# in any form or by any means, electronic, mechanical, photocopying, recording, or otherwise, without prior
|
|
196
|
+
# express, written consent of AHA.
|
|
197
|
+
#
|
|
183
198
|
# @return [Candid::Encounters::V4::Types::Encounter]
|
|
184
199
|
def update_universal(request_options: {}, **params)
|
|
185
200
|
_request = Candid::Internal::JSON::Request.new(
|
|
@@ -38,6 +38,9 @@ module Candid
|
|
|
38
38
|
field :other_operating_provider, lambda {
|
|
39
39
|
Candid::EncounterProviders::V2::Types::EncounterProvider
|
|
40
40
|
}, optional: true, nullable: false
|
|
41
|
+
field :related_causes_information, lambda {
|
|
42
|
+
Candid::RelatedCausesInformation::V1::Types::RelatedCausesInformation
|
|
43
|
+
}, optional: true, nullable: false
|
|
41
44
|
field :submission_expectation, lambda {
|
|
42
45
|
Candid::Encounters::V4::Types::EncounterSubmissionExpectation
|
|
43
46
|
}, optional: true, nullable: false
|
|
@@ -47,6 +47,9 @@ module Candid
|
|
|
47
47
|
Internal::Types::Array[Candid::Encounters::V4::Types::ClaimSupplementalInformation]
|
|
48
48
|
}, optional: true, nullable: false
|
|
49
49
|
field :secondary_payer_carrier_code, -> { String }, optional: true, nullable: false
|
|
50
|
+
field :related_causes_information, lambda {
|
|
51
|
+
Candid::RelatedCausesInformation::V1::Types::RelatedCausesInformationCreate
|
|
52
|
+
}, optional: true, nullable: false
|
|
50
53
|
end
|
|
51
54
|
end
|
|
52
55
|
end
|
data/lib/candid/encounters_universal/types/universal_encounter_create_from_pre_encounter_base.rb
CHANGED
|
@@ -34,6 +34,9 @@ module Candid
|
|
|
34
34
|
field :schema_instances, lambda {
|
|
35
35
|
Internal::Types::Array[Candid::CustomSchemas::V1::Types::SchemaInstance]
|
|
36
36
|
}, optional: true, nullable: false
|
|
37
|
+
field :related_causes_information, lambda {
|
|
38
|
+
Candid::RelatedCausesInformation::V1::Types::RelatedCausesInformationCreate
|
|
39
|
+
}, optional: true, nullable: false
|
|
37
40
|
end
|
|
38
41
|
end
|
|
39
42
|
end
|
|
@@ -44,6 +44,9 @@ module Candid
|
|
|
44
44
|
field :place_of_service_code_as_submitted, lambda {
|
|
45
45
|
Candid::Commons::Types::FacilityTypeCode
|
|
46
46
|
}, optional: true, nullable: false
|
|
47
|
+
field :related_causes_information, lambda {
|
|
48
|
+
Candid::RelatedCausesInformation::V1::Types::RelatedCausesInformationUpdate
|
|
49
|
+
}, optional: true, nullable: false
|
|
47
50
|
end
|
|
48
51
|
end
|
|
49
52
|
end
|
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
# frozen_string_literal: true
|
|
2
2
|
|
|
3
3
|
module Candid
|
|
4
|
-
module
|
|
4
|
+
module Events
|
|
5
5
|
class Client
|
|
6
|
-
# @return [Candid::
|
|
6
|
+
# @return [Candid::Events::Client]
|
|
7
7
|
def initialize(client:)
|
|
8
8
|
@client = client
|
|
9
9
|
end
|
|
10
10
|
|
|
11
11
|
# @return [Candid::V1::Client]
|
|
12
12
|
def v_1
|
|
13
|
-
@v_1 ||= Candid::
|
|
13
|
+
@v_1 ||= Candid::Events::V1::Client.new(client: @client)
|
|
14
14
|
end
|
|
15
15
|
end
|
|
16
16
|
end
|
|
@@ -1,28 +1,27 @@
|
|
|
1
1
|
# frozen_string_literal: true
|
|
2
2
|
|
|
3
3
|
module Candid
|
|
4
|
-
module
|
|
4
|
+
module Events
|
|
5
5
|
module V1
|
|
6
6
|
class Client
|
|
7
|
-
# @return [Candid::
|
|
7
|
+
# @return [Candid::Events::V1::Client]
|
|
8
8
|
def initialize(client:)
|
|
9
9
|
@client = client
|
|
10
10
|
end
|
|
11
11
|
|
|
12
|
-
#
|
|
12
|
+
# Scans the last 30 days of events. All results are sorted by created date, descending.
|
|
13
13
|
#
|
|
14
|
-
# @return [Candid::
|
|
15
|
-
def
|
|
14
|
+
# @return [Candid::Events::V1::Types::EventScanPage]
|
|
15
|
+
def scan(request_options: {}, **params)
|
|
16
16
|
params = Candid::Internal::Types::Utils.symbolize_keys(params)
|
|
17
|
-
_query_param_names = %i[limit
|
|
18
|
-
page_token]
|
|
17
|
+
_query_param_names = %i[page_token limit event_types created_before created_after]
|
|
19
18
|
_query = params.slice(*_query_param_names)
|
|
20
19
|
params.except(*_query_param_names)
|
|
21
20
|
|
|
22
21
|
_request = Candid::Internal::JSON::Request.new(
|
|
23
22
|
base_url: request_options[:base_url] || Candid::Environment::PRODUCTION,
|
|
24
23
|
method: "GET",
|
|
25
|
-
path: "/api/
|
|
24
|
+
path: "/api/events/v1/",
|
|
26
25
|
query: _query
|
|
27
26
|
)
|
|
28
27
|
begin
|
|
@@ -32,22 +31,19 @@ module Candid
|
|
|
32
31
|
end
|
|
33
32
|
code = _response.code.to_i
|
|
34
33
|
if code.between?(200, 299)
|
|
35
|
-
Candid::
|
|
34
|
+
Candid::Events::V1::Types::EventScanPage.load(_response.body)
|
|
36
35
|
else
|
|
37
36
|
error_class = Candid::Errors::ResponseError.subclass_for_code(code)
|
|
38
37
|
raise error_class.new(_response.body, code: code)
|
|
39
38
|
end
|
|
40
39
|
end
|
|
41
40
|
|
|
42
|
-
#
|
|
43
|
-
# If the payment does not exist, a `403` will be thrown.
|
|
44
|
-
#
|
|
45
|
-
# @return [Candid::InsurancePayments::V1::Types::InsurancePayment]
|
|
41
|
+
# @return [Candid::Events::V1::Types::Event]
|
|
46
42
|
def get(request_options: {}, **params)
|
|
47
43
|
_request = Candid::Internal::JSON::Request.new(
|
|
48
44
|
base_url: request_options[:base_url] || Candid::Environment::PRODUCTION,
|
|
49
45
|
method: "GET",
|
|
50
|
-
path: "/api/
|
|
46
|
+
path: "/api/events/v1/#{params[:event_id]}"
|
|
51
47
|
)
|
|
52
48
|
begin
|
|
53
49
|
_response = @client.send(_request)
|
|
@@ -56,7 +52,7 @@ module Candid
|
|
|
56
52
|
end
|
|
57
53
|
code = _response.code.to_i
|
|
58
54
|
if code.between?(200, 299)
|
|
59
|
-
Candid::
|
|
55
|
+
Candid::Events::V1::Types::Event.load(_response.body)
|
|
60
56
|
else
|
|
61
57
|
error_class = Candid::Errors::ResponseError.subclass_for_code(code)
|
|
62
58
|
raise error_class.new(_response.body, code: code)
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Candid
|
|
4
|
+
module Events
|
|
5
|
+
module V1
|
|
6
|
+
module Types
|
|
7
|
+
class Event < Internal::Types::Model
|
|
8
|
+
field :id, -> { String }, optional: false, nullable: false
|
|
9
|
+
field :created_at, -> { String }, optional: false, nullable: false
|
|
10
|
+
field :timestamp, -> { String }, optional: false, nullable: false
|
|
11
|
+
field :event_type, -> { String }, optional: false, nullable: false
|
|
12
|
+
field :schema_version, -> { String }, optional: false, nullable: false
|
|
13
|
+
field :payload, -> { Internal::Types::Hash[String, Object] }, optional: false, nullable: false
|
|
14
|
+
end
|
|
15
|
+
end
|
|
16
|
+
end
|
|
17
|
+
end
|
|
18
|
+
end
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Candid
|
|
4
|
+
module Events
|
|
5
|
+
module V1
|
|
6
|
+
module Types
|
|
7
|
+
class EventScanPage < Internal::Types::Model
|
|
8
|
+
field :next_page_token, -> { String }, optional: true, nullable: false
|
|
9
|
+
field :items, lambda {
|
|
10
|
+
Internal::Types::Array[Candid::Events::V1::Types::Event]
|
|
11
|
+
}, optional: false, nullable: false
|
|
12
|
+
end
|
|
13
|
+
end
|
|
14
|
+
end
|
|
15
|
+
end
|
|
16
|
+
end
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Candid
|
|
4
|
+
module Events
|
|
5
|
+
module V1
|
|
6
|
+
module Types
|
|
7
|
+
class GetEventScanRequest < Internal::Types::Model
|
|
8
|
+
field :page_token, -> { String }, optional: true, nullable: false
|
|
9
|
+
field :limit, -> { Integer }, optional: true, nullable: false
|
|
10
|
+
field :event_types, -> { String }, optional: true, nullable: false
|
|
11
|
+
field :created_before, -> { String }, optional: true, nullable: false
|
|
12
|
+
field :created_after, -> { String }, optional: true, nullable: false
|
|
13
|
+
end
|
|
14
|
+
end
|
|
15
|
+
end
|
|
16
|
+
end
|
|
17
|
+
end
|
|
@@ -134,7 +134,15 @@ module Candid
|
|
|
134
134
|
raise error_class.new(_response.body, code: code)
|
|
135
135
|
end
|
|
136
136
|
|
|
137
|
-
# Uploads a new fee schedule
|
|
137
|
+
# Uploads a new fee schedule.
|
|
138
|
+
#
|
|
139
|
+
# Each rate may either be totally new as qualified by it's dimensions or a new version for an existing rate.
|
|
140
|
+
#
|
|
141
|
+
# If adding a new version to an existing rate, the rate must be posted with the next version number (previous version + 1) or a EntityConflictError will
|
|
142
|
+
# be returned.
|
|
143
|
+
#
|
|
144
|
+
# Use the dry run flag to discover already existing rates and to run validations. If validations for any rate fail, no rates will
|
|
145
|
+
# be saved to the system.
|
|
138
146
|
#
|
|
139
147
|
# @return [Array[Candid::FeeSchedules::V3::Types::Rate]]
|
|
140
148
|
def upload_fee_schedule(request_options: {}, **params)
|
|
@@ -4,7 +4,12 @@ module Candid
|
|
|
4
4
|
module FeeSchedules
|
|
5
5
|
module V3
|
|
6
6
|
module Types
|
|
7
|
-
# Rate thresholds that determine fee schedule rate matching behavior. When a service line is adjudicated by a payer Candid determines if the payer's
|
|
7
|
+
# Rate thresholds that determine fee schedule rate matching behavior. When a service line is adjudicated by a payer Candid determines if the payer's
|
|
8
|
+
# allowed amount "matches" the rate value. If the allowed amount doesn't equal the rate value, Candid moves the claim to a PAID_INCORRECTLY state. These
|
|
9
|
+
# optional thresholds allow a user to set wiggle room to avoid claims moving to PAID_INCORRECTLY and instead have them move directly to FINALIZED_PAID
|
|
10
|
+
# when the payer's allowed amount is greater than [rate_cents - lower_threshold_cents] and less than [rate_cents + upper_threshold_cents].
|
|
11
|
+
#
|
|
12
|
+
# Additionally, a client can set disable_paid_incorrectly to avoid the PAID_INCORRECTLY claim status entirely.
|
|
8
13
|
class PayerThreshold < Internal::Types::Model
|
|
9
14
|
field :upper_threshold_cents, -> { Integer }, optional: true, nullable: false
|
|
10
15
|
field :lower_threshold_cents, -> { Integer }, optional: true, nullable: false
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Candid
|
|
4
|
+
module InsuranceAdjudications
|
|
5
|
+
class Client
|
|
6
|
+
# @return [Candid::InsuranceAdjudications::Client]
|
|
7
|
+
def initialize(client:)
|
|
8
|
+
@client = client
|
|
9
|
+
end
|
|
10
|
+
|
|
11
|
+
# @return [Candid::V1::Client]
|
|
12
|
+
def v_1
|
|
13
|
+
@v_1 ||= Candid::InsuranceAdjudications::V1::Client.new(client: @client)
|
|
14
|
+
end
|
|
15
|
+
end
|
|
16
|
+
end
|
|
17
|
+
end
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Candid
|
|
4
|
+
module InsuranceAdjudications
|
|
5
|
+
module V1
|
|
6
|
+
class Client
|
|
7
|
+
# @return [Candid::InsuranceAdjudications::V1::Client]
|
|
8
|
+
def initialize(client:)
|
|
9
|
+
@client = client
|
|
10
|
+
end
|
|
11
|
+
|
|
12
|
+
# Retrieves a previously created insurance adjudication by its `insurance_adjudication_id`.
|
|
13
|
+
#
|
|
14
|
+
# @return [Candid::InsuranceAdjudications::V1::Types::InsuranceAdjudication]
|
|
15
|
+
def get(request_options: {}, **params)
|
|
16
|
+
_request = Candid::Internal::JSON::Request.new(
|
|
17
|
+
base_url: request_options[:base_url] || Candid::Environment::PRODUCTION,
|
|
18
|
+
method: "GET",
|
|
19
|
+
path: "/api/insurance-adjudications/v1/#{params[:insurance_adjudication_id]}"
|
|
20
|
+
)
|
|
21
|
+
begin
|
|
22
|
+
_response = @client.send(_request)
|
|
23
|
+
rescue Net::HTTPRequestTimeout
|
|
24
|
+
raise Candid::Errors::TimeoutError
|
|
25
|
+
end
|
|
26
|
+
code = _response.code.to_i
|
|
27
|
+
if code.between?(200, 299)
|
|
28
|
+
Candid::InsuranceAdjudications::V1::Types::InsuranceAdjudication.load(_response.body)
|
|
29
|
+
else
|
|
30
|
+
error_class = Candid::Errors::ResponseError.subclass_for_code(code)
|
|
31
|
+
raise error_class.new(_response.body, code: code)
|
|
32
|
+
end
|
|
33
|
+
end
|
|
34
|
+
end
|
|
35
|
+
end
|
|
36
|
+
end
|
|
37
|
+
end
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Candid
|
|
4
|
+
module InsuranceAdjudications
|
|
5
|
+
module V1
|
|
6
|
+
module Types
|
|
7
|
+
class ClaimAdjudication < Internal::Types::Model
|
|
8
|
+
field :claim_id, -> { String }, optional: false, nullable: false
|
|
9
|
+
field :insurance_allowed_amount_cents, -> { Integer }, optional: true, nullable: false
|
|
10
|
+
field :insurance_paid_amount_cents, -> { Integer }, optional: true, nullable: false
|
|
11
|
+
field :charge_amount_cents, -> { Integer }, optional: true, nullable: false
|
|
12
|
+
field :service_lines, lambda {
|
|
13
|
+
Internal::Types::Hash[String, Internal::Types::Array[Candid::InsuranceAdjudications::V1::Types::ServiceLineAdjudication]]
|
|
14
|
+
}, optional: false, nullable: false
|
|
15
|
+
field :payer_claim_number, -> { String }, optional: true, nullable: false
|
|
16
|
+
field :carcs, lambda {
|
|
17
|
+
Internal::Types::Array[Candid::X12::V1::Types::ClaimAdjustmentReasonCode]
|
|
18
|
+
}, optional: false, nullable: false
|
|
19
|
+
end
|
|
20
|
+
end
|
|
21
|
+
end
|
|
22
|
+
end
|
|
23
|
+
end
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Candid
|
|
4
|
+
module InsuranceAdjudications
|
|
5
|
+
module V1
|
|
6
|
+
module Types
|
|
7
|
+
class InsuranceAdjudication < Internal::Types::Model
|
|
8
|
+
field :insurance_adjudication_id, -> { String }, optional: false, nullable: false
|
|
9
|
+
field :payer_uuid, -> { String }, optional: false, nullable: false
|
|
10
|
+
field :post_date, -> { String }, optional: true, nullable: false
|
|
11
|
+
field :check_number, -> { String }, optional: true, nullable: false
|
|
12
|
+
field :check_date, -> { String }, optional: false, nullable: false
|
|
13
|
+
field :note, -> { String }, optional: true, nullable: false
|
|
14
|
+
field :claims, lambda {
|
|
15
|
+
Internal::Types::Hash[String, Internal::Types::Array[Candid::InsuranceAdjudications::V1::Types::ClaimAdjudication]]
|
|
16
|
+
}, optional: false, nullable: false
|
|
17
|
+
end
|
|
18
|
+
end
|
|
19
|
+
end
|
|
20
|
+
end
|
|
21
|
+
end
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Candid
|
|
4
|
+
module InsuranceAdjudications
|
|
5
|
+
module V1
|
|
6
|
+
module Types
|
|
7
|
+
class ServiceLineAdjudication < Internal::Types::Model
|
|
8
|
+
field :service_line_adjudication_id, -> { String }, optional: false, nullable: false
|
|
9
|
+
field :denial_reason, lambda {
|
|
10
|
+
Candid::ServiceLines::V2::Types::DenialReasonContent
|
|
11
|
+
}, optional: true, nullable: false
|
|
12
|
+
field :insurance_allowed_amount_cents, -> { Integer }, optional: true, nullable: false
|
|
13
|
+
field :insurance_paid_amount_cents, -> { Integer }, optional: true, nullable: false
|
|
14
|
+
field :deductible_amount_cents, -> { Integer }, optional: true, nullable: false
|
|
15
|
+
field :coinsurance_amount_cents, -> { Integer }, optional: true, nullable: false
|
|
16
|
+
field :copay_amount_cents, -> { Integer }, optional: true, nullable: false
|
|
17
|
+
field :carcs, lambda {
|
|
18
|
+
Internal::Types::Array[Candid::X12::V1::Types::ClaimAdjustmentReasonCode]
|
|
19
|
+
}, optional: false, nullable: false
|
|
20
|
+
field :rarcs, lambda {
|
|
21
|
+
Internal::Types::Array[Candid::X12::V1::Types::RemittanceAdviceRemarkCode]
|
|
22
|
+
}, optional: false, nullable: false
|
|
23
|
+
end
|
|
24
|
+
end
|
|
25
|
+
end
|
|
26
|
+
end
|
|
27
|
+
end
|
|
@@ -9,8 +9,6 @@ module Candid
|
|
|
9
9
|
@client = client
|
|
10
10
|
end
|
|
11
11
|
|
|
12
|
-
# NOTE: This service is in-development and can only be used by select partners. Please contact Candid Health to request access.
|
|
13
|
-
#
|
|
14
12
|
# Retrieve a list of inventory records based on the provided filters. Each inventory record provides the latest invoiceable status of the associated claim.
|
|
15
13
|
# The response is paginated, and the `page_token` can be used to retrieve subsequent pages. Initial requests should not include `page_token`.
|
|
16
14
|
#
|
|
@@ -41,8 +39,6 @@ module Candid
|
|
|
41
39
|
end
|
|
42
40
|
end
|
|
43
41
|
|
|
44
|
-
# NOTE: This service is in-development and can only be used by select partners. Please contact Candid Health to request access.
|
|
45
|
-
#
|
|
46
42
|
# Provides detailed itemization of invoice data for a specific claim.
|
|
47
43
|
#
|
|
48
44
|
# @return [Candid::PatientAr::V1::Types::InvoiceItemizationResponse]
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Candid
|
|
4
|
+
module PatientPayments
|
|
5
|
+
module V4
|
|
6
|
+
module Types
|
|
7
|
+
class CheckPaymentMethod < Internal::Types::Model
|
|
8
|
+
field :check_number, -> { String }, optional: false, nullable: false
|
|
9
|
+
end
|
|
10
|
+
end
|
|
11
|
+
end
|
|
12
|
+
end
|
|
13
|
+
end
|
|
@@ -19,6 +19,9 @@ module Candid
|
|
|
19
19
|
Internal::Types::Array[Candid::Financials::Types::Allocation]
|
|
20
20
|
}, optional: false, nullable: false
|
|
21
21
|
field :invoice, -> { String }, optional: true, nullable: false
|
|
22
|
+
field :payment_method_detail, lambda {
|
|
23
|
+
Candid::PatientPayments::V4::Types::PaymentMethodDetail
|
|
24
|
+
}, optional: true, nullable: false
|
|
22
25
|
end
|
|
23
26
|
end
|
|
24
27
|
end
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Candid
|
|
4
|
+
module PatientPayments
|
|
5
|
+
module V4
|
|
6
|
+
module Types
|
|
7
|
+
class PaymentMethod < Internal::Types::Model
|
|
8
|
+
extend Candid::Internal::Types::Union
|
|
9
|
+
|
|
10
|
+
discriminant :type
|
|
11
|
+
|
|
12
|
+
member -> { Candid::PatientPayments::V4::Types::CashPaymentMethod }, key: "CASH"
|
|
13
|
+
member -> { Candid::PatientPayments::V4::Types::CheckPaymentMethod }, key: "CHECK"
|
|
14
|
+
member -> { Candid::PatientPayments::V4::Types::CardPaymentMethod }, key: "CARD"
|
|
15
|
+
end
|
|
16
|
+
end
|
|
17
|
+
end
|
|
18
|
+
end
|
|
19
|
+
end
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Candid
|
|
4
|
+
module PatientPayments
|
|
5
|
+
module V4
|
|
6
|
+
module Types
|
|
7
|
+
class PaymentMethodDetail < Internal::Types::Model
|
|
8
|
+
field :payment_method, lambda {
|
|
9
|
+
Candid::PatientPayments::V4::Types::PaymentMethod
|
|
10
|
+
}, optional: false, nullable: false
|
|
11
|
+
field :collected_at_address, lambda {
|
|
12
|
+
Candid::Commons::Types::StreetAddressShortZip
|
|
13
|
+
}, optional: true, nullable: false
|
|
14
|
+
end
|
|
15
|
+
end
|
|
16
|
+
end
|
|
17
|
+
end
|
|
18
|
+
end
|
|
@@ -21,6 +21,8 @@ module Candid
|
|
|
21
21
|
field :encounter, lambda {
|
|
22
22
|
Candid::PreEncounter::EligibilityChecks::V1::Types::Encounter
|
|
23
23
|
}, optional: true, nullable: false
|
|
24
|
+
field :get_existing_check_initiated_after, -> { String }, optional: true, nullable: false
|
|
25
|
+
field :source, -> { String }, optional: true, nullable: false
|
|
24
26
|
end
|
|
25
27
|
end
|
|
26
28
|
end
|