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
@@ -1,5 +1,6 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
|
+
require_relative "eligibility_check_error"
|
3
4
|
require_relative "eligibility_request"
|
4
5
|
require_relative "parsed_response"
|
5
6
|
require_relative "request_correction"
|
@@ -12,7 +13,9 @@ module CandidApiClient
|
|
12
13
|
module V1
|
13
14
|
module Types
|
14
15
|
class EligibilityCheck
|
15
|
-
# @return [
|
16
|
+
# @return [String]
|
17
|
+
attr_reader :batch_id
|
18
|
+
# @return [Array<CandidApiClient::PreEncounter::EligibilityChecks::V1::Types::EligibilityCheckError>]
|
16
19
|
attr_reader :errors
|
17
20
|
# @return [CandidApiClient::PreEncounter::EligibilityChecks::V1::Types::EligibilityRequest]
|
18
21
|
attr_reader :request
|
@@ -30,15 +33,17 @@ module CandidApiClient
|
|
30
33
|
|
31
34
|
OMIT = Object.new
|
32
35
|
|
33
|
-
# @param
|
36
|
+
# @param batch_id [String]
|
37
|
+
# @param errors [Array<CandidApiClient::PreEncounter::EligibilityChecks::V1::Types::EligibilityCheckError>]
|
34
38
|
# @param request [CandidApiClient::PreEncounter::EligibilityChecks::V1::Types::EligibilityRequest]
|
35
39
|
# @param response [Object]
|
36
40
|
# @param parsed_response [CandidApiClient::PreEncounter::EligibilityChecks::V1::Types::ParsedResponse]
|
37
41
|
# @param request_corrections [Array<CandidApiClient::PreEncounter::EligibilityChecks::V1::Types::RequestCorrection>]
|
38
42
|
# @param additional_properties [OpenStruct] Additional properties unmapped to the current class definition
|
39
43
|
# @return [CandidApiClient::PreEncounter::EligibilityChecks::V1::Types::EligibilityCheck]
|
40
|
-
def initialize(response:,
|
41
|
-
additional_properties: nil)
|
44
|
+
def initialize(response:, batch_id: OMIT, errors: OMIT, request: OMIT, parsed_response: OMIT,
|
45
|
+
request_corrections: OMIT, additional_properties: nil)
|
46
|
+
@batch_id = batch_id if batch_id != OMIT
|
42
47
|
@errors = errors if errors != OMIT
|
43
48
|
@request = request if request != OMIT
|
44
49
|
@response = response
|
@@ -46,6 +51,7 @@ module CandidApiClient
|
|
46
51
|
@request_corrections = request_corrections if request_corrections != OMIT
|
47
52
|
@additional_properties = additional_properties
|
48
53
|
@_field_set = {
|
54
|
+
"batch_id": batch_id,
|
49
55
|
"errors": errors,
|
50
56
|
"request": request,
|
51
57
|
"response": response,
|
@@ -63,7 +69,11 @@ module CandidApiClient
|
|
63
69
|
def self.from_json(json_object:)
|
64
70
|
struct = JSON.parse(json_object, object_class: OpenStruct)
|
65
71
|
parsed_json = JSON.parse(json_object)
|
66
|
-
|
72
|
+
batch_id = struct["batch_id"]
|
73
|
+
errors = parsed_json["errors"]&.map do |item|
|
74
|
+
item = item.to_json
|
75
|
+
CandidApiClient::PreEncounter::EligibilityChecks::V1::Types::EligibilityCheckError.from_json(json_object: item)
|
76
|
+
end
|
67
77
|
if parsed_json["request"].nil?
|
68
78
|
request = nil
|
69
79
|
else
|
@@ -82,6 +92,7 @@ module CandidApiClient
|
|
82
92
|
CandidApiClient::PreEncounter::EligibilityChecks::V1::Types::RequestCorrection.from_json(json_object: item)
|
83
93
|
end
|
84
94
|
new(
|
95
|
+
batch_id: batch_id,
|
85
96
|
errors: errors,
|
86
97
|
request: request,
|
87
98
|
response: response,
|
@@ -105,7 +116,8 @@ module CandidApiClient
|
|
105
116
|
# @param obj [Object]
|
106
117
|
# @return [Void]
|
107
118
|
def self.validate_raw(obj:)
|
108
|
-
obj.
|
119
|
+
obj.batch_id&.is_a?(String) != false || raise("Passed value for field obj.batch_id is not the expected type, validation failed.")
|
120
|
+
obj.errors&.is_a?(Array) != false || raise("Passed value for field obj.errors is not the expected type, validation failed.")
|
109
121
|
obj.request.nil? || CandidApiClient::PreEncounter::EligibilityChecks::V1::Types::EligibilityRequest.validate_raw(obj: obj.request)
|
110
122
|
obj.response.is_a?(Object) != false || raise("Passed value for field obj.response is not the expected type, validation failed.")
|
111
123
|
obj.parsed_response.nil? || CandidApiClient::PreEncounter::EligibilityChecks::V1::Types::ParsedResponse.validate_raw(obj: obj.parsed_response)
|
@@ -0,0 +1,80 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require_relative "eligibility_check_error_source"
|
4
|
+
require_relative "eligibility_check_error_details"
|
5
|
+
require "ostruct"
|
6
|
+
require "json"
|
7
|
+
|
8
|
+
module CandidApiClient
|
9
|
+
module PreEncounter
|
10
|
+
module EligibilityChecks
|
11
|
+
module V1
|
12
|
+
module Types
|
13
|
+
class EligibilityCheckError
|
14
|
+
# @return [CandidApiClient::PreEncounter::EligibilityChecks::V1::Types::EligibilityCheckErrorSource]
|
15
|
+
attr_reader :source
|
16
|
+
# @return [CandidApiClient::PreEncounter::EligibilityChecks::V1::Types::EligibilityCheckErrorDetails]
|
17
|
+
attr_reader :error_details
|
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 source [CandidApiClient::PreEncounter::EligibilityChecks::V1::Types::EligibilityCheckErrorSource]
|
27
|
+
# @param error_details [CandidApiClient::PreEncounter::EligibilityChecks::V1::Types::EligibilityCheckErrorDetails]
|
28
|
+
# @param additional_properties [OpenStruct] Additional properties unmapped to the current class definition
|
29
|
+
# @return [CandidApiClient::PreEncounter::EligibilityChecks::V1::Types::EligibilityCheckError]
|
30
|
+
def initialize(source:, error_details:, additional_properties: nil)
|
31
|
+
@source = source
|
32
|
+
@error_details = error_details
|
33
|
+
@additional_properties = additional_properties
|
34
|
+
@_field_set = { "source": source, "errorDetails": error_details }
|
35
|
+
end
|
36
|
+
|
37
|
+
# Deserialize a JSON object to an instance of EligibilityCheckError
|
38
|
+
#
|
39
|
+
# @param json_object [String]
|
40
|
+
# @return [CandidApiClient::PreEncounter::EligibilityChecks::V1::Types::EligibilityCheckError]
|
41
|
+
def self.from_json(json_object:)
|
42
|
+
struct = JSON.parse(json_object, object_class: OpenStruct)
|
43
|
+
parsed_json = JSON.parse(json_object)
|
44
|
+
source = struct["source"]
|
45
|
+
if parsed_json["errorDetails"].nil?
|
46
|
+
error_details = nil
|
47
|
+
else
|
48
|
+
error_details = parsed_json["errorDetails"].to_json
|
49
|
+
error_details = CandidApiClient::PreEncounter::EligibilityChecks::V1::Types::EligibilityCheckErrorDetails.from_json(json_object: error_details)
|
50
|
+
end
|
51
|
+
new(
|
52
|
+
source: source,
|
53
|
+
error_details: error_details,
|
54
|
+
additional_properties: struct
|
55
|
+
)
|
56
|
+
end
|
57
|
+
|
58
|
+
# Serialize an instance of EligibilityCheckError to a JSON object
|
59
|
+
#
|
60
|
+
# @return [String]
|
61
|
+
def to_json(*_args)
|
62
|
+
@_field_set&.to_json
|
63
|
+
end
|
64
|
+
|
65
|
+
# Leveraged for Union-type generation, validate_raw attempts to parse the given
|
66
|
+
# hash and check each fields type against the current object's property
|
67
|
+
# definitions.
|
68
|
+
#
|
69
|
+
# @param obj [Object]
|
70
|
+
# @return [Void]
|
71
|
+
def self.validate_raw(obj:)
|
72
|
+
obj.source.is_a?(CandidApiClient::PreEncounter::EligibilityChecks::V1::Types::EligibilityCheckErrorSource) != false || raise("Passed value for field obj.source is not the expected type, validation failed.")
|
73
|
+
CandidApiClient::PreEncounter::EligibilityChecks::V1::Types::EligibilityCheckErrorDetails.validate_raw(obj: obj.error_details)
|
74
|
+
end
|
75
|
+
end
|
76
|
+
end
|
77
|
+
end
|
78
|
+
end
|
79
|
+
end
|
80
|
+
end
|
data/lib/candidhealth/pre_encounter/eligibility_checks/v_1/types/eligibility_check_error_details.rb
ADDED
@@ -0,0 +1,112 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require "ostruct"
|
4
|
+
require "json"
|
5
|
+
|
6
|
+
module CandidApiClient
|
7
|
+
module PreEncounter
|
8
|
+
module EligibilityChecks
|
9
|
+
module V1
|
10
|
+
module Types
|
11
|
+
# This object is our fern representation of Stedi's EligbilityCheckError object
|
12
|
+
# from their API.
|
13
|
+
class EligibilityCheckErrorDetails
|
14
|
+
# @return [String]
|
15
|
+
attr_reader :field
|
16
|
+
# @return [String]
|
17
|
+
attr_reader :description
|
18
|
+
# @return [String]
|
19
|
+
attr_reader :location
|
20
|
+
# @return [String]
|
21
|
+
attr_reader :possible_resolutions
|
22
|
+
# @return [String]
|
23
|
+
attr_reader :code
|
24
|
+
# @return [String]
|
25
|
+
attr_reader :followup_action
|
26
|
+
# @return [OpenStruct] Additional properties unmapped to the current class definition
|
27
|
+
attr_reader :additional_properties
|
28
|
+
# @return [Object]
|
29
|
+
attr_reader :_field_set
|
30
|
+
protected :_field_set
|
31
|
+
|
32
|
+
OMIT = Object.new
|
33
|
+
|
34
|
+
# @param field [String]
|
35
|
+
# @param description [String]
|
36
|
+
# @param location [String]
|
37
|
+
# @param possible_resolutions [String]
|
38
|
+
# @param code [String]
|
39
|
+
# @param followup_action [String]
|
40
|
+
# @param additional_properties [OpenStruct] Additional properties unmapped to the current class definition
|
41
|
+
# @return [CandidApiClient::PreEncounter::EligibilityChecks::V1::Types::EligibilityCheckErrorDetails]
|
42
|
+
def initialize(field: OMIT, description: OMIT, location: OMIT, possible_resolutions: OMIT, code: OMIT,
|
43
|
+
followup_action: OMIT, additional_properties: nil)
|
44
|
+
@field = field if field != OMIT
|
45
|
+
@description = description if description != OMIT
|
46
|
+
@location = location if location != OMIT
|
47
|
+
@possible_resolutions = possible_resolutions if possible_resolutions != OMIT
|
48
|
+
@code = code if code != OMIT
|
49
|
+
@followup_action = followup_action if followup_action != OMIT
|
50
|
+
@additional_properties = additional_properties
|
51
|
+
@_field_set = {
|
52
|
+
"field?": field,
|
53
|
+
"description?": description,
|
54
|
+
"location?": location,
|
55
|
+
"possibleResolutions?": possible_resolutions,
|
56
|
+
"code?": code,
|
57
|
+
"followupAction?": followup_action
|
58
|
+
}.reject do |_k, v|
|
59
|
+
v == OMIT
|
60
|
+
end
|
61
|
+
end
|
62
|
+
|
63
|
+
# Deserialize a JSON object to an instance of EligibilityCheckErrorDetails
|
64
|
+
#
|
65
|
+
# @param json_object [String]
|
66
|
+
# @return [CandidApiClient::PreEncounter::EligibilityChecks::V1::Types::EligibilityCheckErrorDetails]
|
67
|
+
def self.from_json(json_object:)
|
68
|
+
struct = JSON.parse(json_object, object_class: OpenStruct)
|
69
|
+
field = struct["field?"]
|
70
|
+
description = struct["description?"]
|
71
|
+
location = struct["location?"]
|
72
|
+
possible_resolutions = struct["possibleResolutions?"]
|
73
|
+
code = struct["code?"]
|
74
|
+
followup_action = struct["followupAction?"]
|
75
|
+
new(
|
76
|
+
field: field,
|
77
|
+
description: description,
|
78
|
+
location: location,
|
79
|
+
possible_resolutions: possible_resolutions,
|
80
|
+
code: code,
|
81
|
+
followup_action: followup_action,
|
82
|
+
additional_properties: struct
|
83
|
+
)
|
84
|
+
end
|
85
|
+
|
86
|
+
# Serialize an instance of EligibilityCheckErrorDetails to a JSON object
|
87
|
+
#
|
88
|
+
# @return [String]
|
89
|
+
def to_json(*_args)
|
90
|
+
@_field_set&.to_json
|
91
|
+
end
|
92
|
+
|
93
|
+
# Leveraged for Union-type generation, validate_raw attempts to parse the given
|
94
|
+
# hash and check each fields type against the current object's property
|
95
|
+
# definitions.
|
96
|
+
#
|
97
|
+
# @param obj [Object]
|
98
|
+
# @return [Void]
|
99
|
+
def self.validate_raw(obj:)
|
100
|
+
obj.field&.is_a?(String) != false || raise("Passed value for field obj.field is not the expected type, validation failed.")
|
101
|
+
obj.description&.is_a?(String) != false || raise("Passed value for field obj.description is not the expected type, validation failed.")
|
102
|
+
obj.location&.is_a?(String) != false || raise("Passed value for field obj.location is not the expected type, validation failed.")
|
103
|
+
obj.possible_resolutions&.is_a?(String) != false || raise("Passed value for field obj.possible_resolutions is not the expected type, validation failed.")
|
104
|
+
obj.code&.is_a?(String) != false || raise("Passed value for field obj.code is not the expected type, validation failed.")
|
105
|
+
obj.followup_action&.is_a?(String) != false || raise("Passed value for field obj.followup_action is not the expected type, validation failed.")
|
106
|
+
end
|
107
|
+
end
|
108
|
+
end
|
109
|
+
end
|
110
|
+
end
|
111
|
+
end
|
112
|
+
end
|
data/lib/candidhealth/pre_encounter/eligibility_checks/v_1/types/eligibility_check_error_source.rb
ADDED
@@ -0,0 +1,17 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module CandidApiClient
|
4
|
+
module PreEncounter
|
5
|
+
module EligibilityChecks
|
6
|
+
module V1
|
7
|
+
module Types
|
8
|
+
# enum to represent the source of an error in an eligibility check
|
9
|
+
class EligibilityCheckErrorSource
|
10
|
+
CANDID = "CANDID"
|
11
|
+
STEDI = "STEDI"
|
12
|
+
end
|
13
|
+
end
|
14
|
+
end
|
15
|
+
end
|
16
|
+
end
|
17
|
+
end
|
@@ -1,6 +1,6 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
|
-
require_relative "service_type_code"
|
3
|
+
require_relative "../../../coverages/v_1/types/service_type_code"
|
4
4
|
require_relative "eligibility_check_status"
|
5
5
|
require "date"
|
6
6
|
require "ostruct"
|
@@ -8,7 +8,7 @@ require "json"
|
|
8
8
|
|
9
9
|
module CandidApiClient
|
10
10
|
module PreEncounter
|
11
|
-
module
|
11
|
+
module EligibilityChecks
|
12
12
|
module V1
|
13
13
|
module Types
|
14
14
|
class EligibilityCheckMetadata
|
@@ -16,7 +16,7 @@ module CandidApiClient
|
|
16
16
|
attr_reader :check_id
|
17
17
|
# @return [CandidApiClient::PreEncounter::Coverages::V1::Types::ServiceTypeCode]
|
18
18
|
attr_reader :service_code
|
19
|
-
# @return [CandidApiClient::PreEncounter::
|
19
|
+
# @return [CandidApiClient::PreEncounter::EligibilityChecks::V1::Types::EligibilityCheckStatus]
|
20
20
|
attr_reader :status
|
21
21
|
# @return [String]
|
22
22
|
attr_reader :initiated_by
|
@@ -32,11 +32,11 @@ module CandidApiClient
|
|
32
32
|
|
33
33
|
# @param check_id [String]
|
34
34
|
# @param service_code [CandidApiClient::PreEncounter::Coverages::V1::Types::ServiceTypeCode]
|
35
|
-
# @param status [CandidApiClient::PreEncounter::
|
35
|
+
# @param status [CandidApiClient::PreEncounter::EligibilityChecks::V1::Types::EligibilityCheckStatus]
|
36
36
|
# @param initiated_by [String]
|
37
37
|
# @param initiated_at [DateTime]
|
38
38
|
# @param additional_properties [OpenStruct] Additional properties unmapped to the current class definition
|
39
|
-
# @return [CandidApiClient::PreEncounter::
|
39
|
+
# @return [CandidApiClient::PreEncounter::EligibilityChecks::V1::Types::EligibilityCheckMetadata]
|
40
40
|
def initialize(check_id:, service_code:, status:, initiated_by:, initiated_at:, additional_properties: nil)
|
41
41
|
@check_id = check_id
|
42
42
|
@service_code = service_code
|
@@ -56,7 +56,7 @@ module CandidApiClient
|
|
56
56
|
# Deserialize a JSON object to an instance of EligibilityCheckMetadata
|
57
57
|
#
|
58
58
|
# @param json_object [String]
|
59
|
-
# @return [CandidApiClient::PreEncounter::
|
59
|
+
# @return [CandidApiClient::PreEncounter::EligibilityChecks::V1::Types::EligibilityCheckMetadata]
|
60
60
|
def self.from_json(json_object:)
|
61
61
|
struct = JSON.parse(json_object, object_class: OpenStruct)
|
62
62
|
parsed_json = JSON.parse(json_object)
|
@@ -91,7 +91,7 @@ module CandidApiClient
|
|
91
91
|
def self.validate_raw(obj:)
|
92
92
|
obj.check_id.is_a?(String) != false || raise("Passed value for field obj.check_id is not the expected type, validation failed.")
|
93
93
|
obj.service_code.is_a?(CandidApiClient::PreEncounter::Coverages::V1::Types::ServiceTypeCode) != false || raise("Passed value for field obj.service_code is not the expected type, validation failed.")
|
94
|
-
obj.status.is_a?(CandidApiClient::PreEncounter::
|
94
|
+
obj.status.is_a?(CandidApiClient::PreEncounter::EligibilityChecks::V1::Types::EligibilityCheckStatus) != false || raise("Passed value for field obj.status is not the expected type, validation failed.")
|
95
95
|
obj.initiated_by.is_a?(String) != false || raise("Passed value for field obj.initiated_by is not the expected type, validation failed.")
|
96
96
|
obj.initiated_at.is_a?(DateTime) != false || raise("Passed value for field obj.initiated_at is not the expected type, validation failed.")
|
97
97
|
end
|
@@ -0,0 +1,98 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require_relative "eligibility_check"
|
4
|
+
require "ostruct"
|
5
|
+
require "json"
|
6
|
+
|
7
|
+
module CandidApiClient
|
8
|
+
module PreEncounter
|
9
|
+
module EligibilityChecks
|
10
|
+
module V1
|
11
|
+
module Types
|
12
|
+
class EligibilityCheckPage
|
13
|
+
# @return [Array<CandidApiClient::PreEncounter::EligibilityChecks::V1::Types::EligibilityCheck>]
|
14
|
+
attr_reader :items
|
15
|
+
# @return [String]
|
16
|
+
attr_reader :next_page_token
|
17
|
+
# @return [String]
|
18
|
+
attr_reader :prev_page_token
|
19
|
+
# @return [Integer]
|
20
|
+
attr_reader :total
|
21
|
+
# @return [OpenStruct] Additional properties unmapped to the current class definition
|
22
|
+
attr_reader :additional_properties
|
23
|
+
# @return [Object]
|
24
|
+
attr_reader :_field_set
|
25
|
+
protected :_field_set
|
26
|
+
|
27
|
+
OMIT = Object.new
|
28
|
+
|
29
|
+
# @param items [Array<CandidApiClient::PreEncounter::EligibilityChecks::V1::Types::EligibilityCheck>]
|
30
|
+
# @param next_page_token [String]
|
31
|
+
# @param prev_page_token [String]
|
32
|
+
# @param total [Integer]
|
33
|
+
# @param additional_properties [OpenStruct] Additional properties unmapped to the current class definition
|
34
|
+
# @return [CandidApiClient::PreEncounter::EligibilityChecks::V1::Types::EligibilityCheckPage]
|
35
|
+
def initialize(items:, total:, next_page_token: OMIT, prev_page_token: OMIT, additional_properties: nil)
|
36
|
+
@items = items
|
37
|
+
@next_page_token = next_page_token if next_page_token != OMIT
|
38
|
+
@prev_page_token = prev_page_token if prev_page_token != OMIT
|
39
|
+
@total = total
|
40
|
+
@additional_properties = additional_properties
|
41
|
+
@_field_set = {
|
42
|
+
"items": items,
|
43
|
+
"next_page_token": next_page_token,
|
44
|
+
"prev_page_token": prev_page_token,
|
45
|
+
"total": total
|
46
|
+
}.reject do |_k, v|
|
47
|
+
v == OMIT
|
48
|
+
end
|
49
|
+
end
|
50
|
+
|
51
|
+
# Deserialize a JSON object to an instance of EligibilityCheckPage
|
52
|
+
#
|
53
|
+
# @param json_object [String]
|
54
|
+
# @return [CandidApiClient::PreEncounter::EligibilityChecks::V1::Types::EligibilityCheckPage]
|
55
|
+
def self.from_json(json_object:)
|
56
|
+
struct = JSON.parse(json_object, object_class: OpenStruct)
|
57
|
+
parsed_json = JSON.parse(json_object)
|
58
|
+
items = parsed_json["items"]&.map do |item|
|
59
|
+
item = item.to_json
|
60
|
+
CandidApiClient::PreEncounter::EligibilityChecks::V1::Types::EligibilityCheck.from_json(json_object: item)
|
61
|
+
end
|
62
|
+
next_page_token = struct["next_page_token"]
|
63
|
+
prev_page_token = struct["prev_page_token"]
|
64
|
+
total = struct["total"]
|
65
|
+
new(
|
66
|
+
items: items,
|
67
|
+
next_page_token: next_page_token,
|
68
|
+
prev_page_token: prev_page_token,
|
69
|
+
total: total,
|
70
|
+
additional_properties: struct
|
71
|
+
)
|
72
|
+
end
|
73
|
+
|
74
|
+
# Serialize an instance of EligibilityCheckPage to a JSON object
|
75
|
+
#
|
76
|
+
# @return [String]
|
77
|
+
def to_json(*_args)
|
78
|
+
@_field_set&.to_json
|
79
|
+
end
|
80
|
+
|
81
|
+
# Leveraged for Union-type generation, validate_raw attempts to parse the given
|
82
|
+
# hash and check each fields type against the current object's property
|
83
|
+
# definitions.
|
84
|
+
#
|
85
|
+
# @param obj [Object]
|
86
|
+
# @return [Void]
|
87
|
+
def self.validate_raw(obj:)
|
88
|
+
obj.items.is_a?(Array) != false || raise("Passed value for field obj.items is not the expected type, validation failed.")
|
89
|
+
obj.next_page_token&.is_a?(String) != false || raise("Passed value for field obj.next_page_token is not the expected type, validation failed.")
|
90
|
+
obj.prev_page_token&.is_a?(String) != false || raise("Passed value for field obj.prev_page_token is not the expected type, validation failed.")
|
91
|
+
obj.total.is_a?(Integer) != false || raise("Passed value for field obj.total is not the expected type, validation failed.")
|
92
|
+
end
|
93
|
+
end
|
94
|
+
end
|
95
|
+
end
|
96
|
+
end
|
97
|
+
end
|
98
|
+
end
|
@@ -2,10 +2,10 @@
|
|
2
2
|
|
3
3
|
module CandidApiClient
|
4
4
|
module PreEncounter
|
5
|
-
module
|
5
|
+
module EligibilityChecks
|
6
6
|
module V1
|
7
7
|
module Types
|
8
|
-
# enum to represent the
|
8
|
+
# enum to represent the status of an eligibility checks
|
9
9
|
class EligibilityCheckStatus
|
10
10
|
COMPLETED = "COMPLETED"
|
11
11
|
FAILED = "FAILED"
|
@@ -13,6 +13,11 @@ module CandidApiClient
|
|
13
13
|
module Types
|
14
14
|
# An object representing the data for an eligibility request.
|
15
15
|
class EligibilityRequest
|
16
|
+
# @return [String] A unique identifier for the eligibility check within the batch. Candid returns
|
17
|
+
# this identifier in the response for the
|
18
|
+
# /batch/{batch_id} polling endpoint so you can correlate benefit responses with
|
19
|
+
# the original eligibility check.
|
20
|
+
attr_reader :submitter_transaction_identifier
|
16
21
|
# @return [String] Supported payer ID values can be found
|
17
22
|
# [here](https://www.stedi.com/healthcare/network).
|
18
23
|
attr_reader :payer_id
|
@@ -35,6 +40,10 @@ module CandidApiClient
|
|
35
40
|
|
36
41
|
OMIT = Object.new
|
37
42
|
|
43
|
+
# @param submitter_transaction_identifier [String] A unique identifier for the eligibility check within the batch. Candid returns
|
44
|
+
# this identifier in the response for the
|
45
|
+
# /batch/{batch_id} polling endpoint so you can correlate benefit responses with
|
46
|
+
# the original eligibility check.
|
38
47
|
# @param payer_id [String] Supported payer ID values can be found
|
39
48
|
# [here](https://www.stedi.com/healthcare/network).
|
40
49
|
# @param provider [CandidApiClient::PreEncounter::EligibilityChecks::V1::Types::Provider]
|
@@ -46,8 +55,11 @@ module CandidApiClient
|
|
46
55
|
# @param encounter [CandidApiClient::PreEncounter::EligibilityChecks::V1::Types::Encounter]
|
47
56
|
# @param additional_properties [OpenStruct] Additional properties unmapped to the current class definition
|
48
57
|
# @return [CandidApiClient::PreEncounter::EligibilityChecks::V1::Types::EligibilityRequest]
|
49
|
-
def initialize(payer_id:, provider:, subscriber:,
|
50
|
-
additional_properties: nil)
|
58
|
+
def initialize(payer_id:, provider:, subscriber:, submitter_transaction_identifier: OMIT, dependent: OMIT,
|
59
|
+
encounter: OMIT, additional_properties: nil)
|
60
|
+
if submitter_transaction_identifier != OMIT
|
61
|
+
@submitter_transaction_identifier = submitter_transaction_identifier
|
62
|
+
end
|
51
63
|
@payer_id = payer_id
|
52
64
|
@provider = provider
|
53
65
|
@subscriber = subscriber
|
@@ -55,6 +67,7 @@ module CandidApiClient
|
|
55
67
|
@encounter = encounter if encounter != OMIT
|
56
68
|
@additional_properties = additional_properties
|
57
69
|
@_field_set = {
|
70
|
+
"submitter_transaction_identifier": submitter_transaction_identifier,
|
58
71
|
"payer_id": payer_id,
|
59
72
|
"provider": provider,
|
60
73
|
"subscriber": subscriber,
|
@@ -72,6 +85,7 @@ module CandidApiClient
|
|
72
85
|
def self.from_json(json_object:)
|
73
86
|
struct = JSON.parse(json_object, object_class: OpenStruct)
|
74
87
|
parsed_json = JSON.parse(json_object)
|
88
|
+
submitter_transaction_identifier = struct["submitter_transaction_identifier"]
|
75
89
|
payer_id = struct["payer_id"]
|
76
90
|
if parsed_json["provider"].nil?
|
77
91
|
provider = nil
|
@@ -98,6 +112,7 @@ module CandidApiClient
|
|
98
112
|
encounter = CandidApiClient::PreEncounter::EligibilityChecks::V1::Types::Encounter.from_json(json_object: encounter)
|
99
113
|
end
|
100
114
|
new(
|
115
|
+
submitter_transaction_identifier: submitter_transaction_identifier,
|
101
116
|
payer_id: payer_id,
|
102
117
|
provider: provider,
|
103
118
|
subscriber: subscriber,
|
@@ -121,6 +136,7 @@ module CandidApiClient
|
|
121
136
|
# @param obj [Object]
|
122
137
|
# @return [Void]
|
123
138
|
def self.validate_raw(obj:)
|
139
|
+
obj.submitter_transaction_identifier&.is_a?(String) != false || raise("Passed value for field obj.submitter_transaction_identifier is not the expected type, validation failed.")
|
124
140
|
obj.payer_id.is_a?(String) != false || raise("Passed value for field obj.payer_id is not the expected type, validation failed.")
|
125
141
|
CandidApiClient::PreEncounter::EligibilityChecks::V1::Types::Provider.validate_raw(obj: obj.provider)
|
126
142
|
CandidApiClient::PreEncounter::Coverages::V1::Types::MemberInfo.validate_raw(obj: obj.subscriber)
|
@@ -1,6 +1,6 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
|
-
require_relative "
|
3
|
+
require_relative "eligibility_status"
|
4
4
|
require_relative "../../../coverages/v_1/types/plan_metadata"
|
5
5
|
require_relative "../../../coverages/v_1/types/coverage_benefits"
|
6
6
|
require "ostruct"
|
@@ -12,7 +12,7 @@ module CandidApiClient
|
|
12
12
|
module V1
|
13
13
|
module Types
|
14
14
|
class ParsedResponse
|
15
|
-
# @return [CandidApiClient::PreEncounter::
|
15
|
+
# @return [CandidApiClient::PreEncounter::EligibilityChecks::V1::Types::EligibilityStatus]
|
16
16
|
attr_reader :eligibility_status
|
17
17
|
# @return [CandidApiClient::PreEncounter::Coverages::V1::Types::PlanMetadata]
|
18
18
|
attr_reader :plan_metadata
|
@@ -26,7 +26,7 @@ module CandidApiClient
|
|
26
26
|
|
27
27
|
OMIT = Object.new
|
28
28
|
|
29
|
-
# @param eligibility_status [CandidApiClient::PreEncounter::
|
29
|
+
# @param eligibility_status [CandidApiClient::PreEncounter::EligibilityChecks::V1::Types::EligibilityStatus]
|
30
30
|
# @param plan_metadata [CandidApiClient::PreEncounter::Coverages::V1::Types::PlanMetadata]
|
31
31
|
# @param benefits [CandidApiClient::PreEncounter::Coverages::V1::Types::CoverageBenefits]
|
32
32
|
# @param additional_properties [OpenStruct] Additional properties unmapped to the current class definition
|
@@ -87,7 +87,7 @@ module CandidApiClient
|
|
87
87
|
# @param obj [Object]
|
88
88
|
# @return [Void]
|
89
89
|
def self.validate_raw(obj:)
|
90
|
-
obj.eligibility_status.is_a?(CandidApiClient::PreEncounter::
|
90
|
+
obj.eligibility_status.is_a?(CandidApiClient::PreEncounter::EligibilityChecks::V1::Types::EligibilityStatus) != false || raise("Passed value for field obj.eligibility_status is not the expected type, validation failed.")
|
91
91
|
obj.plan_metadata.nil? || CandidApiClient::PreEncounter::Coverages::V1::Types::PlanMetadata.validate_raw(obj: obj.plan_metadata)
|
92
92
|
obj.benefits.nil? || CandidApiClient::PreEncounter::Coverages::V1::Types::CoverageBenefits.validate_raw(obj: obj.benefits)
|
93
93
|
end
|
@@ -13,6 +13,7 @@ module CandidApiClient
|
|
13
13
|
FULL_CONTRACTUAL_ADJUSTMENT = "Full Contractual Adjustment"
|
14
14
|
INCORRECT_PLACE_OF_SERVICE = "Incorrect Place of Service"
|
15
15
|
INCORRECT_PATIENT_GENDER = "Incorrect Patient Gender"
|
16
|
+
INCORRECT_PATIENT_INFO = "Incorrect Patient Info"
|
16
17
|
BUNDLED = "Bundled"
|
17
18
|
EXCEEDED_BILLABLE_TIME = "Exceeded Billable Time"
|
18
19
|
INVALID_PROVIDER_INFORMATION = "Invalid Provider Information"
|
data/lib/requests.rb
CHANGED
@@ -45,7 +45,7 @@ module CandidApiClient
|
|
45
45
|
|
46
46
|
# @return [Hash{String => String}]
|
47
47
|
def get_headers
|
48
|
-
headers = { "X-Fern-Language": "Ruby", "X-Fern-SDK-Name": "candidhealth", "X-Fern-SDK-Version": "0.
|
48
|
+
headers = { "X-Fern-Language": "Ruby", "X-Fern-SDK-Name": "candidhealth", "X-Fern-SDK-Version": "1.0.0" }
|
49
49
|
headers["Authorization"] = ((@token.is_a? Method) ? @token.call : @token) unless token.nil?
|
50
50
|
headers
|
51
51
|
end
|
@@ -90,7 +90,7 @@ module CandidApiClient
|
|
90
90
|
|
91
91
|
# @return [Hash{String => String}]
|
92
92
|
def get_headers
|
93
|
-
headers = { "X-Fern-Language": "Ruby", "X-Fern-SDK-Name": "candidhealth", "X-Fern-SDK-Version": "0.
|
93
|
+
headers = { "X-Fern-Language": "Ruby", "X-Fern-SDK-Name": "candidhealth", "X-Fern-SDK-Version": "1.0.0" }
|
94
94
|
headers["Authorization"] = ((@token.is_a? Method) ? @token.call : @token) unless token.nil?
|
95
95
|
headers
|
96
96
|
end
|
data/lib/types_export.rb
CHANGED
@@ -323,11 +323,8 @@ require_relative "candidhealth/pre_encounter/appointments/v_1/types/visits_page"
|
|
323
323
|
require_relative "candidhealth/pre_encounter/coverages/v_1/types/payer_plan_group_fields"
|
324
324
|
require_relative "candidhealth/pre_encounter/coverages/v_1/types/coverages_page"
|
325
325
|
require_relative "candidhealth/pre_encounter/coverages/v_1/types/latest_eligibility_check"
|
326
|
-
require_relative "candidhealth/pre_encounter/coverages/v_1/types/eligibility_check_metadata"
|
327
|
-
require_relative "candidhealth/pre_encounter/coverages/v_1/types/coverage_eligibility_check_response"
|
328
|
-
require_relative "candidhealth/pre_encounter/coverages/v_1/types/eligibility_check"
|
329
|
-
require_relative "candidhealth/pre_encounter/coverages/v_1/types/eligibility_check_status"
|
330
326
|
require_relative "candidhealth/pre_encounter/coverages/v_1/types/benefit_type"
|
327
|
+
require_relative "candidhealth/pre_encounter/coverages/v_1/types/coverage_eligibility_check_response"
|
331
328
|
require_relative "candidhealth/pre_encounter/coverages/v_1/types/coverage_value"
|
332
329
|
require_relative "candidhealth/pre_encounter/coverages/v_1/types/coverage_benefits"
|
333
330
|
require_relative "candidhealth/pre_encounter/coverages/v_1/types/coverage_details"
|
@@ -337,7 +334,6 @@ require_relative "candidhealth/pre_encounter/coverages/v_1/types/service_coverag
|
|
337
334
|
require_relative "candidhealth/pre_encounter/coverages/v_1/types/service_coverage_details"
|
338
335
|
require_relative "candidhealth/pre_encounter/coverages/v_1/types/plan_metadata"
|
339
336
|
require_relative "candidhealth/pre_encounter/coverages/v_1/types/plan_date"
|
340
|
-
require_relative "candidhealth/pre_encounter/coverages/v_1/types/eligibility_status"
|
341
337
|
require_relative "candidhealth/pre_encounter/coverages/v_1/types/coverage_level"
|
342
338
|
require_relative "candidhealth/pre_encounter/coverages/v_1/types/coverage_value_unit"
|
343
339
|
require_relative "candidhealth/pre_encounter/coverages/v_1/types/subscriber"
|
@@ -357,11 +353,19 @@ require_relative "candidhealth/pre_encounter/eligibility_checks/v_1/types/indivi
|
|
357
353
|
require_relative "candidhealth/pre_encounter/eligibility_checks/v_1/types/organization_provider"
|
358
354
|
require_relative "candidhealth/pre_encounter/eligibility_checks/v_1/types/provider"
|
359
355
|
require_relative "candidhealth/pre_encounter/eligibility_checks/v_1/types/encounter"
|
356
|
+
require_relative "candidhealth/pre_encounter/eligibility_checks/v_1/types/eligibility_check_status"
|
357
|
+
require_relative "candidhealth/pre_encounter/eligibility_checks/v_1/types/eligibility_status"
|
358
|
+
require_relative "candidhealth/pre_encounter/eligibility_checks/v_1/types/eligibility_check_metadata"
|
360
359
|
require_relative "candidhealth/pre_encounter/eligibility_checks/v_1/types/eligibility_request"
|
361
360
|
require_relative "candidhealth/pre_encounter/eligibility_checks/v_1/types/request_correction"
|
362
361
|
require_relative "candidhealth/pre_encounter/eligibility_checks/v_1/types/parsed_response"
|
362
|
+
require_relative "candidhealth/pre_encounter/eligibility_checks/v_1/types/eligibility_check_error_details"
|
363
|
+
require_relative "candidhealth/pre_encounter/eligibility_checks/v_1/types/eligibility_check_error_source"
|
364
|
+
require_relative "candidhealth/pre_encounter/eligibility_checks/v_1/types/eligibility_check_error"
|
363
365
|
require_relative "candidhealth/pre_encounter/eligibility_checks/v_1/types/eligibility_check"
|
364
366
|
require_relative "candidhealth/pre_encounter/eligibility_checks/v_1/types/eligibility_response"
|
367
|
+
require_relative "candidhealth/pre_encounter/eligibility_checks/v_1/types/batch_eligibility_response"
|
368
|
+
require_relative "candidhealth/pre_encounter/eligibility_checks/v_1/types/eligibility_check_page"
|
365
369
|
require_relative "candidhealth/pre_encounter/images/v_1/types/image_status"
|
366
370
|
require_relative "candidhealth/pre_encounter/images/v_1/types/coverage_image_side"
|
367
371
|
require_relative "candidhealth/pre_encounter/images/v_1/types/coverage_association"
|