candidhealth 0.46.1 → 1.0.0
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/candidhealth/charge_capture/v_1/client.rb +0 -42
- data/lib/candidhealth/pre_encounter/coverages/v_1/client.rb +13 -13
- data/lib/candidhealth/pre_encounter/coverages/v_1/types/coverage.rb +4 -4
- data/lib/candidhealth/pre_encounter/coverages/v_1/types/coverage_eligibility_check_response.rb +10 -10
- data/lib/candidhealth/pre_encounter/coverages/v_1/types/latest_eligibility_check.rb +4 -4
- data/lib/candidhealth/pre_encounter/coverages/v_1/types/mutable_coverage.rb +4 -4
- data/lib/candidhealth/pre_encounter/eligibility_checks/v_1/client.rb +140 -0
- data/lib/candidhealth/pre_encounter/eligibility_checks/v_1/types/batch_eligibility_response.rb +75 -0
- data/lib/candidhealth/pre_encounter/eligibility_checks/v_1/types/eligibility_check.rb +18 -6
- data/lib/candidhealth/pre_encounter/eligibility_checks/v_1/types/eligibility_check_error.rb +80 -0
- data/lib/candidhealth/pre_encounter/eligibility_checks/v_1/types/eligibility_check_error_details.rb +112 -0
- data/lib/candidhealth/pre_encounter/eligibility_checks/v_1/types/eligibility_check_error_source.rb +17 -0
- data/lib/candidhealth/pre_encounter/{coverages → eligibility_checks}/v_1/types/eligibility_check_metadata.rb +7 -7
- data/lib/candidhealth/pre_encounter/eligibility_checks/v_1/types/eligibility_check_page.rb +98 -0
- data/lib/candidhealth/pre_encounter/{coverages → eligibility_checks}/v_1/types/eligibility_check_status.rb +2 -2
- data/lib/candidhealth/pre_encounter/eligibility_checks/v_1/types/eligibility_request.rb +18 -2
- data/lib/candidhealth/pre_encounter/{coverages → eligibility_checks}/v_1/types/eligibility_status.rb +2 -1
- data/lib/candidhealth/pre_encounter/eligibility_checks/v_1/types/parsed_response.rb +4 -4
- data/lib/candidhealth/service_lines/v_2/types/denial_reason_content.rb +1 -0
- data/lib/requests.rb +2 -2
- data/lib/types_export.rb +9 -5
- metadata +10 -6
- data/lib/candidhealth/pre_encounter/coverages/v_1/types/eligibility_check.rb +0 -116
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 4f868bf7b309865d90b80b86f1c481bb4332470a818f4c34f3409d0971c232d6
|
4
|
+
data.tar.gz: 70f0ba670c33dd3faacddae0def3762f4c78fdeaa97ba7b8b69a70cc8ec3fe2d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 45c5d503333e8e147676e0df484950fbe32a5e9180dd7e42bd76cb33442484d0fb927e3fe05ad01b306833df05fdb18ad16bf22c258e1c1e3296de6808c21f3f
|
7
|
+
data.tar.gz: a07e310b0488f7815791086cec079aeb0a68401342a256f38bc4aaaa37d31522b7808391a6707cfcd5a065d0c81b481d83e3a6c6176f22b0ffc86fd1ac9937eb
|
@@ -318,26 +318,6 @@ module CandidApiClient
|
|
318
318
|
CandidApiClient::ChargeCapture::V1::Types::ChargeCapture.from_json(json_object: response.body)
|
319
319
|
end
|
320
320
|
|
321
|
-
# @param charge_capture_id [String]
|
322
|
-
# @param request_options [CandidApiClient::RequestOptions]
|
323
|
-
# @return [Void]
|
324
|
-
# @example
|
325
|
-
# api = CandidApiClient::Client.new(base_url: "https://api.example.com", environment: CandidApiClient::Environment::PRODUCTION)
|
326
|
-
# api.charge_capture.v_1.delete(charge_capture_id: "d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32")
|
327
|
-
def delete(charge_capture_id:, request_options: nil)
|
328
|
-
@request_client.conn.delete do |req|
|
329
|
-
req.options.timeout = request_options.timeout_in_seconds unless request_options&.timeout_in_seconds.nil?
|
330
|
-
req.headers["Authorization"] = request_options.token unless request_options&.token.nil?
|
331
|
-
req.headers = {
|
332
|
-
**(req.headers || {}),
|
333
|
-
**@request_client.get_headers,
|
334
|
-
**(request_options&.additional_headers || {})
|
335
|
-
}.compact
|
336
|
-
req.url "#{@request_client.get_url(environment: CandidApi,
|
337
|
-
request_options: request_options)}/api/charge_captures/v1/#{charge_capture_id}"
|
338
|
-
end
|
339
|
-
end
|
340
|
-
|
341
321
|
# @param charge_capture_id [String]
|
342
322
|
# @param data [Hash] Request of type CandidApiClient::ChargeCapture::V1::Types::ChargeCaptureData, as a Hash
|
343
323
|
# * :diagnoses (Array<CandidApiClient::Diagnoses::Types::DiagnosisCreate>)
|
@@ -1102,28 +1082,6 @@ module CandidApiClient
|
|
1102
1082
|
end
|
1103
1083
|
end
|
1104
1084
|
|
1105
|
-
# @param charge_capture_id [String]
|
1106
|
-
# @param request_options [CandidApiClient::RequestOptions]
|
1107
|
-
# @return [Void]
|
1108
|
-
# @example
|
1109
|
-
# api = CandidApiClient::Client.new(base_url: "https://api.example.com", environment: CandidApiClient::Environment::PRODUCTION)
|
1110
|
-
# api.charge_capture.v_1.delete(charge_capture_id: "d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32")
|
1111
|
-
def delete(charge_capture_id:, request_options: nil)
|
1112
|
-
Async do
|
1113
|
-
@request_client.conn.delete do |req|
|
1114
|
-
req.options.timeout = request_options.timeout_in_seconds unless request_options&.timeout_in_seconds.nil?
|
1115
|
-
req.headers["Authorization"] = request_options.token unless request_options&.token.nil?
|
1116
|
-
req.headers = {
|
1117
|
-
**(req.headers || {}),
|
1118
|
-
**@request_client.get_headers,
|
1119
|
-
**(request_options&.additional_headers || {})
|
1120
|
-
}.compact
|
1121
|
-
req.url "#{@request_client.get_url(environment: CandidApi,
|
1122
|
-
request_options: request_options)}/api/charge_captures/v1/#{charge_capture_id}"
|
1123
|
-
end
|
1124
|
-
end
|
1125
|
-
end
|
1126
|
-
|
1127
1085
|
# @param charge_capture_id [String]
|
1128
1086
|
# @param data [Hash] Request of type CandidApiClient::ChargeCapture::V1::Types::ChargeCaptureData, as a Hash
|
1129
1087
|
# * :diagnoses (Array<CandidApiClient::Diagnoses::Types::DiagnosisCreate>)
|
@@ -8,7 +8,7 @@ require "json"
|
|
8
8
|
require "date"
|
9
9
|
require_relative "types/payer_plan_group_fields"
|
10
10
|
require_relative "types/service_type_code"
|
11
|
-
require_relative "types/eligibility_check_metadata"
|
11
|
+
require_relative "../../eligibility_checks/v_1/types/eligibility_check_metadata"
|
12
12
|
require_relative "types/coverage_eligibility_check_response"
|
13
13
|
require "async"
|
14
14
|
|
@@ -76,10 +76,10 @@ module CandidApiClient
|
|
76
76
|
# * :insurance_card_image_locator (String)
|
77
77
|
# * :payer_plan_group_id (String)
|
78
78
|
# * :verified (Boolean)
|
79
|
-
# * :eligibility_checks (Array<CandidApiClient::PreEncounter::
|
79
|
+
# * :eligibility_checks (Array<CandidApiClient::PreEncounter::EligibilityChecks::V1::Types::EligibilityCheckMetadata>)
|
80
80
|
# * :latest_eligibility_check (Hash)
|
81
81
|
# * :check_id (String)
|
82
|
-
# * :status (CandidApiClient::PreEncounter::
|
82
|
+
# * :status (CandidApiClient::PreEncounter::EligibilityChecks::V1::Types::EligibilityStatus)
|
83
83
|
# * :initiated_at (DateTime)
|
84
84
|
# * :benefits (Hash)
|
85
85
|
# * :plan_coverage (Hash)
|
@@ -242,10 +242,10 @@ module CandidApiClient
|
|
242
242
|
# * :insurance_card_image_locator (String)
|
243
243
|
# * :payer_plan_group_id (String)
|
244
244
|
# * :verified (Boolean)
|
245
|
-
# * :eligibility_checks (Array<CandidApiClient::PreEncounter::
|
245
|
+
# * :eligibility_checks (Array<CandidApiClient::PreEncounter::EligibilityChecks::V1::Types::EligibilityCheckMetadata>)
|
246
246
|
# * :latest_eligibility_check (Hash)
|
247
247
|
# * :check_id (String)
|
248
|
-
# * :status (CandidApiClient::PreEncounter::
|
248
|
+
# * :status (CandidApiClient::PreEncounter::EligibilityChecks::V1::Types::EligibilityStatus)
|
249
249
|
# * :initiated_at (DateTime)
|
250
250
|
# * :benefits (Hash)
|
251
251
|
# * :plan_coverage (Hash)
|
@@ -542,7 +542,7 @@ module CandidApiClient
|
|
542
542
|
# @param date_of_service [Date]
|
543
543
|
# @param npi [String]
|
544
544
|
# @param request_options [CandidApiClient::RequestOptions]
|
545
|
-
# @return [CandidApiClient::PreEncounter::
|
545
|
+
# @return [CandidApiClient::PreEncounter::EligibilityChecks::V1::Types::EligibilityCheckMetadata]
|
546
546
|
# @example
|
547
547
|
# api = CandidApiClient::Client.new(base_url: "https://api.example.com", environment: CandidApiClient::Environment::PRODUCTION)
|
548
548
|
# api.pre_encounter.coverages.v_1.check_eligibility(
|
@@ -569,7 +569,7 @@ module CandidApiClient
|
|
569
569
|
req.url "#{@request_client.get_url(environment: PreEncounter,
|
570
570
|
request_options: request_options)}/coverages/v1/#{id}/eligibility"
|
571
571
|
end
|
572
|
-
CandidApiClient::PreEncounter::
|
572
|
+
CandidApiClient::PreEncounter::EligibilityChecks::V1::Types::EligibilityCheckMetadata.from_json(json_object: response.body)
|
573
573
|
end
|
574
574
|
|
575
575
|
# Gets the eligibility of a patient for a specific coverage if successful.
|
@@ -657,10 +657,10 @@ module CandidApiClient
|
|
657
657
|
# * :insurance_card_image_locator (String)
|
658
658
|
# * :payer_plan_group_id (String)
|
659
659
|
# * :verified (Boolean)
|
660
|
-
# * :eligibility_checks (Array<CandidApiClient::PreEncounter::
|
660
|
+
# * :eligibility_checks (Array<CandidApiClient::PreEncounter::EligibilityChecks::V1::Types::EligibilityCheckMetadata>)
|
661
661
|
# * :latest_eligibility_check (Hash)
|
662
662
|
# * :check_id (String)
|
663
|
-
# * :status (CandidApiClient::PreEncounter::
|
663
|
+
# * :status (CandidApiClient::PreEncounter::EligibilityChecks::V1::Types::EligibilityStatus)
|
664
664
|
# * :initiated_at (DateTime)
|
665
665
|
# * :benefits (Hash)
|
666
666
|
# * :plan_coverage (Hash)
|
@@ -825,10 +825,10 @@ module CandidApiClient
|
|
825
825
|
# * :insurance_card_image_locator (String)
|
826
826
|
# * :payer_plan_group_id (String)
|
827
827
|
# * :verified (Boolean)
|
828
|
-
# * :eligibility_checks (Array<CandidApiClient::PreEncounter::
|
828
|
+
# * :eligibility_checks (Array<CandidApiClient::PreEncounter::EligibilityChecks::V1::Types::EligibilityCheckMetadata>)
|
829
829
|
# * :latest_eligibility_check (Hash)
|
830
830
|
# * :check_id (String)
|
831
|
-
# * :status (CandidApiClient::PreEncounter::
|
831
|
+
# * :status (CandidApiClient::PreEncounter::EligibilityChecks::V1::Types::EligibilityStatus)
|
832
832
|
# * :initiated_at (DateTime)
|
833
833
|
# * :benefits (Hash)
|
834
834
|
# * :plan_coverage (Hash)
|
@@ -1142,7 +1142,7 @@ module CandidApiClient
|
|
1142
1142
|
# @param date_of_service [Date]
|
1143
1143
|
# @param npi [String]
|
1144
1144
|
# @param request_options [CandidApiClient::RequestOptions]
|
1145
|
-
# @return [CandidApiClient::PreEncounter::
|
1145
|
+
# @return [CandidApiClient::PreEncounter::EligibilityChecks::V1::Types::EligibilityCheckMetadata]
|
1146
1146
|
# @example
|
1147
1147
|
# api = CandidApiClient::Client.new(base_url: "https://api.example.com", environment: CandidApiClient::Environment::PRODUCTION)
|
1148
1148
|
# api.pre_encounter.coverages.v_1.check_eligibility(
|
@@ -1170,7 +1170,7 @@ module CandidApiClient
|
|
1170
1170
|
req.url "#{@request_client.get_url(environment: PreEncounter,
|
1171
1171
|
request_options: request_options)}/coverages/v1/#{id}/eligibility"
|
1172
1172
|
end
|
1173
|
-
CandidApiClient::PreEncounter::
|
1173
|
+
CandidApiClient::PreEncounter::EligibilityChecks::V1::Types::EligibilityCheckMetadata.from_json(json_object: response.body)
|
1174
1174
|
end
|
1175
1175
|
end
|
1176
1176
|
|
@@ -5,7 +5,7 @@ require_relative "coverage_status"
|
|
5
5
|
require_relative "subscriber"
|
6
6
|
require_relative "../../../common/types/relationship"
|
7
7
|
require_relative "insurance_plan"
|
8
|
-
require_relative "eligibility_check_metadata"
|
8
|
+
require_relative "../../../eligibility_checks/v_1/types/eligibility_check_metadata"
|
9
9
|
require_relative "latest_eligibility_check"
|
10
10
|
require_relative "coverage_benefits"
|
11
11
|
require "ostruct"
|
@@ -47,7 +47,7 @@ module CandidApiClient
|
|
47
47
|
attr_reader :insurance_plan
|
48
48
|
# @return [Boolean] A boolean indicating if the coverage has been verified by a user.
|
49
49
|
attr_reader :verified
|
50
|
-
# @return [Array<CandidApiClient::PreEncounter::
|
50
|
+
# @return [Array<CandidApiClient::PreEncounter::EligibilityChecks::V1::Types::EligibilityCheckMetadata>] A list of eligibility check metadata that have been initiated on this coverage.
|
51
51
|
attr_reader :eligibility_checks
|
52
52
|
# @return [CandidApiClient::PreEncounter::Coverages::V1::Types::LatestEligibilityCheck] The latest eligibility check metadata that has been initiated on this coverage.
|
53
53
|
attr_reader :latest_eligibility_check
|
@@ -78,7 +78,7 @@ module CandidApiClient
|
|
78
78
|
# @param patient [String] The patient who benefits from the insurance coverage
|
79
79
|
# @param insurance_plan [CandidApiClient::PreEncounter::Coverages::V1::Types::InsurancePlan]
|
80
80
|
# @param verified [Boolean] A boolean indicating if the coverage has been verified by a user.
|
81
|
-
# @param eligibility_checks [Array<CandidApiClient::PreEncounter::
|
81
|
+
# @param eligibility_checks [Array<CandidApiClient::PreEncounter::EligibilityChecks::V1::Types::EligibilityCheckMetadata>] A list of eligibility check metadata that have been initiated on this coverage.
|
82
82
|
# @param latest_eligibility_check [CandidApiClient::PreEncounter::Coverages::V1::Types::LatestEligibilityCheck] The latest eligibility check metadata that has been initiated on this coverage.
|
83
83
|
# @param benefits [CandidApiClient::PreEncounter::Coverages::V1::Types::CoverageBenefits] The eligibility of the patient for the coverage, manually verified by users.
|
84
84
|
# @param additional_properties [OpenStruct] Additional properties unmapped to the current class definition
|
@@ -153,7 +153,7 @@ module CandidApiClient
|
|
153
153
|
verified = struct["verified"]
|
154
154
|
eligibility_checks = parsed_json["eligibility_checks"]&.map do |item|
|
155
155
|
item = item.to_json
|
156
|
-
CandidApiClient::PreEncounter::
|
156
|
+
CandidApiClient::PreEncounter::EligibilityChecks::V1::Types::EligibilityCheckMetadata.from_json(json_object: item)
|
157
157
|
end
|
158
158
|
if parsed_json["latest_eligibility_check"].nil?
|
159
159
|
latest_eligibility_check = nil
|
data/lib/candidhealth/pre_encounter/coverages/v_1/types/coverage_eligibility_check_response.rb
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
|
-
require_relative "eligibility_check_metadata"
|
4
|
-
require_relative "eligibility_check"
|
3
|
+
require_relative "../../../eligibility_checks/v_1/types/eligibility_check_metadata"
|
4
|
+
require_relative "../../../eligibility_checks/v_1/types/eligibility_check"
|
5
5
|
require "ostruct"
|
6
6
|
require "json"
|
7
7
|
|
@@ -11,9 +11,9 @@ module CandidApiClient
|
|
11
11
|
module V1
|
12
12
|
module Types
|
13
13
|
class CoverageEligibilityCheckResponse
|
14
|
-
# @return [CandidApiClient::PreEncounter::
|
14
|
+
# @return [CandidApiClient::PreEncounter::EligibilityChecks::V1::Types::EligibilityCheckMetadata]
|
15
15
|
attr_reader :metadata
|
16
|
-
# @return [CandidApiClient::PreEncounter::
|
16
|
+
# @return [CandidApiClient::PreEncounter::EligibilityChecks::V1::Types::EligibilityCheck]
|
17
17
|
attr_reader :check
|
18
18
|
# @return [OpenStruct] Additional properties unmapped to the current class definition
|
19
19
|
attr_reader :additional_properties
|
@@ -23,8 +23,8 @@ module CandidApiClient
|
|
23
23
|
|
24
24
|
OMIT = Object.new
|
25
25
|
|
26
|
-
# @param metadata [CandidApiClient::PreEncounter::
|
27
|
-
# @param check [CandidApiClient::PreEncounter::
|
26
|
+
# @param metadata [CandidApiClient::PreEncounter::EligibilityChecks::V1::Types::EligibilityCheckMetadata]
|
27
|
+
# @param check [CandidApiClient::PreEncounter::EligibilityChecks::V1::Types::EligibilityCheck]
|
28
28
|
# @param additional_properties [OpenStruct] Additional properties unmapped to the current class definition
|
29
29
|
# @return [CandidApiClient::PreEncounter::Coverages::V1::Types::CoverageEligibilityCheckResponse]
|
30
30
|
def initialize(metadata:, check: OMIT, additional_properties: nil)
|
@@ -47,13 +47,13 @@ module CandidApiClient
|
|
47
47
|
metadata = nil
|
48
48
|
else
|
49
49
|
metadata = parsed_json["metadata"].to_json
|
50
|
-
metadata = CandidApiClient::PreEncounter::
|
50
|
+
metadata = CandidApiClient::PreEncounter::EligibilityChecks::V1::Types::EligibilityCheckMetadata.from_json(json_object: metadata)
|
51
51
|
end
|
52
52
|
if parsed_json["check"].nil?
|
53
53
|
check = nil
|
54
54
|
else
|
55
55
|
check = parsed_json["check"].to_json
|
56
|
-
check = CandidApiClient::PreEncounter::
|
56
|
+
check = CandidApiClient::PreEncounter::EligibilityChecks::V1::Types::EligibilityCheck.from_json(json_object: check)
|
57
57
|
end
|
58
58
|
new(
|
59
59
|
metadata: metadata,
|
@@ -76,8 +76,8 @@ module CandidApiClient
|
|
76
76
|
# @param obj [Object]
|
77
77
|
# @return [Void]
|
78
78
|
def self.validate_raw(obj:)
|
79
|
-
CandidApiClient::PreEncounter::
|
80
|
-
obj.check.nil? || CandidApiClient::PreEncounter::
|
79
|
+
CandidApiClient::PreEncounter::EligibilityChecks::V1::Types::EligibilityCheckMetadata.validate_raw(obj: obj.metadata)
|
80
|
+
obj.check.nil? || CandidApiClient::PreEncounter::EligibilityChecks::V1::Types::EligibilityCheck.validate_raw(obj: obj.check)
|
81
81
|
end
|
82
82
|
end
|
83
83
|
end
|
@@ -1,6 +1,6 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
|
-
require_relative "eligibility_status"
|
3
|
+
require_relative "../../../eligibility_checks/v_1/types/eligibility_status"
|
4
4
|
require "date"
|
5
5
|
require "ostruct"
|
6
6
|
require "json"
|
@@ -14,7 +14,7 @@ module CandidApiClient
|
|
14
14
|
class LatestEligibilityCheck
|
15
15
|
# @return [String]
|
16
16
|
attr_reader :check_id
|
17
|
-
# @return [CandidApiClient::PreEncounter::
|
17
|
+
# @return [CandidApiClient::PreEncounter::EligibilityChecks::V1::Types::EligibilityStatus]
|
18
18
|
attr_reader :status
|
19
19
|
# @return [DateTime]
|
20
20
|
attr_reader :initiated_at
|
@@ -27,7 +27,7 @@ module CandidApiClient
|
|
27
27
|
OMIT = Object.new
|
28
28
|
|
29
29
|
# @param check_id [String]
|
30
|
-
# @param status [CandidApiClient::PreEncounter::
|
30
|
+
# @param status [CandidApiClient::PreEncounter::EligibilityChecks::V1::Types::EligibilityStatus]
|
31
31
|
# @param initiated_at [DateTime]
|
32
32
|
# @param additional_properties [OpenStruct] Additional properties unmapped to the current class definition
|
33
33
|
# @return [CandidApiClient::PreEncounter::Coverages::V1::Types::LatestEligibilityCheck]
|
@@ -72,7 +72,7 @@ module CandidApiClient
|
|
72
72
|
# @return [Void]
|
73
73
|
def self.validate_raw(obj:)
|
74
74
|
obj.check_id.is_a?(String) != false || raise("Passed value for field obj.check_id is not the expected type, validation failed.")
|
75
|
-
obj.status.is_a?(CandidApiClient::PreEncounter::
|
75
|
+
obj.status.is_a?(CandidApiClient::PreEncounter::EligibilityChecks::V1::Types::EligibilityStatus) != false || raise("Passed value for field obj.status is not the expected type, validation failed.")
|
76
76
|
obj.initiated_at.is_a?(DateTime) != false || raise("Passed value for field obj.initiated_at is not the expected type, validation failed.")
|
77
77
|
end
|
78
78
|
end
|
@@ -4,7 +4,7 @@ require_relative "coverage_status"
|
|
4
4
|
require_relative "subscriber"
|
5
5
|
require_relative "../../../common/types/relationship"
|
6
6
|
require_relative "insurance_plan"
|
7
|
-
require_relative "eligibility_check_metadata"
|
7
|
+
require_relative "../../../eligibility_checks/v_1/types/eligibility_check_metadata"
|
8
8
|
require_relative "latest_eligibility_check"
|
9
9
|
require_relative "coverage_benefits"
|
10
10
|
require "ostruct"
|
@@ -31,7 +31,7 @@ module CandidApiClient
|
|
31
31
|
attr_reader :insurance_plan
|
32
32
|
# @return [Boolean] A boolean indicating if the coverage has been verified by a user.
|
33
33
|
attr_reader :verified
|
34
|
-
# @return [Array<CandidApiClient::PreEncounter::
|
34
|
+
# @return [Array<CandidApiClient::PreEncounter::EligibilityChecks::V1::Types::EligibilityCheckMetadata>] A list of eligibility check metadata that have been initiated on this coverage.
|
35
35
|
attr_reader :eligibility_checks
|
36
36
|
# @return [CandidApiClient::PreEncounter::Coverages::V1::Types::LatestEligibilityCheck] The latest eligibility check metadata that has been initiated on this coverage.
|
37
37
|
attr_reader :latest_eligibility_check
|
@@ -54,7 +54,7 @@ module CandidApiClient
|
|
54
54
|
# @param patient [String] The patient who benefits from the insurance coverage
|
55
55
|
# @param insurance_plan [CandidApiClient::PreEncounter::Coverages::V1::Types::InsurancePlan]
|
56
56
|
# @param verified [Boolean] A boolean indicating if the coverage has been verified by a user.
|
57
|
-
# @param eligibility_checks [Array<CandidApiClient::PreEncounter::
|
57
|
+
# @param eligibility_checks [Array<CandidApiClient::PreEncounter::EligibilityChecks::V1::Types::EligibilityCheckMetadata>] A list of eligibility check metadata that have been initiated on this coverage.
|
58
58
|
# @param latest_eligibility_check [CandidApiClient::PreEncounter::Coverages::V1::Types::LatestEligibilityCheck] The latest eligibility check metadata that has been initiated on this coverage.
|
59
59
|
# @param benefits [CandidApiClient::PreEncounter::Coverages::V1::Types::CoverageBenefits] The eligibility of the patient for the coverage, manually verified by users.
|
60
60
|
# @param additional_properties [OpenStruct] Additional properties unmapped to the current class definition
|
@@ -111,7 +111,7 @@ module CandidApiClient
|
|
111
111
|
verified = struct["verified"]
|
112
112
|
eligibility_checks = parsed_json["eligibility_checks"]&.map do |item|
|
113
113
|
item = item.to_json
|
114
|
-
CandidApiClient::PreEncounter::
|
114
|
+
CandidApiClient::PreEncounter::EligibilityChecks::V1::Types::EligibilityCheckMetadata.from_json(json_object: item)
|
115
115
|
end
|
116
116
|
if parsed_json["latest_eligibility_check"].nil?
|
117
117
|
latest_eligibility_check = nil
|
@@ -3,6 +3,8 @@
|
|
3
3
|
require_relative "../../../../requests"
|
4
4
|
require_relative "types/eligibility_request"
|
5
5
|
require_relative "types/eligibility_response"
|
6
|
+
require_relative "types/batch_eligibility_response"
|
7
|
+
require_relative "types/eligibility_check_page"
|
6
8
|
require "async"
|
7
9
|
|
8
10
|
module CandidApiClient
|
@@ -26,6 +28,7 @@ module CandidApiClient
|
|
26
28
|
# for more information.</Warning>
|
27
29
|
#
|
28
30
|
# @param request [Hash] Request of type CandidApiClient::PreEncounter::EligibilityChecks::V1::Types::EligibilityRequest, as a Hash
|
31
|
+
# * :submitter_transaction_identifier (String)
|
29
32
|
# * :payer_id (String)
|
30
33
|
# * :provider (Hash)
|
31
34
|
# * :subscriber (Hash)
|
@@ -61,6 +64,72 @@ module CandidApiClient
|
|
61
64
|
end
|
62
65
|
CandidApiClient::PreEncounter::EligibilityChecks::V1::Types::EligibilityCheck.from_json(json_object: response.body)
|
63
66
|
end
|
67
|
+
|
68
|
+
# Sends a batch of eligibility checks to payers through Stedi.
|
69
|
+
#
|
70
|
+
# @param request [Array<Hash>] Request of type Array<CandidApiClient::PreEncounter::EligibilityChecks::V1::Types::EligibilityRequest>, as a Hash
|
71
|
+
# * :submitter_transaction_identifier (String)
|
72
|
+
# * :payer_id (String)
|
73
|
+
# * :provider (Hash)
|
74
|
+
# * :subscriber (Hash)
|
75
|
+
# * :member_id (String)
|
76
|
+
# * :first_name (String)
|
77
|
+
# * :last_name (String)
|
78
|
+
# * :date_of_birth (Date)
|
79
|
+
# * :dependent (Hash)
|
80
|
+
# * :member_id (String)
|
81
|
+
# * :first_name (String)
|
82
|
+
# * :last_name (String)
|
83
|
+
# * :date_of_birth (Date)
|
84
|
+
# * :encounter (Hash)
|
85
|
+
# * :date_of_service (Date)
|
86
|
+
# * :service_type_codes (Array<String>)
|
87
|
+
# @param request_options [CandidApiClient::RequestOptions]
|
88
|
+
# @return [CandidApiClient::PreEncounter::EligibilityChecks::V1::Types::BatchEligibilityResponse]
|
89
|
+
# @example
|
90
|
+
# api = CandidApiClient::Client.new(base_url: "https://api.example.com", environment: CandidApiClient::Environment::PRODUCTION)
|
91
|
+
# api.pre_encounter.eligibility_checks.v_1.batch(request: [{ payer_id: "payer_id", provider: { npi: "npi" }, subscriber: { first_name: "first_name", last_name: "last_name" } }, { payer_id: "payer_id", provider: { npi: "npi" }, subscriber: { first_name: "first_name", last_name: "last_name" } }])
|
92
|
+
def batch(request:, request_options: nil)
|
93
|
+
response = @request_client.conn.post do |req|
|
94
|
+
req.options.timeout = request_options.timeout_in_seconds unless request_options&.timeout_in_seconds.nil?
|
95
|
+
req.headers["Authorization"] = request_options.token unless request_options&.token.nil?
|
96
|
+
req.headers = {
|
97
|
+
**(req.headers || {}),
|
98
|
+
**@request_client.get_headers,
|
99
|
+
**(request_options&.additional_headers || {})
|
100
|
+
}.compact
|
101
|
+
req.body = { **(request || {}), **(request_options&.additional_body_parameters || {}) }.compact
|
102
|
+
req.url "#{@request_client.get_url(environment: PreEncounter,
|
103
|
+
request_options: request_options)}/eligibility-checks/v1/batch"
|
104
|
+
end
|
105
|
+
CandidApiClient::PreEncounter::EligibilityChecks::V1::Types::BatchEligibilityResponse.from_json(json_object: response.body)
|
106
|
+
end
|
107
|
+
|
108
|
+
# Polls the status of a batch eligibility check.
|
109
|
+
# <Note>Batch eligibility checks are not yet available. Please reach out to the
|
110
|
+
# Candid team for more information.</Note>
|
111
|
+
# path-parameters:
|
112
|
+
#
|
113
|
+
# @param batch_id [String]
|
114
|
+
# @param request_options [CandidApiClient::RequestOptions]
|
115
|
+
# @return [CandidApiClient::PreEncounter::EligibilityChecks::V1::Types::EligibilityCheckPage]
|
116
|
+
# @example
|
117
|
+
# api = CandidApiClient::Client.new(base_url: "https://api.example.com", environment: CandidApiClient::Environment::PRODUCTION)
|
118
|
+
# api.pre_encounter.eligibility_checks.v_1.poll_batch(batch_id: "batch_id")
|
119
|
+
def poll_batch(batch_id:, request_options: nil)
|
120
|
+
response = @request_client.conn.get do |req|
|
121
|
+
req.options.timeout = request_options.timeout_in_seconds unless request_options&.timeout_in_seconds.nil?
|
122
|
+
req.headers["Authorization"] = request_options.token unless request_options&.token.nil?
|
123
|
+
req.headers = {
|
124
|
+
**(req.headers || {}),
|
125
|
+
**@request_client.get_headers,
|
126
|
+
**(request_options&.additional_headers || {})
|
127
|
+
}.compact
|
128
|
+
req.url "#{@request_client.get_url(environment: PreEncounter,
|
129
|
+
request_options: request_options)}/eligibility-checks/v1/batch/#{batch_id}"
|
130
|
+
end
|
131
|
+
CandidApiClient::PreEncounter::EligibilityChecks::V1::Types::EligibilityCheckPage.from_json(json_object: response.body)
|
132
|
+
end
|
64
133
|
end
|
65
134
|
|
66
135
|
class AsyncV1Client
|
@@ -80,6 +149,7 @@ module CandidApiClient
|
|
80
149
|
# for more information.</Warning>
|
81
150
|
#
|
82
151
|
# @param request [Hash] Request of type CandidApiClient::PreEncounter::EligibilityChecks::V1::Types::EligibilityRequest, as a Hash
|
152
|
+
# * :submitter_transaction_identifier (String)
|
83
153
|
# * :payer_id (String)
|
84
154
|
# * :provider (Hash)
|
85
155
|
# * :subscriber (Hash)
|
@@ -117,6 +187,76 @@ module CandidApiClient
|
|
117
187
|
CandidApiClient::PreEncounter::EligibilityChecks::V1::Types::EligibilityCheck.from_json(json_object: response.body)
|
118
188
|
end
|
119
189
|
end
|
190
|
+
|
191
|
+
# Sends a batch of eligibility checks to payers through Stedi.
|
192
|
+
#
|
193
|
+
# @param request [Array<Hash>] Request of type Array<CandidApiClient::PreEncounter::EligibilityChecks::V1::Types::EligibilityRequest>, as a Hash
|
194
|
+
# * :submitter_transaction_identifier (String)
|
195
|
+
# * :payer_id (String)
|
196
|
+
# * :provider (Hash)
|
197
|
+
# * :subscriber (Hash)
|
198
|
+
# * :member_id (String)
|
199
|
+
# * :first_name (String)
|
200
|
+
# * :last_name (String)
|
201
|
+
# * :date_of_birth (Date)
|
202
|
+
# * :dependent (Hash)
|
203
|
+
# * :member_id (String)
|
204
|
+
# * :first_name (String)
|
205
|
+
# * :last_name (String)
|
206
|
+
# * :date_of_birth (Date)
|
207
|
+
# * :encounter (Hash)
|
208
|
+
# * :date_of_service (Date)
|
209
|
+
# * :service_type_codes (Array<String>)
|
210
|
+
# @param request_options [CandidApiClient::RequestOptions]
|
211
|
+
# @return [CandidApiClient::PreEncounter::EligibilityChecks::V1::Types::BatchEligibilityResponse]
|
212
|
+
# @example
|
213
|
+
# api = CandidApiClient::Client.new(base_url: "https://api.example.com", environment: CandidApiClient::Environment::PRODUCTION)
|
214
|
+
# api.pre_encounter.eligibility_checks.v_1.batch(request: [{ payer_id: "payer_id", provider: { npi: "npi" }, subscriber: { first_name: "first_name", last_name: "last_name" } }, { payer_id: "payer_id", provider: { npi: "npi" }, subscriber: { first_name: "first_name", last_name: "last_name" } }])
|
215
|
+
def batch(request:, request_options: nil)
|
216
|
+
Async do
|
217
|
+
response = @request_client.conn.post do |req|
|
218
|
+
req.options.timeout = request_options.timeout_in_seconds unless request_options&.timeout_in_seconds.nil?
|
219
|
+
req.headers["Authorization"] = request_options.token unless request_options&.token.nil?
|
220
|
+
req.headers = {
|
221
|
+
**(req.headers || {}),
|
222
|
+
**@request_client.get_headers,
|
223
|
+
**(request_options&.additional_headers || {})
|
224
|
+
}.compact
|
225
|
+
req.body = { **(request || {}), **(request_options&.additional_body_parameters || {}) }.compact
|
226
|
+
req.url "#{@request_client.get_url(environment: PreEncounter,
|
227
|
+
request_options: request_options)}/eligibility-checks/v1/batch"
|
228
|
+
end
|
229
|
+
CandidApiClient::PreEncounter::EligibilityChecks::V1::Types::BatchEligibilityResponse.from_json(json_object: response.body)
|
230
|
+
end
|
231
|
+
end
|
232
|
+
|
233
|
+
# Polls the status of a batch eligibility check.
|
234
|
+
# <Note>Batch eligibility checks are not yet available. Please reach out to the
|
235
|
+
# Candid team for more information.</Note>
|
236
|
+
# path-parameters:
|
237
|
+
#
|
238
|
+
# @param batch_id [String]
|
239
|
+
# @param request_options [CandidApiClient::RequestOptions]
|
240
|
+
# @return [CandidApiClient::PreEncounter::EligibilityChecks::V1::Types::EligibilityCheckPage]
|
241
|
+
# @example
|
242
|
+
# api = CandidApiClient::Client.new(base_url: "https://api.example.com", environment: CandidApiClient::Environment::PRODUCTION)
|
243
|
+
# api.pre_encounter.eligibility_checks.v_1.poll_batch(batch_id: "batch_id")
|
244
|
+
def poll_batch(batch_id:, request_options: nil)
|
245
|
+
Async do
|
246
|
+
response = @request_client.conn.get do |req|
|
247
|
+
req.options.timeout = request_options.timeout_in_seconds unless request_options&.timeout_in_seconds.nil?
|
248
|
+
req.headers["Authorization"] = request_options.token unless request_options&.token.nil?
|
249
|
+
req.headers = {
|
250
|
+
**(req.headers || {}),
|
251
|
+
**@request_client.get_headers,
|
252
|
+
**(request_options&.additional_headers || {})
|
253
|
+
}.compact
|
254
|
+
req.url "#{@request_client.get_url(environment: PreEncounter,
|
255
|
+
request_options: request_options)}/eligibility-checks/v1/batch/#{batch_id}"
|
256
|
+
end
|
257
|
+
CandidApiClient::PreEncounter::EligibilityChecks::V1::Types::EligibilityCheckPage.from_json(json_object: response.body)
|
258
|
+
end
|
259
|
+
end
|
120
260
|
end
|
121
261
|
end
|
122
262
|
end
|
data/lib/candidhealth/pre_encounter/eligibility_checks/v_1/types/batch_eligibility_response.rb
ADDED
@@ -0,0 +1,75 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require "date"
|
4
|
+
require "ostruct"
|
5
|
+
require "json"
|
6
|
+
|
7
|
+
module CandidApiClient
|
8
|
+
module PreEncounter
|
9
|
+
module EligibilityChecks
|
10
|
+
module V1
|
11
|
+
module Types
|
12
|
+
# An object representing the data for a batch eligibility response.
|
13
|
+
class BatchEligibilityResponse
|
14
|
+
# @return [String]
|
15
|
+
attr_reader :batch_id
|
16
|
+
# @return [DateTime]
|
17
|
+
attr_reader :submitted_at
|
18
|
+
# @return [OpenStruct] Additional properties unmapped to the current class definition
|
19
|
+
attr_reader :additional_properties
|
20
|
+
# @return [Object]
|
21
|
+
attr_reader :_field_set
|
22
|
+
protected :_field_set
|
23
|
+
|
24
|
+
OMIT = Object.new
|
25
|
+
|
26
|
+
# @param batch_id [String]
|
27
|
+
# @param submitted_at [DateTime]
|
28
|
+
# @param additional_properties [OpenStruct] Additional properties unmapped to the current class definition
|
29
|
+
# @return [CandidApiClient::PreEncounter::EligibilityChecks::V1::Types::BatchEligibilityResponse]
|
30
|
+
def initialize(batch_id:, submitted_at:, additional_properties: nil)
|
31
|
+
@batch_id = batch_id
|
32
|
+
@submitted_at = submitted_at
|
33
|
+
@additional_properties = additional_properties
|
34
|
+
@_field_set = { "batch_id": batch_id, "submitted_at": submitted_at }
|
35
|
+
end
|
36
|
+
|
37
|
+
# Deserialize a JSON object to an instance of BatchEligibilityResponse
|
38
|
+
#
|
39
|
+
# @param json_object [String]
|
40
|
+
# @return [CandidApiClient::PreEncounter::EligibilityChecks::V1::Types::BatchEligibilityResponse]
|
41
|
+
def self.from_json(json_object:)
|
42
|
+
struct = JSON.parse(json_object, object_class: OpenStruct)
|
43
|
+
parsed_json = JSON.parse(json_object)
|
44
|
+
batch_id = struct["batch_id"]
|
45
|
+
submitted_at = (DateTime.parse(parsed_json["submitted_at"]) unless parsed_json["submitted_at"].nil?)
|
46
|
+
new(
|
47
|
+
batch_id: batch_id,
|
48
|
+
submitted_at: submitted_at,
|
49
|
+
additional_properties: struct
|
50
|
+
)
|
51
|
+
end
|
52
|
+
|
53
|
+
# Serialize an instance of BatchEligibilityResponse to a JSON object
|
54
|
+
#
|
55
|
+
# @return [String]
|
56
|
+
def to_json(*_args)
|
57
|
+
@_field_set&.to_json
|
58
|
+
end
|
59
|
+
|
60
|
+
# Leveraged for Union-type generation, validate_raw attempts to parse the given
|
61
|
+
# hash and check each fields type against the current object's property
|
62
|
+
# definitions.
|
63
|
+
#
|
64
|
+
# @param obj [Object]
|
65
|
+
# @return [Void]
|
66
|
+
def self.validate_raw(obj:)
|
67
|
+
obj.batch_id.is_a?(String) != false || raise("Passed value for field obj.batch_id is not the expected type, validation failed.")
|
68
|
+
obj.submitted_at.is_a?(DateTime) != false || raise("Passed value for field obj.submitted_at is not the expected type, validation failed.")
|
69
|
+
end
|
70
|
+
end
|
71
|
+
end
|
72
|
+
end
|
73
|
+
end
|
74
|
+
end
|
75
|
+
end
|