candidhealth 1.3.1 → 1.5.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 +885 -235
- data/lib/candidhealth/claim_submission/v_1/types/claim_submission_record_create.rb +4 -4
- data/lib/candidhealth/claim_submission/v_1/types/claim_submission_record_create_optional.rb +4 -4
- data/lib/candidhealth/contracts/v_2/client.rb +4 -4
- data/lib/candidhealth/diagnoses/types/disallow_multiple_primary_diagnosis_error.rb +80 -0
- data/lib/candidhealth/diagnoses/types/service_lines_must_have_at_least_one_diagnosis_error.rb +77 -0
- data/lib/candidhealth/encounters/v_4/types/encounter.rb +151 -2
- data/lib/candidhealth/encounters/v_4/types/encounter_submission_expectation.rb +23 -0
- data/lib/candidhealth/exports/v_3/client.rb +16 -10
- data/lib/candidhealth/fee_schedules/v_3/client.rb +82 -0
- data/lib/candidhealth/individual/types/subscriber_create.rb +6 -2
- data/lib/candidhealth/individual/types/subscriber_create_optional.rb +6 -2
- data/lib/candidhealth/non_insurance_payers/v_1/client.rb +95 -6
- data/lib/candidhealth/non_insurance_payers/v_1/types/non_insurance_payer_categories_page.rb +83 -0
- data/lib/candidhealth/organization_providers/v_3/client.rb +8 -4
- data/lib/candidhealth/organization_service_facilities/v_2/client.rb +8 -2
- data/lib/candidhealth/pre_encounter/appointments/v_1/client.rb +12 -4
- data/lib/candidhealth/pre_encounter/appointments/v_1/types/appointment.rb +11 -3
- data/lib/candidhealth/pre_encounter/appointments/v_1/types/mutable_appointment.rb +9 -1
- data/lib/candidhealth/pre_encounter/appointments/v_1/types/visit.rb +24 -2
- data/lib/candidhealth/pre_encounter/common/types/base_model.rb +2 -2
- data/lib/candidhealth/pre_encounter/coverages/v_1/client.rb +8 -4
- data/lib/candidhealth/pre_encounter/coverages/v_1/types/coverage.rb +6 -4
- data/lib/candidhealth/pre_encounter/coverages/v_1/types/mutable_coverage.rb +4 -2
- data/lib/candidhealth/pre_encounter/eligibility_checks/v_1/client.rb +205 -16
- data/lib/candidhealth/pre_encounter/eligibility_checks/v_1/types/coordination_of_benefits_recommendation.rb +63 -0
- data/lib/candidhealth/pre_encounter/eligibility_checks/v_1/types/eligibility_recommendation.rb +144 -0
- data/lib/candidhealth/pre_encounter/eligibility_checks/v_1/types/eligibility_recommendation_patient_info.rb +124 -0
- data/lib/candidhealth/pre_encounter/eligibility_checks/v_1/types/eligibility_recommendation_payload.rb +102 -0
- data/lib/candidhealth/pre_encounter/eligibility_checks/v_1/types/medicare_advantage_recommendation.rb +70 -0
- data/lib/candidhealth/pre_encounter/eligibility_checks/v_1/types/medicare_advantage_recommendation_payload.rb +96 -0
- data/lib/candidhealth/pre_encounter/eligibility_checks/v_1/types/payer_search_response.rb +107 -0
- data/lib/candidhealth/pre_encounter/eligibility_checks/v_1/types/post_eligibility_recommendation_request.rb +96 -0
- data/lib/candidhealth/pre_encounter/eligibility_checks/v_1/types/stedi_payer.rb +144 -0
- data/lib/candidhealth/pre_encounter/eligibility_checks/v_1/types/stedi_payer_item.rb +79 -0
- data/lib/candidhealth/pre_encounter/images/v_1/types/image.rb +2 -2
- data/lib/candidhealth/pre_encounter/lists/v_1/types/patient_list_item.rb +28 -1
- data/lib/candidhealth/pre_encounter/notes/v_1/types/note.rb +2 -2
- data/lib/candidhealth/pre_encounter/patients/v_1/client.rb +8 -4
- data/lib/candidhealth/pre_encounter/patients/v_1/types/patient.rb +2 -2
- data/lib/candidhealth/pre_encounter/tags/v_1/client.rb +8 -0
- data/lib/candidhealth/pre_encounter/tags/v_1/types/mutable_tag.rb +22 -3
- data/lib/candidhealth/pre_encounter/tags/v_1/types/tag.rb +23 -5
- data/lib/candidhealth/service_lines/v_2/types/service_line.rb +9 -1
- data/lib/candidhealth/x_12/v_1/types/patient_discharge_status_code.rb +52 -0
- data/lib/candidhealth/x_12/v_1/types/point_of_origin_for_admission_or_visit_code.rb +23 -0
- data/lib/candidhealth/x_12/v_1/types/type_of_admission_or_visit_code.rb +18 -0
- data/lib/candidhealth/x_12/v_1/types/type_of_bill_composite.rb +98 -0
- data/lib/candidhealth/x_12/v_1/types/type_of_bill_frequency_code.rb +39 -0
- data/lib/candidhealth/x_12/v_1/types/type_of_care_code.rb +21 -0
- data/lib/candidhealth/x_12/v_1/types/type_of_facility_code.rb +19 -0
- data/lib/requests.rb +2 -2
- data/lib/types_export.rb +21 -1
- metadata +23 -3
- data/lib/candidhealth/claim_submission/v_1/types/claim_frequency_type_code.rb +0 -15
@@ -40,6 +40,8 @@ module CandidApiClient
|
|
40
40
|
attr_reader :estimated_patient_responsibility_cents
|
41
41
|
# @return [Integer]
|
42
42
|
attr_reader :patient_deposit_cents
|
43
|
+
# @return [String]
|
44
|
+
attr_reader :appointment_details
|
43
45
|
# @return [DateTime] The timestamp when the patient checked in for their appointment. If status is
|
44
46
|
# CHECKED_IN, checked_in_timestamp must be set. If checked_in_timestamp is set,
|
45
47
|
# status must be CHECKED_IN.
|
@@ -81,6 +83,7 @@ module CandidApiClient
|
|
81
83
|
# @param estimated_copay_cents [Integer]
|
82
84
|
# @param estimated_patient_responsibility_cents [Integer]
|
83
85
|
# @param patient_deposit_cents [Integer]
|
86
|
+
# @param appointment_details [String]
|
84
87
|
# @param checked_in_timestamp [DateTime] The timestamp when the patient checked in for their appointment. If status is
|
85
88
|
# CHECKED_IN, checked_in_timestamp must be set. If checked_in_timestamp is set,
|
86
89
|
# status must be CHECKED_IN.
|
@@ -97,7 +100,7 @@ module CandidApiClient
|
|
97
100
|
# @param additional_properties [OpenStruct] Additional properties unmapped to the current class definition
|
98
101
|
# @return [CandidApiClient::PreEncounter::Appointments::V1::Types::MutableAppointment]
|
99
102
|
def initialize(patient_id:, start_timestamp:, service_duration:, services:, status: OMIT,
|
100
|
-
placer_appointment_id: OMIT, attending_doctor: OMIT, estimated_copay_cents: OMIT, estimated_patient_responsibility_cents: OMIT, patient_deposit_cents: OMIT, checked_in_timestamp: OMIT, notes: OMIT, location_resource_id: OMIT, automated_eligibility_check_complete: OMIT, work_queue: OMIT, additional_properties: nil)
|
103
|
+
placer_appointment_id: OMIT, attending_doctor: OMIT, estimated_copay_cents: OMIT, estimated_patient_responsibility_cents: OMIT, patient_deposit_cents: OMIT, appointment_details: OMIT, checked_in_timestamp: OMIT, notes: OMIT, location_resource_id: OMIT, automated_eligibility_check_complete: OMIT, work_queue: OMIT, additional_properties: nil)
|
101
104
|
@patient_id = patient_id
|
102
105
|
@start_timestamp = start_timestamp
|
103
106
|
@status = status if status != OMIT
|
@@ -110,6 +113,7 @@ module CandidApiClient
|
|
110
113
|
@estimated_patient_responsibility_cents = estimated_patient_responsibility_cents
|
111
114
|
end
|
112
115
|
@patient_deposit_cents = patient_deposit_cents if patient_deposit_cents != OMIT
|
116
|
+
@appointment_details = appointment_details if appointment_details != OMIT
|
113
117
|
@checked_in_timestamp = checked_in_timestamp if checked_in_timestamp != OMIT
|
114
118
|
@notes = notes if notes != OMIT
|
115
119
|
@location_resource_id = location_resource_id if location_resource_id != OMIT
|
@@ -129,6 +133,7 @@ module CandidApiClient
|
|
129
133
|
"estimated_copay_cents": estimated_copay_cents,
|
130
134
|
"estimated_patient_responsibility_cents": estimated_patient_responsibility_cents,
|
131
135
|
"patient_deposit_cents": patient_deposit_cents,
|
136
|
+
"appointment_details": appointment_details,
|
132
137
|
"checked_in_timestamp": checked_in_timestamp,
|
133
138
|
"notes": notes,
|
134
139
|
"location_resource_id": location_resource_id,
|
@@ -166,6 +171,7 @@ module CandidApiClient
|
|
166
171
|
estimated_copay_cents = struct["estimated_copay_cents"]
|
167
172
|
estimated_patient_responsibility_cents = struct["estimated_patient_responsibility_cents"]
|
168
173
|
patient_deposit_cents = struct["patient_deposit_cents"]
|
174
|
+
appointment_details = struct["appointment_details"]
|
169
175
|
checked_in_timestamp = unless parsed_json["checked_in_timestamp"].nil?
|
170
176
|
DateTime.parse(parsed_json["checked_in_timestamp"])
|
171
177
|
end
|
@@ -184,6 +190,7 @@ module CandidApiClient
|
|
184
190
|
estimated_copay_cents: estimated_copay_cents,
|
185
191
|
estimated_patient_responsibility_cents: estimated_patient_responsibility_cents,
|
186
192
|
patient_deposit_cents: patient_deposit_cents,
|
193
|
+
appointment_details: appointment_details,
|
187
194
|
checked_in_timestamp: checked_in_timestamp,
|
188
195
|
notes: notes,
|
189
196
|
location_resource_id: location_resource_id,
|
@@ -217,6 +224,7 @@ module CandidApiClient
|
|
217
224
|
obj.estimated_copay_cents&.is_a?(Integer) != false || raise("Passed value for field obj.estimated_copay_cents is not the expected type, validation failed.")
|
218
225
|
obj.estimated_patient_responsibility_cents&.is_a?(Integer) != false || raise("Passed value for field obj.estimated_patient_responsibility_cents is not the expected type, validation failed.")
|
219
226
|
obj.patient_deposit_cents&.is_a?(Integer) != false || raise("Passed value for field obj.patient_deposit_cents is not the expected type, validation failed.")
|
227
|
+
obj.appointment_details&.is_a?(String) != false || raise("Passed value for field obj.appointment_details is not the expected type, validation failed.")
|
220
228
|
obj.checked_in_timestamp&.is_a?(DateTime) != false || raise("Passed value for field obj.checked_in_timestamp is not the expected type, validation failed.")
|
221
229
|
obj.notes&.is_a?(String) != false || raise("Passed value for field obj.notes is not the expected type, validation failed.")
|
222
230
|
obj.location_resource_id&.is_a?(String) != false || raise("Passed value for field obj.location_resource_id is not the expected type, validation failed.")
|
@@ -3,6 +3,7 @@
|
|
3
3
|
require_relative "../../../patients/v_1/types/mutable_patient_with_mrn"
|
4
4
|
require "date"
|
5
5
|
require_relative "appointment_status"
|
6
|
+
require_relative "../../../coverages/v_1/types/mutable_coverage"
|
6
7
|
require "ostruct"
|
7
8
|
require "json"
|
8
9
|
|
@@ -21,6 +22,8 @@ module CandidApiClient
|
|
21
22
|
attr_reader :start_time
|
22
23
|
# @return [CandidApiClient::PreEncounter::Appointments::V1::Types::AppointmentStatus]
|
23
24
|
attr_reader :status
|
25
|
+
# @return [CandidApiClient::PreEncounter::Coverages::V1::Types::MutableCoverage]
|
26
|
+
attr_reader :primary_coverage
|
24
27
|
# @return [OpenStruct] Additional properties unmapped to the current class definition
|
25
28
|
attr_reader :additional_properties
|
26
29
|
# @return [Object]
|
@@ -33,15 +36,26 @@ module CandidApiClient
|
|
33
36
|
# @param patient [CandidApiClient::PreEncounter::Patients::V1::Types::MutablePatientWithMrn]
|
34
37
|
# @param start_time [DateTime]
|
35
38
|
# @param status [CandidApiClient::PreEncounter::Appointments::V1::Types::AppointmentStatus]
|
39
|
+
# @param primary_coverage [CandidApiClient::PreEncounter::Coverages::V1::Types::MutableCoverage]
|
36
40
|
# @param additional_properties [OpenStruct] Additional properties unmapped to the current class definition
|
37
41
|
# @return [CandidApiClient::PreEncounter::Appointments::V1::Types::Visit]
|
38
|
-
def initialize(patient_id:, patient:, start_time:, status:,
|
42
|
+
def initialize(patient_id:, patient:, start_time:, status:, primary_coverage: OMIT,
|
43
|
+
additional_properties: nil)
|
39
44
|
@patient_id = patient_id
|
40
45
|
@patient = patient
|
41
46
|
@start_time = start_time
|
42
47
|
@status = status
|
48
|
+
@primary_coverage = primary_coverage if primary_coverage != OMIT
|
43
49
|
@additional_properties = additional_properties
|
44
|
-
@_field_set = {
|
50
|
+
@_field_set = {
|
51
|
+
"patient_id": patient_id,
|
52
|
+
"patient": patient,
|
53
|
+
"start_time": start_time,
|
54
|
+
"status": status,
|
55
|
+
"primary_coverage": primary_coverage
|
56
|
+
}.reject do |_k, v|
|
57
|
+
v == OMIT
|
58
|
+
end
|
45
59
|
end
|
46
60
|
|
47
61
|
# Deserialize a JSON object to an instance of Visit
|
@@ -60,11 +74,18 @@ module CandidApiClient
|
|
60
74
|
end
|
61
75
|
start_time = (DateTime.parse(parsed_json["start_time"]) unless parsed_json["start_time"].nil?)
|
62
76
|
status = struct["status"]
|
77
|
+
if parsed_json["primary_coverage"].nil?
|
78
|
+
primary_coverage = nil
|
79
|
+
else
|
80
|
+
primary_coverage = parsed_json["primary_coverage"].to_json
|
81
|
+
primary_coverage = CandidApiClient::PreEncounter::Coverages::V1::Types::MutableCoverage.from_json(json_object: primary_coverage)
|
82
|
+
end
|
63
83
|
new(
|
64
84
|
patient_id: patient_id,
|
65
85
|
patient: patient,
|
66
86
|
start_time: start_time,
|
67
87
|
status: status,
|
88
|
+
primary_coverage: primary_coverage,
|
68
89
|
additional_properties: struct
|
69
90
|
)
|
70
91
|
end
|
@@ -87,6 +108,7 @@ module CandidApiClient
|
|
87
108
|
CandidApiClient::PreEncounter::Patients::V1::Types::MutablePatientWithMrn.validate_raw(obj: obj.patient)
|
88
109
|
obj.start_time.is_a?(DateTime) != false || raise("Passed value for field obj.start_time is not the expected type, validation failed.")
|
89
110
|
obj.status.is_a?(CandidApiClient::PreEncounter::Appointments::V1::Types::AppointmentStatus) != false || raise("Passed value for field obj.status is not the expected type, validation failed.")
|
111
|
+
obj.primary_coverage.nil? || CandidApiClient::PreEncounter::Coverages::V1::Types::MutableCoverage.validate_raw(obj: obj.primary_coverage)
|
90
112
|
end
|
91
113
|
end
|
92
114
|
end
|
@@ -14,7 +14,7 @@ module CandidApiClient
|
|
14
14
|
# @return [Boolean] True if the object is deactivated. Deactivated objects are not returned in
|
15
15
|
# search results but are returned in all other endpoints including scan.
|
16
16
|
attr_reader :deactivated
|
17
|
-
# @return [Integer] The version of the object.
|
17
|
+
# @return [Integer] The version of the object. Any update to any property of an object object will
|
18
18
|
# create a new version.
|
19
19
|
attr_reader :version
|
20
20
|
# @return [DateTime]
|
@@ -32,7 +32,7 @@ module CandidApiClient
|
|
32
32
|
# @param organization_id [String] The organization that owns this object.
|
33
33
|
# @param deactivated [Boolean] True if the object is deactivated. Deactivated objects are not returned in
|
34
34
|
# search results but are returned in all other endpoints including scan.
|
35
|
-
# @param version [Integer] The version of the object.
|
35
|
+
# @param version [Integer] The version of the object. Any update to any property of an object object will
|
36
36
|
# create a new version.
|
37
37
|
# @param updated_at [DateTime]
|
38
38
|
# @param updating_user_id [String] The user ID of the user who last updated the object.
|
@@ -193,8 +193,10 @@ module CandidApiClient
|
|
193
193
|
CandidApiClient::PreEncounter::Coverages::V1::Types::Coverage.from_json(json_object: response.body)
|
194
194
|
end
|
195
195
|
|
196
|
-
# Updates a Coverage.
|
197
|
-
# race conditions.
|
196
|
+
# Updates a Coverage. The path must contain the next version number to prevent
|
197
|
+
# race conditions. For example, if the current version of the coverage is n, you
|
198
|
+
# will need to send a request to this endpoint with `/{id}/n+1` to update the
|
199
|
+
# coverage. Updating historic versions is not supported.
|
198
200
|
#
|
199
201
|
# @param id [String]
|
200
202
|
# @param version [String]
|
@@ -776,8 +778,10 @@ module CandidApiClient
|
|
776
778
|
end
|
777
779
|
end
|
778
780
|
|
779
|
-
# Updates a Coverage.
|
780
|
-
# race conditions.
|
781
|
+
# Updates a Coverage. The path must contain the next version number to prevent
|
782
|
+
# race conditions. For example, if the current version of the coverage is n, you
|
783
|
+
# will need to send a request to this endpoint with `/{id}/n+1` to update the
|
784
|
+
# coverage. Updating historic versions is not supported.
|
781
785
|
#
|
782
786
|
# @param id [String]
|
783
787
|
# @param version [String]
|
@@ -25,7 +25,7 @@ module CandidApiClient
|
|
25
25
|
# @return [Boolean] True if the object is deactivated. Deactivated objects are not returned in
|
26
26
|
# search results but are returned in all other endpoints including scan.
|
27
27
|
attr_reader :deactivated
|
28
|
-
# @return [Integer] The version of the object.
|
28
|
+
# @return [Integer] The version of the object. Any update to any property of an object object will
|
29
29
|
# create a new version.
|
30
30
|
attr_reader :version
|
31
31
|
# @return [DateTime]
|
@@ -41,7 +41,8 @@ module CandidApiClient
|
|
41
41
|
# @return [CandidApiClient::PreEncounter::Common::Types::Relationship] The relationship of beneficiary (patient) to the subscriber.
|
42
42
|
# https://hl7.org/fhir/valueset-relationship.html
|
43
43
|
attr_reader :relationship
|
44
|
-
# @return [String] The patient
|
44
|
+
# @return [String] The canonical Candid patient UUID corresponding with the patient who benefits
|
45
|
+
# from the insurance coverage
|
45
46
|
attr_reader :patient
|
46
47
|
# @return [CandidApiClient::PreEncounter::Coverages::V1::Types::InsurancePlan]
|
47
48
|
attr_reader :insurance_plan
|
@@ -65,7 +66,7 @@ module CandidApiClient
|
|
65
66
|
# @param organization_id [String] The organization that owns this object.
|
66
67
|
# @param deactivated [Boolean] True if the object is deactivated. Deactivated objects are not returned in
|
67
68
|
# search results but are returned in all other endpoints including scan.
|
68
|
-
# @param version [Integer] The version of the object.
|
69
|
+
# @param version [Integer] The version of the object. Any update to any property of an object object will
|
69
70
|
# create a new version.
|
70
71
|
# @param updated_at [DateTime]
|
71
72
|
# @param updating_user_id [String] The user ID of the user who last updated the object.
|
@@ -75,7 +76,8 @@ module CandidApiClient
|
|
75
76
|
# their family is due.
|
76
77
|
# @param relationship [CandidApiClient::PreEncounter::Common::Types::Relationship] The relationship of beneficiary (patient) to the subscriber.
|
77
78
|
# https://hl7.org/fhir/valueset-relationship.html
|
78
|
-
# @param patient [String] The patient
|
79
|
+
# @param patient [String] The canonical Candid patient UUID corresponding with the patient who benefits
|
80
|
+
# from the insurance coverage
|
79
81
|
# @param insurance_plan [CandidApiClient::PreEncounter::Coverages::V1::Types::InsurancePlan]
|
80
82
|
# @param verified [Boolean] A boolean indicating if the coverage has been verified by a user.
|
81
83
|
# @param eligibility_checks [Array<CandidApiClient::PreEncounter::EligibilityChecks::V1::Types::EligibilityCheckMetadata>] A list of eligibility check metadata that have been initiated on this coverage.
|
@@ -25,7 +25,8 @@ module CandidApiClient
|
|
25
25
|
# @return [CandidApiClient::PreEncounter::Common::Types::Relationship] The relationship of beneficiary (patient) to the subscriber.
|
26
26
|
# https://hl7.org/fhir/valueset-relationship.html
|
27
27
|
attr_reader :relationship
|
28
|
-
# @return [String] The patient
|
28
|
+
# @return [String] The canonical Candid patient UUID corresponding with the patient who benefits
|
29
|
+
# from the insurance coverage
|
29
30
|
attr_reader :patient
|
30
31
|
# @return [CandidApiClient::PreEncounter::Coverages::V1::Types::InsurancePlan]
|
31
32
|
attr_reader :insurance_plan
|
@@ -51,7 +52,8 @@ module CandidApiClient
|
|
51
52
|
# their family is due.
|
52
53
|
# @param relationship [CandidApiClient::PreEncounter::Common::Types::Relationship] The relationship of beneficiary (patient) to the subscriber.
|
53
54
|
# https://hl7.org/fhir/valueset-relationship.html
|
54
|
-
# @param patient [String] The patient
|
55
|
+
# @param patient [String] The canonical Candid patient UUID corresponding with the patient who benefits
|
56
|
+
# from the insurance coverage
|
55
57
|
# @param insurance_plan [CandidApiClient::PreEncounter::Coverages::V1::Types::InsurancePlan]
|
56
58
|
# @param verified [Boolean] A boolean indicating if the coverage has been verified by a user.
|
57
59
|
# @param eligibility_checks [Array<CandidApiClient::PreEncounter::EligibilityChecks::V1::Types::EligibilityCheckMetadata>] A list of eligibility check metadata that have been initiated on this coverage.
|
@@ -5,6 +5,10 @@ require_relative "types/eligibility_request"
|
|
5
5
|
require_relative "types/eligibility_response"
|
6
6
|
require_relative "types/batch_eligibility_response"
|
7
7
|
require_relative "types/eligibility_check_page"
|
8
|
+
require_relative "types/payer_search_response"
|
9
|
+
require_relative "types/eligibility_recommendation"
|
10
|
+
require "json"
|
11
|
+
require_relative "types/post_eligibility_recommendation_request"
|
8
12
|
require "async"
|
9
13
|
|
10
14
|
module CandidApiClient
|
@@ -22,10 +26,6 @@ module CandidApiClient
|
|
22
26
|
end
|
23
27
|
|
24
28
|
# Sends real-time eligibility checks to payers through Stedi.
|
25
|
-
# <Warning>Please only send one concurrent request to this endpoint. Batch
|
26
|
-
# requests must be made in succession, otherwise, it will cause this service to
|
27
|
-
# fail. A batch endpoint is in development - please reach out to the Candid team
|
28
|
-
# for more information.</Warning>
|
29
29
|
#
|
30
30
|
# @param request [Hash] Request of type CandidApiClient::PreEncounter::EligibilityChecks::V1::Types::EligibilityRequest, as a Hash
|
31
31
|
# * :submitter_transaction_identifier (String)
|
@@ -106,17 +106,15 @@ module CandidApiClient
|
|
106
106
|
end
|
107
107
|
|
108
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
109
|
#
|
113
110
|
# @param batch_id [String]
|
111
|
+
# @param page_token [String]
|
114
112
|
# @param request_options [CandidApiClient::RequestOptions]
|
115
113
|
# @return [CandidApiClient::PreEncounter::EligibilityChecks::V1::Types::EligibilityCheckPage]
|
116
114
|
# @example
|
117
115
|
# api = CandidApiClient::Client.new(base_url: "https://api.example.com", environment: CandidApiClient::Environment::PRODUCTION)
|
118
116
|
# api.pre_encounter.eligibility_checks.v_1.poll_batch(batch_id: "batch_id")
|
119
|
-
def poll_batch(batch_id:, request_options: nil)
|
117
|
+
def poll_batch(batch_id:, page_token: nil, request_options: nil)
|
120
118
|
response = @request_client.conn.get do |req|
|
121
119
|
req.options.timeout = request_options.timeout_in_seconds unless request_options&.timeout_in_seconds.nil?
|
122
120
|
req.headers["Authorization"] = request_options.token unless request_options&.token.nil?
|
@@ -125,11 +123,105 @@ module CandidApiClient
|
|
125
123
|
**@request_client.get_headers,
|
126
124
|
**(request_options&.additional_headers || {})
|
127
125
|
}.compact
|
126
|
+
req.params = { **(request_options&.additional_query_parameters || {}), "page_token": page_token }.compact
|
128
127
|
req.url "#{@request_client.get_url(environment: PreEncounter,
|
129
128
|
request_options: request_options)}/eligibility-checks/v1/batch/#{batch_id}"
|
130
129
|
end
|
131
130
|
CandidApiClient::PreEncounter::EligibilityChecks::V1::Types::EligibilityCheckPage.from_json(json_object: response.body)
|
132
131
|
end
|
132
|
+
|
133
|
+
# Searches for payers that match the query parameters.
|
134
|
+
#
|
135
|
+
# @param page_size [Integer]
|
136
|
+
# @param page_token [String]
|
137
|
+
# @param query [String]
|
138
|
+
# @param request_options [CandidApiClient::RequestOptions]
|
139
|
+
# @return [CandidApiClient::PreEncounter::EligibilityChecks::V1::Types::PayerSearchResponse]
|
140
|
+
# @example
|
141
|
+
# api = CandidApiClient::Client.new(base_url: "https://api.example.com", environment: CandidApiClient::Environment::PRODUCTION)
|
142
|
+
# api.pre_encounter.eligibility_checks.v_1.payer_search
|
143
|
+
def payer_search(page_size: nil, page_token: nil, query: nil, request_options: nil)
|
144
|
+
response = @request_client.conn.get do |req|
|
145
|
+
req.options.timeout = request_options.timeout_in_seconds unless request_options&.timeout_in_seconds.nil?
|
146
|
+
req.headers["Authorization"] = request_options.token unless request_options&.token.nil?
|
147
|
+
req.headers = {
|
148
|
+
**(req.headers || {}),
|
149
|
+
**@request_client.get_headers,
|
150
|
+
**(request_options&.additional_headers || {})
|
151
|
+
}.compact
|
152
|
+
req.params = {
|
153
|
+
**(request_options&.additional_query_parameters || {}),
|
154
|
+
"page_size": page_size,
|
155
|
+
"page_token": page_token,
|
156
|
+
"query": query
|
157
|
+
}.compact
|
158
|
+
req.url "#{@request_client.get_url(environment: PreEncounter,
|
159
|
+
request_options: request_options)}/eligibility-checks/v1/payer/search"
|
160
|
+
end
|
161
|
+
CandidApiClient::PreEncounter::EligibilityChecks::V1::Types::PayerSearchResponse.from_json(json_object: response.body)
|
162
|
+
end
|
163
|
+
|
164
|
+
# Gets recommendation for eligibility checks based on the request.
|
165
|
+
#
|
166
|
+
# @param filters [String]
|
167
|
+
# @param request_options [CandidApiClient::RequestOptions]
|
168
|
+
# @return [Array<CandidApiClient::PreEncounter::EligibilityChecks::V1::Types::EligibilityRecommendation>]
|
169
|
+
# @example
|
170
|
+
# api = CandidApiClient::Client.new(base_url: "https://api.example.com", environment: CandidApiClient::Environment::PRODUCTION)
|
171
|
+
# api.pre_encounter.eligibility_checks.v_1.recommendation
|
172
|
+
def recommendation(filters: nil, request_options: nil)
|
173
|
+
response = @request_client.conn.get do |req|
|
174
|
+
req.options.timeout = request_options.timeout_in_seconds unless request_options&.timeout_in_seconds.nil?
|
175
|
+
req.headers["Authorization"] = request_options.token unless request_options&.token.nil?
|
176
|
+
req.headers = {
|
177
|
+
**(req.headers || {}),
|
178
|
+
**@request_client.get_headers,
|
179
|
+
**(request_options&.additional_headers || {})
|
180
|
+
}.compact
|
181
|
+
req.params = { **(request_options&.additional_query_parameters || {}), "filters": filters }.compact
|
182
|
+
req.url "#{@request_client.get_url(environment: PreEncounter,
|
183
|
+
request_options: request_options)}/eligibility-checks/v1/recommendation"
|
184
|
+
end
|
185
|
+
parsed_json = JSON.parse(response.body)
|
186
|
+
parsed_json&.map do |item|
|
187
|
+
item = item.to_json
|
188
|
+
CandidApiClient::PreEncounter::EligibilityChecks::V1::Types::EligibilityRecommendation.from_json(json_object: item)
|
189
|
+
end
|
190
|
+
end
|
191
|
+
|
192
|
+
# Create an eligibiilty recommendation based on the request.
|
193
|
+
#
|
194
|
+
# @param request [Hash] Request of type CandidApiClient::PreEncounter::EligibilityChecks::V1::Types::PostEligibilityRecommendationRequest, as a Hash
|
195
|
+
# * :eligibility_check_id (String)
|
196
|
+
# * :patient (Hash)
|
197
|
+
# * :id (String)
|
198
|
+
# * :mrn (String)
|
199
|
+
# * :organization_id (String)
|
200
|
+
# * :last_name (String)
|
201
|
+
# * :first_name (String)
|
202
|
+
# * :date_of_birth (Date)
|
203
|
+
# * :member_id (String)
|
204
|
+
# * :recommendation (Hash)
|
205
|
+
# @param request_options [CandidApiClient::RequestOptions]
|
206
|
+
# @return [CandidApiClient::PreEncounter::EligibilityChecks::V1::Types::EligibilityRecommendation]
|
207
|
+
# @example
|
208
|
+
# api = CandidApiClient::Client.new(base_url: "https://api.example.com", environment: CandidApiClient::Environment::PRODUCTION)
|
209
|
+
# api.pre_encounter.eligibility_checks.v_1.create_recommendation(request: { eligibility_check_id: "eligibility_check_id", patient: { } })
|
210
|
+
def create_recommendation(request:, request_options: nil)
|
211
|
+
response = @request_client.conn.post do |req|
|
212
|
+
req.options.timeout = request_options.timeout_in_seconds unless request_options&.timeout_in_seconds.nil?
|
213
|
+
req.headers["Authorization"] = request_options.token unless request_options&.token.nil?
|
214
|
+
req.headers = {
|
215
|
+
**(req.headers || {}),
|
216
|
+
**@request_client.get_headers,
|
217
|
+
**(request_options&.additional_headers || {})
|
218
|
+
}.compact
|
219
|
+
req.body = { **(request || {}), **(request_options&.additional_body_parameters || {}) }.compact
|
220
|
+
req.url "#{@request_client.get_url(environment: PreEncounter,
|
221
|
+
request_options: request_options)}/eligibility-checks/v1/recommendation"
|
222
|
+
end
|
223
|
+
CandidApiClient::PreEncounter::EligibilityChecks::V1::Types::EligibilityRecommendation.from_json(json_object: response.body)
|
224
|
+
end
|
133
225
|
end
|
134
226
|
|
135
227
|
class AsyncV1Client
|
@@ -143,10 +235,6 @@ module CandidApiClient
|
|
143
235
|
end
|
144
236
|
|
145
237
|
# Sends real-time eligibility checks to payers through Stedi.
|
146
|
-
# <Warning>Please only send one concurrent request to this endpoint. Batch
|
147
|
-
# requests must be made in succession, otherwise, it will cause this service to
|
148
|
-
# fail. A batch endpoint is in development - please reach out to the Candid team
|
149
|
-
# for more information.</Warning>
|
150
238
|
#
|
151
239
|
# @param request [Hash] Request of type CandidApiClient::PreEncounter::EligibilityChecks::V1::Types::EligibilityRequest, as a Hash
|
152
240
|
# * :submitter_transaction_identifier (String)
|
@@ -231,17 +319,15 @@ module CandidApiClient
|
|
231
319
|
end
|
232
320
|
|
233
321
|
# 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
322
|
#
|
238
323
|
# @param batch_id [String]
|
324
|
+
# @param page_token [String]
|
239
325
|
# @param request_options [CandidApiClient::RequestOptions]
|
240
326
|
# @return [CandidApiClient::PreEncounter::EligibilityChecks::V1::Types::EligibilityCheckPage]
|
241
327
|
# @example
|
242
328
|
# api = CandidApiClient::Client.new(base_url: "https://api.example.com", environment: CandidApiClient::Environment::PRODUCTION)
|
243
329
|
# api.pre_encounter.eligibility_checks.v_1.poll_batch(batch_id: "batch_id")
|
244
|
-
def poll_batch(batch_id:, request_options: nil)
|
330
|
+
def poll_batch(batch_id:, page_token: nil, request_options: nil)
|
245
331
|
Async do
|
246
332
|
response = @request_client.conn.get do |req|
|
247
333
|
req.options.timeout = request_options.timeout_in_seconds unless request_options&.timeout_in_seconds.nil?
|
@@ -251,12 +337,115 @@ module CandidApiClient
|
|
251
337
|
**@request_client.get_headers,
|
252
338
|
**(request_options&.additional_headers || {})
|
253
339
|
}.compact
|
340
|
+
req.params = {
|
341
|
+
**(request_options&.additional_query_parameters || {}),
|
342
|
+
"page_token": page_token
|
343
|
+
}.compact
|
254
344
|
req.url "#{@request_client.get_url(environment: PreEncounter,
|
255
345
|
request_options: request_options)}/eligibility-checks/v1/batch/#{batch_id}"
|
256
346
|
end
|
257
347
|
CandidApiClient::PreEncounter::EligibilityChecks::V1::Types::EligibilityCheckPage.from_json(json_object: response.body)
|
258
348
|
end
|
259
349
|
end
|
350
|
+
|
351
|
+
# Searches for payers that match the query parameters.
|
352
|
+
#
|
353
|
+
# @param page_size [Integer]
|
354
|
+
# @param page_token [String]
|
355
|
+
# @param query [String]
|
356
|
+
# @param request_options [CandidApiClient::RequestOptions]
|
357
|
+
# @return [CandidApiClient::PreEncounter::EligibilityChecks::V1::Types::PayerSearchResponse]
|
358
|
+
# @example
|
359
|
+
# api = CandidApiClient::Client.new(base_url: "https://api.example.com", environment: CandidApiClient::Environment::PRODUCTION)
|
360
|
+
# api.pre_encounter.eligibility_checks.v_1.payer_search
|
361
|
+
def payer_search(page_size: nil, page_token: nil, query: nil, request_options: nil)
|
362
|
+
Async do
|
363
|
+
response = @request_client.conn.get do |req|
|
364
|
+
req.options.timeout = request_options.timeout_in_seconds unless request_options&.timeout_in_seconds.nil?
|
365
|
+
req.headers["Authorization"] = request_options.token unless request_options&.token.nil?
|
366
|
+
req.headers = {
|
367
|
+
**(req.headers || {}),
|
368
|
+
**@request_client.get_headers,
|
369
|
+
**(request_options&.additional_headers || {})
|
370
|
+
}.compact
|
371
|
+
req.params = {
|
372
|
+
**(request_options&.additional_query_parameters || {}),
|
373
|
+
"page_size": page_size,
|
374
|
+
"page_token": page_token,
|
375
|
+
"query": query
|
376
|
+
}.compact
|
377
|
+
req.url "#{@request_client.get_url(environment: PreEncounter,
|
378
|
+
request_options: request_options)}/eligibility-checks/v1/payer/search"
|
379
|
+
end
|
380
|
+
CandidApiClient::PreEncounter::EligibilityChecks::V1::Types::PayerSearchResponse.from_json(json_object: response.body)
|
381
|
+
end
|
382
|
+
end
|
383
|
+
|
384
|
+
# Gets recommendation for eligibility checks based on the request.
|
385
|
+
#
|
386
|
+
# @param filters [String]
|
387
|
+
# @param request_options [CandidApiClient::RequestOptions]
|
388
|
+
# @return [Array<CandidApiClient::PreEncounter::EligibilityChecks::V1::Types::EligibilityRecommendation>]
|
389
|
+
# @example
|
390
|
+
# api = CandidApiClient::Client.new(base_url: "https://api.example.com", environment: CandidApiClient::Environment::PRODUCTION)
|
391
|
+
# api.pre_encounter.eligibility_checks.v_1.recommendation
|
392
|
+
def recommendation(filters: nil, request_options: nil)
|
393
|
+
Async do
|
394
|
+
response = @request_client.conn.get do |req|
|
395
|
+
req.options.timeout = request_options.timeout_in_seconds unless request_options&.timeout_in_seconds.nil?
|
396
|
+
req.headers["Authorization"] = request_options.token unless request_options&.token.nil?
|
397
|
+
req.headers = {
|
398
|
+
**(req.headers || {}),
|
399
|
+
**@request_client.get_headers,
|
400
|
+
**(request_options&.additional_headers || {})
|
401
|
+
}.compact
|
402
|
+
req.params = { **(request_options&.additional_query_parameters || {}), "filters": filters }.compact
|
403
|
+
req.url "#{@request_client.get_url(environment: PreEncounter,
|
404
|
+
request_options: request_options)}/eligibility-checks/v1/recommendation"
|
405
|
+
end
|
406
|
+
parsed_json = JSON.parse(response.body)
|
407
|
+
parsed_json&.map do |item|
|
408
|
+
item = item.to_json
|
409
|
+
CandidApiClient::PreEncounter::EligibilityChecks::V1::Types::EligibilityRecommendation.from_json(json_object: item)
|
410
|
+
end
|
411
|
+
end
|
412
|
+
end
|
413
|
+
|
414
|
+
# Create an eligibiilty recommendation based on the request.
|
415
|
+
#
|
416
|
+
# @param request [Hash] Request of type CandidApiClient::PreEncounter::EligibilityChecks::V1::Types::PostEligibilityRecommendationRequest, as a Hash
|
417
|
+
# * :eligibility_check_id (String)
|
418
|
+
# * :patient (Hash)
|
419
|
+
# * :id (String)
|
420
|
+
# * :mrn (String)
|
421
|
+
# * :organization_id (String)
|
422
|
+
# * :last_name (String)
|
423
|
+
# * :first_name (String)
|
424
|
+
# * :date_of_birth (Date)
|
425
|
+
# * :member_id (String)
|
426
|
+
# * :recommendation (Hash)
|
427
|
+
# @param request_options [CandidApiClient::RequestOptions]
|
428
|
+
# @return [CandidApiClient::PreEncounter::EligibilityChecks::V1::Types::EligibilityRecommendation]
|
429
|
+
# @example
|
430
|
+
# api = CandidApiClient::Client.new(base_url: "https://api.example.com", environment: CandidApiClient::Environment::PRODUCTION)
|
431
|
+
# api.pre_encounter.eligibility_checks.v_1.create_recommendation(request: { eligibility_check_id: "eligibility_check_id", patient: { } })
|
432
|
+
def create_recommendation(request:, request_options: nil)
|
433
|
+
Async do
|
434
|
+
response = @request_client.conn.post do |req|
|
435
|
+
req.options.timeout = request_options.timeout_in_seconds unless request_options&.timeout_in_seconds.nil?
|
436
|
+
req.headers["Authorization"] = request_options.token unless request_options&.token.nil?
|
437
|
+
req.headers = {
|
438
|
+
**(req.headers || {}),
|
439
|
+
**@request_client.get_headers,
|
440
|
+
**(request_options&.additional_headers || {})
|
441
|
+
}.compact
|
442
|
+
req.body = { **(request || {}), **(request_options&.additional_body_parameters || {}) }.compact
|
443
|
+
req.url "#{@request_client.get_url(environment: PreEncounter,
|
444
|
+
request_options: request_options)}/eligibility-checks/v1/recommendation"
|
445
|
+
end
|
446
|
+
CandidApiClient::PreEncounter::EligibilityChecks::V1::Types::EligibilityRecommendation.from_json(json_object: response.body)
|
447
|
+
end
|
448
|
+
end
|
260
449
|
end
|
261
450
|
end
|
262
451
|
end
|
@@ -0,0 +1,63 @@
|
|
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
|
+
# An object representing a Coordination Of Benefits recommendation.
|
12
|
+
class CoordinationOfBenefitsRecommendation
|
13
|
+
# @return [Object]
|
14
|
+
attr_reader :payload
|
15
|
+
# @return [OpenStruct] Additional properties unmapped to the current class definition
|
16
|
+
attr_reader :additional_properties
|
17
|
+
# @return [Object]
|
18
|
+
attr_reader :_field_set
|
19
|
+
protected :_field_set
|
20
|
+
|
21
|
+
OMIT = Object.new
|
22
|
+
|
23
|
+
# @param payload [Object]
|
24
|
+
# @param additional_properties [OpenStruct] Additional properties unmapped to the current class definition
|
25
|
+
# @return [CandidApiClient::PreEncounter::EligibilityChecks::V1::Types::CoordinationOfBenefitsRecommendation]
|
26
|
+
def initialize(payload:, additional_properties: nil)
|
27
|
+
@payload = payload
|
28
|
+
@additional_properties = additional_properties
|
29
|
+
@_field_set = { "payload": payload }
|
30
|
+
end
|
31
|
+
|
32
|
+
# Deserialize a JSON object to an instance of CoordinationOfBenefitsRecommendation
|
33
|
+
#
|
34
|
+
# @param json_object [String]
|
35
|
+
# @return [CandidApiClient::PreEncounter::EligibilityChecks::V1::Types::CoordinationOfBenefitsRecommendation]
|
36
|
+
def self.from_json(json_object:)
|
37
|
+
struct = JSON.parse(json_object, object_class: OpenStruct)
|
38
|
+
payload = struct["payload"]
|
39
|
+
new(payload: payload, additional_properties: struct)
|
40
|
+
end
|
41
|
+
|
42
|
+
# Serialize an instance of CoordinationOfBenefitsRecommendation to a JSON object
|
43
|
+
#
|
44
|
+
# @return [String]
|
45
|
+
def to_json(*_args)
|
46
|
+
@_field_set&.to_json
|
47
|
+
end
|
48
|
+
|
49
|
+
# Leveraged for Union-type generation, validate_raw attempts to parse the given
|
50
|
+
# hash and check each fields type against the current object's property
|
51
|
+
# definitions.
|
52
|
+
#
|
53
|
+
# @param obj [Object]
|
54
|
+
# @return [Void]
|
55
|
+
def self.validate_raw(obj:)
|
56
|
+
obj.payload.is_a?(Object) != false || raise("Passed value for field obj.payload is not the expected type, validation failed.")
|
57
|
+
end
|
58
|
+
end
|
59
|
+
end
|
60
|
+
end
|
61
|
+
end
|
62
|
+
end
|
63
|
+
end
|