candidhealth 1.14.3 → 1.17.3
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_create.rb +1 -0
- data/lib/candid/financials/types/allocation_earmark_type.rb +19 -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 +56 -36
- data/reference.md +515 -363
- metadata +54 -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
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Candid
|
|
4
|
+
module Contracts
|
|
5
|
+
module V3
|
|
6
|
+
module Types
|
|
7
|
+
class ProfessionalContract < 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 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
|
|
@@ -9,44 +9,6 @@ module Candid
|
|
|
9
9
|
@client = client
|
|
10
10
|
end
|
|
11
11
|
|
|
12
|
-
# <Tip>Candid is deprecating support for this endpoint. It is instead recommended to use [Candid's Stedi passthrough endpoint](https://docs.joincandidhealth.com/api-reference/pre-encounter/eligibility-checks/v-1/post).
|
|
13
|
-
# For assistance with the transition, please reference the [Transitioning to Candid's New Eligibility Endpoint](https://support.joincandidhealth.com/hc/en-us/articles/34918552872980) document in the Candid Support Center.</Tip>
|
|
14
|
-
#
|
|
15
|
-
# This API is a wrapper around Change Healthcare's eligibility API. Below are some helpful documentation links:
|
|
16
|
-
#
|
|
17
|
-
# - [Change Healthcare - Guides: Contents of the Eligibility Request Body](https://developers.changehealthcare.com/eligibilityandclaims/docs/contents-of-the-eligibility-request-body)
|
|
18
|
-
# - [Change Healthcare - Guides: Use "Bare Minimum" Eligibility Requests](https://developers.changehealthcare.com/eligibilityandclaims/docs/use-bare-minimum-eligibility-requests)
|
|
19
|
-
# - [Change Healthcare - Guides: Contents of the Eligibility Response](https://developers.changehealthcare.com/eligibilityandclaims/docs/contents-of-the-eligibility-response)
|
|
20
|
-
# - [Change Healthcare - Guides: Eligibility JSON-to-EDI API Contents](https://developers.changehealthcare.com/eligibilityandclaims/docs/eligibility-json-to-edi-api-contents)
|
|
21
|
-
# - [Change Healthcare - Guides: Eligibility Error Messages](https://developers.changehealthcare.com/eligibilityandclaims/docs/eligibility-error-messages)
|
|
22
|
-
# - [Change Healthcare - Guides: FAQ](https://developers.changehealthcare.com/eligibilityandclaims/docs/frequently-asked-questions)
|
|
23
|
-
# - [Change Healthcare - Guides: Eligibility FAQs](https://developers.changehealthcare.com/eligibilityandclaims/docs/eligibility-api-requests)
|
|
24
|
-
# - [Change Healthcare - Guides: Sandbox API Values and Test Responses](https://developers.changehealthcare.com/eligibilityandclaims/docs/eligibility-sandbox-api-values-and-test-responses)
|
|
25
|
-
# - [Change Healthcare - Guides: Sandbox Predefined Fields and Values](https://developers.changehealthcare.com/eligibilityandclaims/docs/sandbox-predefined-fields-and-values)
|
|
26
|
-
# - [Change Healthcare - Guides: Using Test Payers in the Sandbox](https://developers.changehealthcare.com/eligibilityandclaims/docs/use-the-test-payers-in-the-sandbox-api)
|
|
27
|
-
#
|
|
28
|
-
# A schema of the response object can be found here: [Change Healthcare Docs](https://developers.changehealthcare.com/eligibilityandclaims/reference/medicaleligibility)
|
|
29
|
-
#
|
|
30
|
-
# @return [Hash[String, Object]]
|
|
31
|
-
def submit_eligibility_check(request_options: {}, **params)
|
|
32
|
-
_request = Candid::Internal::JSON::Request.new(
|
|
33
|
-
base_url: request_options[:base_url] || Candid::Environment::PRODUCTION,
|
|
34
|
-
method: "POST",
|
|
35
|
-
path: "/api/eligibility/v2",
|
|
36
|
-
body: params
|
|
37
|
-
)
|
|
38
|
-
begin
|
|
39
|
-
_response = @client.send(_request)
|
|
40
|
-
rescue Net::HTTPRequestTimeout
|
|
41
|
-
raise Candid::Errors::TimeoutError
|
|
42
|
-
end
|
|
43
|
-
code = _response.code.to_i
|
|
44
|
-
return if code.between?(200, 299)
|
|
45
|
-
|
|
46
|
-
error_class = Candid::Errors::ResponseError.subclass_for_code(code)
|
|
47
|
-
raise error_class.new(_response.body, code: code)
|
|
48
|
-
end
|
|
49
|
-
|
|
50
12
|
# <Tip>Candid is deprecating support for this endpoint. It is instead recommended to use [Candid's Stedi passthrough endpoint](https://docs.joincandidhealth.com/api-reference/pre-encounter/eligibility-checks/v-1/post).
|
|
51
13
|
# For assistance with the transition, please reference the [Transitioning to Candid's New Eligibility Endpoint](https://support.joincandidhealth.com/hc/en-us/articles/34918552872980) document in the Candid Support Center.</Tip>
|
|
52
14
|
#
|
|
@@ -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,16 @@
|
|
|
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
|
+
field :reference_identification_qualifier, lambda {
|
|
10
|
+
Candid::EncounterProviders::V2::Types::ProviderSecondaryIdentificationQualifier
|
|
11
|
+
}, optional: true, nullable: false
|
|
12
|
+
end
|
|
13
|
+
end
|
|
14
|
+
end
|
|
15
|
+
end
|
|
16
|
+
end
|
|
@@ -1,15 +1,14 @@
|
|
|
1
1
|
# frozen_string_literal: true
|
|
2
2
|
|
|
3
3
|
module Candid
|
|
4
|
-
module
|
|
4
|
+
module EncounterProviders
|
|
5
5
|
module V2
|
|
6
6
|
module Types
|
|
7
|
-
module
|
|
7
|
+
module ProviderSecondaryIdentificationQualifier
|
|
8
8
|
extend Candid::Internal::Types::Enum
|
|
9
9
|
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
COMMERCIAL = "commercial"
|
|
10
|
+
G_2 = "G2"
|
|
11
|
+
LU = "LU"
|
|
13
12
|
end
|
|
14
13
|
end
|
|
15
14
|
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
|
|
@@ -73,6 +73,9 @@ module Candid
|
|
|
73
73
|
field :pay_to_address, lambda {
|
|
74
74
|
Candid::Commons::Types::StreetAddressShortZipOptional
|
|
75
75
|
}, optional: true, nullable: false
|
|
76
|
+
field :related_causes_information, lambda {
|
|
77
|
+
Candid::RelatedCausesInformation::V1::Types::RelatedCausesInformationCreate
|
|
78
|
+
}, optional: true, nullable: false
|
|
76
79
|
end
|
|
77
80
|
end
|
|
78
81
|
end
|
|
@@ -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
|
|
@@ -8,6 +8,7 @@ module Candid
|
|
|
8
8
|
class AllocationCreate < Internal::Types::Model
|
|
9
9
|
field :amount_cents, -> { Integer }, optional: false, nullable: false
|
|
10
10
|
field :target, -> { Candid::Financials::Types::AllocationTargetCreate }, optional: false, nullable: false
|
|
11
|
+
field :earmark, -> { Candid::Financials::Types::AllocationEarmarkType }, optional: true, nullable: false
|
|
11
12
|
end
|
|
12
13
|
end
|
|
13
14
|
end
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Candid
|
|
4
|
+
module Financials
|
|
5
|
+
module Types
|
|
6
|
+
# CURRENTLY UNIMPLEMENTED - Defines how a patient prepayment allocation should be earmarked for future auto-allocation.
|
|
7
|
+
# When implemented, earmarks will hold the allocation until a matching encounter is created, then attempt to allocate to that encounter.
|
|
8
|
+
# Only applicable for unattributed allocations.
|
|
9
|
+
class AllocationEarmarkType < Internal::Types::Model
|
|
10
|
+
extend Candid::Internal::Types::Union
|
|
11
|
+
|
|
12
|
+
discriminant :type
|
|
13
|
+
|
|
14
|
+
member -> { String }, key: "DATE_OF_SERVICE"
|
|
15
|
+
member -> { String }, key: "EXTERNAL_ENCOUNTER_ID"
|
|
16
|
+
end
|
|
17
|
+
end
|
|
18
|
+
end
|
|
19
|
+
end
|
|
@@ -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
|
|
@@ -1,23 +1,22 @@
|
|
|
1
1
|
# frozen_string_literal: true
|
|
2
2
|
|
|
3
3
|
module Candid
|
|
4
|
-
module
|
|
4
|
+
module InsuranceAdjudications
|
|
5
5
|
module V1
|
|
6
6
|
class Client
|
|
7
|
-
# @return [Candid::
|
|
7
|
+
# @return [Candid::InsuranceAdjudications::V1::Client]
|
|
8
8
|
def initialize(client:)
|
|
9
9
|
@client = client
|
|
10
10
|
end
|
|
11
11
|
|
|
12
|
-
#
|
|
12
|
+
# Retrieves a previously created insurance adjudication by its `insurance_adjudication_id`.
|
|
13
13
|
#
|
|
14
|
-
# @return [Candid::
|
|
15
|
-
def
|
|
14
|
+
# @return [Candid::InsuranceAdjudications::V1::Types::InsuranceAdjudication]
|
|
15
|
+
def get(request_options: {}, **params)
|
|
16
16
|
_request = Candid::Internal::JSON::Request.new(
|
|
17
17
|
base_url: request_options[:base_url] || Candid::Environment::PRODUCTION,
|
|
18
|
-
method: "
|
|
19
|
-
path: "/api/
|
|
20
|
-
body: params
|
|
18
|
+
method: "GET",
|
|
19
|
+
path: "/api/insurance-adjudications/v1/#{params[:insurance_adjudication_id]}"
|
|
21
20
|
)
|
|
22
21
|
begin
|
|
23
22
|
_response = @client.send(_request)
|
|
@@ -26,7 +25,7 @@ module Candid
|
|
|
26
25
|
end
|
|
27
26
|
code = _response.code.to_i
|
|
28
27
|
if code.between?(200, 299)
|
|
29
|
-
Candid::
|
|
28
|
+
Candid::InsuranceAdjudications::V1::Types::InsuranceAdjudication.load(_response.body)
|
|
30
29
|
else
|
|
31
30
|
error_class = Candid::Errors::ResponseError.subclass_for_code(code)
|
|
32
31
|
raise error_class.new(_response.body, code: code)
|
|
@@ -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
|