candidhealth 0.39.5 → 0.39.7
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 +8 -0
- data/lib/candidhealth/commons/types/procedure_modifier.rb +1 -0
- data/lib/candidhealth/encounters/v_4/client.rb +12 -4
- data/lib/candidhealth/encounters/v_4/types/payer_plan_group_payer_does_not_match_insurance_card_error.rb +77 -0
- data/lib/candidhealth/fee_schedules/v_3/client.rb +16 -4
- data/lib/candidhealth/fee_schedules/v_3/types/dimension_match.rb +16 -2
- data/lib/candidhealth/fee_schedules/v_3/types/dimensions.rb +16 -2
- data/lib/candidhealth/fee_schedules/v_3/types/match_payer_plan_groups.rb +85 -0
- data/lib/candidhealth/fee_schedules/v_3/types/optional_dimensions.rb +15 -2
- data/lib/candidhealth/fee_schedules/v_3/types/payer_plan_group_does_not_match_rate_payer_error.rb +75 -0
- data/lib/candidhealth/fee_schedules/v_3/types/validation_error.rb +39 -14
- data/lib/candidhealth/insurance_cards/v_2/types/insurance_card.rb +10 -2
- data/lib/candidhealth/insurance_cards/v_2/types/insurance_card_base.rb +10 -2
- data/lib/candidhealth/insurance_cards/v_2/types/insurance_card_create.rb +10 -2
- data/lib/candidhealth/organization_providers/v_2/types/license_type.rb +27 -0
- data/lib/candidhealth/pre_encounter/appointments/v_1/client.rb +98 -4
- data/lib/candidhealth/pre_encounter/appointments/v_1/types/appointment.rb +2 -2
- data/lib/candidhealth/pre_encounter/appointments/v_1/types/mutable_appointment.rb +2 -2
- data/lib/candidhealth/pre_encounter/appointments/v_1/types/visit.rb +96 -0
- data/lib/candidhealth/pre_encounter/appointments/v_1/types/visits_page.rb +98 -0
- data/lib/candidhealth/pre_encounter/common/types/external_identifier.rb +87 -0
- data/lib/candidhealth/pre_encounter/common/types/external_provider.rb +10 -2
- data/lib/candidhealth/pre_encounter/coverages/v_1/client.rb +89 -4
- data/lib/candidhealth/pre_encounter/coverages/v_1/types/address.rb +118 -0
- data/lib/candidhealth/pre_encounter/coverages/v_1/types/benefits_related_entity.rb +11 -2
- data/lib/candidhealth/pre_encounter/coverages/v_1/types/coverages_page.rb +98 -0
- data/lib/candidhealth/pre_encounter/coverages/v_1/types/expanded_member_info.rb +133 -0
- data/lib/candidhealth/pre_encounter/coverages/v_1/types/insurance_plan.rb +10 -2
- data/lib/candidhealth/pre_encounter/coverages/v_1/types/insurance_type_code.rb +1 -0
- data/lib/candidhealth/pre_encounter/coverages/v_1/types/member_info.rb +93 -0
- data/lib/candidhealth/pre_encounter/coverages/v_1/types/plan_metadata.rb +38 -3
- data/lib/candidhealth/pre_encounter/eligibility_checks/client.rb +32 -0
- data/lib/candidhealth/pre_encounter/eligibility_checks/v_1/client.rb +116 -0
- data/lib/candidhealth/pre_encounter/eligibility_checks/v_1/types/eligibility_check.rb +119 -0
- data/lib/candidhealth/pre_encounter/eligibility_checks/v_1/types/eligibility_request.rb +135 -0
- data/lib/candidhealth/pre_encounter/eligibility_checks/v_1/types/eligibility_response.rb +15 -0
- data/lib/candidhealth/pre_encounter/eligibility_checks/v_1/types/encounter.rb +83 -0
- data/lib/candidhealth/pre_encounter/eligibility_checks/v_1/types/individual_provider.rb +81 -0
- data/lib/candidhealth/pre_encounter/eligibility_checks/v_1/types/organization_provider.rb +74 -0
- data/lib/candidhealth/pre_encounter/eligibility_checks/v_1/types/parsed_response.rb +99 -0
- data/lib/candidhealth/pre_encounter/eligibility_checks/v_1/types/provider.rb +66 -0
- data/lib/candidhealth/pre_encounter/eligibility_checks/v_1/types/request_correction.rb +79 -0
- data/lib/candidhealth/pre_encounter/lists/v_1/types/appointment_list_item.rb +5 -5
- data/lib/candidhealth/pre_encounter/patients/v_1/client.rb +70 -14
- data/lib/candidhealth/pre_encounter/patients/v_1/types/mutable_patient.rb +14 -2
- data/lib/candidhealth/pre_encounter/patients/v_1/types/mutable_patient_with_mrn.rb +14 -2
- data/lib/candidhealth/pre_encounter/patients/v_1/types/patient.rb +13 -1
- data/lib/requests.rb +2 -2
- data/lib/types_export.rb +19 -0
- metadata +23 -2
@@ -56,7 +56,7 @@ module CandidApiClient
|
|
56
56
|
attr_reader :automated_eligibility_check_complete
|
57
57
|
# @return [CandidApiClient::PreEncounter::Appointments::V1::Types::AppointmentWorkQueue] The work queue that the appointment belongs to. It is not recommended to change
|
58
58
|
# this value manually via API. If status is NOT_READY, work_queue must be set. If
|
59
|
-
# status is READY
|
59
|
+
# status is READY, work_queue must be null.
|
60
60
|
attr_reader :work_queue
|
61
61
|
# @return [OpenStruct] Additional properties unmapped to the current class definition
|
62
62
|
attr_reader :additional_properties
|
@@ -93,7 +93,7 @@ module CandidApiClient
|
|
93
93
|
# appointment.
|
94
94
|
# @param work_queue [CandidApiClient::PreEncounter::Appointments::V1::Types::AppointmentWorkQueue] The work queue that the appointment belongs to. It is not recommended to change
|
95
95
|
# this value manually via API. If status is NOT_READY, work_queue must be set. If
|
96
|
-
# status is READY
|
96
|
+
# status is READY, work_queue must be null.
|
97
97
|
# @param additional_properties [OpenStruct] Additional properties unmapped to the current class definition
|
98
98
|
# @return [CandidApiClient::PreEncounter::Appointments::V1::Types::MutableAppointment]
|
99
99
|
def initialize(patient_id:, start_timestamp:, service_duration:, services:, status: OMIT,
|
@@ -0,0 +1,96 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require_relative "../../../patients/v_1/types/mutable_patient_with_mrn"
|
4
|
+
require "date"
|
5
|
+
require_relative "appointment_status"
|
6
|
+
require "ostruct"
|
7
|
+
require "json"
|
8
|
+
|
9
|
+
module CandidApiClient
|
10
|
+
module PreEncounter
|
11
|
+
module Appointments
|
12
|
+
module V1
|
13
|
+
module Types
|
14
|
+
# A visit is a collection of appointments that occur on the same day.
|
15
|
+
class Visit
|
16
|
+
# @return [String]
|
17
|
+
attr_reader :patient_id
|
18
|
+
# @return [CandidApiClient::PreEncounter::Patients::V1::Types::MutablePatientWithMrn]
|
19
|
+
attr_reader :patient
|
20
|
+
# @return [DateTime]
|
21
|
+
attr_reader :start_time
|
22
|
+
# @return [CandidApiClient::PreEncounter::Appointments::V1::Types::AppointmentStatus]
|
23
|
+
attr_reader :status
|
24
|
+
# @return [OpenStruct] Additional properties unmapped to the current class definition
|
25
|
+
attr_reader :additional_properties
|
26
|
+
# @return [Object]
|
27
|
+
attr_reader :_field_set
|
28
|
+
protected :_field_set
|
29
|
+
|
30
|
+
OMIT = Object.new
|
31
|
+
|
32
|
+
# @param patient_id [String]
|
33
|
+
# @param patient [CandidApiClient::PreEncounter::Patients::V1::Types::MutablePatientWithMrn]
|
34
|
+
# @param start_time [DateTime]
|
35
|
+
# @param status [CandidApiClient::PreEncounter::Appointments::V1::Types::AppointmentStatus]
|
36
|
+
# @param additional_properties [OpenStruct] Additional properties unmapped to the current class definition
|
37
|
+
# @return [CandidApiClient::PreEncounter::Appointments::V1::Types::Visit]
|
38
|
+
def initialize(patient_id:, patient:, start_time:, status:, additional_properties: nil)
|
39
|
+
@patient_id = patient_id
|
40
|
+
@patient = patient
|
41
|
+
@start_time = start_time
|
42
|
+
@status = status
|
43
|
+
@additional_properties = additional_properties
|
44
|
+
@_field_set = { "patient_id": patient_id, "patient": patient, "start_time": start_time, "status": status }
|
45
|
+
end
|
46
|
+
|
47
|
+
# Deserialize a JSON object to an instance of Visit
|
48
|
+
#
|
49
|
+
# @param json_object [String]
|
50
|
+
# @return [CandidApiClient::PreEncounter::Appointments::V1::Types::Visit]
|
51
|
+
def self.from_json(json_object:)
|
52
|
+
struct = JSON.parse(json_object, object_class: OpenStruct)
|
53
|
+
parsed_json = JSON.parse(json_object)
|
54
|
+
patient_id = struct["patient_id"]
|
55
|
+
if parsed_json["patient"].nil?
|
56
|
+
patient = nil
|
57
|
+
else
|
58
|
+
patient = parsed_json["patient"].to_json
|
59
|
+
patient = CandidApiClient::PreEncounter::Patients::V1::Types::MutablePatientWithMrn.from_json(json_object: patient)
|
60
|
+
end
|
61
|
+
start_time = (DateTime.parse(parsed_json["start_time"]) unless parsed_json["start_time"].nil?)
|
62
|
+
status = struct["status"]
|
63
|
+
new(
|
64
|
+
patient_id: patient_id,
|
65
|
+
patient: patient,
|
66
|
+
start_time: start_time,
|
67
|
+
status: status,
|
68
|
+
additional_properties: struct
|
69
|
+
)
|
70
|
+
end
|
71
|
+
|
72
|
+
# Serialize an instance of Visit to a JSON object
|
73
|
+
#
|
74
|
+
# @return [String]
|
75
|
+
def to_json(*_args)
|
76
|
+
@_field_set&.to_json
|
77
|
+
end
|
78
|
+
|
79
|
+
# Leveraged for Union-type generation, validate_raw attempts to parse the given
|
80
|
+
# hash and check each fields type against the current object's property
|
81
|
+
# definitions.
|
82
|
+
#
|
83
|
+
# @param obj [Object]
|
84
|
+
# @return [Void]
|
85
|
+
def self.validate_raw(obj:)
|
86
|
+
obj.patient_id.is_a?(String) != false || raise("Passed value for field obj.patient_id is not the expected type, validation failed.")
|
87
|
+
CandidApiClient::PreEncounter::Patients::V1::Types::MutablePatientWithMrn.validate_raw(obj: obj.patient)
|
88
|
+
obj.start_time.is_a?(DateTime) != false || raise("Passed value for field obj.start_time is not the expected type, validation failed.")
|
89
|
+
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.")
|
90
|
+
end
|
91
|
+
end
|
92
|
+
end
|
93
|
+
end
|
94
|
+
end
|
95
|
+
end
|
96
|
+
end
|
@@ -0,0 +1,98 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require_relative "visit"
|
4
|
+
require "ostruct"
|
5
|
+
require "json"
|
6
|
+
|
7
|
+
module CandidApiClient
|
8
|
+
module PreEncounter
|
9
|
+
module Appointments
|
10
|
+
module V1
|
11
|
+
module Types
|
12
|
+
class VisitsPage
|
13
|
+
# @return [Array<CandidApiClient::PreEncounter::Appointments::V1::Types::Visit>]
|
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::Appointments::V1::Types::Visit>]
|
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::Appointments::V1::Types::VisitsPage]
|
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 VisitsPage
|
52
|
+
#
|
53
|
+
# @param json_object [String]
|
54
|
+
# @return [CandidApiClient::PreEncounter::Appointments::V1::Types::VisitsPage]
|
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::Appointments::V1::Types::Visit.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 VisitsPage 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
|
@@ -0,0 +1,87 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require_relative "period"
|
4
|
+
require "ostruct"
|
5
|
+
require "json"
|
6
|
+
|
7
|
+
module CandidApiClient
|
8
|
+
module PreEncounter
|
9
|
+
module Common
|
10
|
+
module Types
|
11
|
+
# An external identifier for a patient
|
12
|
+
class ExternalIdentifier
|
13
|
+
# @return [String]
|
14
|
+
attr_reader :value
|
15
|
+
# @return [String]
|
16
|
+
attr_reader :system
|
17
|
+
# @return [CandidApiClient::PreEncounter::Common::Types::Period]
|
18
|
+
attr_reader :period
|
19
|
+
# @return [OpenStruct] Additional properties unmapped to the current class definition
|
20
|
+
attr_reader :additional_properties
|
21
|
+
# @return [Object]
|
22
|
+
attr_reader :_field_set
|
23
|
+
protected :_field_set
|
24
|
+
|
25
|
+
OMIT = Object.new
|
26
|
+
|
27
|
+
# @param value [String]
|
28
|
+
# @param system [String]
|
29
|
+
# @param period [CandidApiClient::PreEncounter::Common::Types::Period]
|
30
|
+
# @param additional_properties [OpenStruct] Additional properties unmapped to the current class definition
|
31
|
+
# @return [CandidApiClient::PreEncounter::Common::Types::ExternalIdentifier]
|
32
|
+
def initialize(value:, system:, period: OMIT, additional_properties: nil)
|
33
|
+
@value = value
|
34
|
+
@system = system
|
35
|
+
@period = period if period != OMIT
|
36
|
+
@additional_properties = additional_properties
|
37
|
+
@_field_set = { "value": value, "system": system, "period": period }.reject do |_k, v|
|
38
|
+
v == OMIT
|
39
|
+
end
|
40
|
+
end
|
41
|
+
|
42
|
+
# Deserialize a JSON object to an instance of ExternalIdentifier
|
43
|
+
#
|
44
|
+
# @param json_object [String]
|
45
|
+
# @return [CandidApiClient::PreEncounter::Common::Types::ExternalIdentifier]
|
46
|
+
def self.from_json(json_object:)
|
47
|
+
struct = JSON.parse(json_object, object_class: OpenStruct)
|
48
|
+
parsed_json = JSON.parse(json_object)
|
49
|
+
value = struct["value"]
|
50
|
+
system = struct["system"]
|
51
|
+
if parsed_json["period"].nil?
|
52
|
+
period = nil
|
53
|
+
else
|
54
|
+
period = parsed_json["period"].to_json
|
55
|
+
period = CandidApiClient::PreEncounter::Common::Types::Period.from_json(json_object: period)
|
56
|
+
end
|
57
|
+
new(
|
58
|
+
value: value,
|
59
|
+
system: system,
|
60
|
+
period: period,
|
61
|
+
additional_properties: struct
|
62
|
+
)
|
63
|
+
end
|
64
|
+
|
65
|
+
# Serialize an instance of ExternalIdentifier to a JSON object
|
66
|
+
#
|
67
|
+
# @return [String]
|
68
|
+
def to_json(*_args)
|
69
|
+
@_field_set&.to_json
|
70
|
+
end
|
71
|
+
|
72
|
+
# Leveraged for Union-type generation, validate_raw attempts to parse the given
|
73
|
+
# hash and check each fields type against the current object's property
|
74
|
+
# definitions.
|
75
|
+
#
|
76
|
+
# @param obj [Object]
|
77
|
+
# @return [Void]
|
78
|
+
def self.validate_raw(obj:)
|
79
|
+
obj.value.is_a?(String) != false || raise("Passed value for field obj.value is not the expected type, validation failed.")
|
80
|
+
obj.system.is_a?(String) != false || raise("Passed value for field obj.system is not the expected type, validation failed.")
|
81
|
+
obj.period.nil? || CandidApiClient::PreEncounter::Common::Types::Period.validate_raw(obj: obj.period)
|
82
|
+
end
|
83
|
+
end
|
84
|
+
end
|
85
|
+
end
|
86
|
+
end
|
87
|
+
end
|
@@ -27,6 +27,8 @@ module CandidApiClient
|
|
27
27
|
attr_reader :period
|
28
28
|
# @return [String]
|
29
29
|
attr_reader :canonical_id
|
30
|
+
# @return [String]
|
31
|
+
attr_reader :fax
|
30
32
|
# @return [OpenStruct] Additional properties unmapped to the current class definition
|
31
33
|
attr_reader :additional_properties
|
32
34
|
# @return [Object]
|
@@ -42,10 +44,11 @@ module CandidApiClient
|
|
42
44
|
# @param addresses [Array<CandidApiClient::PreEncounter::Common::Types::Address>]
|
43
45
|
# @param period [CandidApiClient::PreEncounter::Common::Types::Period]
|
44
46
|
# @param canonical_id [String]
|
47
|
+
# @param fax [String]
|
45
48
|
# @param additional_properties [OpenStruct] Additional properties unmapped to the current class definition
|
46
49
|
# @return [CandidApiClient::PreEncounter::Common::Types::ExternalProvider]
|
47
50
|
def initialize(name:, telecoms:, type: OMIT, npi: OMIT, addresses: OMIT, period: OMIT, canonical_id: OMIT,
|
48
|
-
additional_properties: nil)
|
51
|
+
fax: OMIT, additional_properties: nil)
|
49
52
|
@name = name
|
50
53
|
@type = type if type != OMIT
|
51
54
|
@npi = npi if npi != OMIT
|
@@ -53,6 +56,7 @@ module CandidApiClient
|
|
53
56
|
@addresses = addresses if addresses != OMIT
|
54
57
|
@period = period if period != OMIT
|
55
58
|
@canonical_id = canonical_id if canonical_id != OMIT
|
59
|
+
@fax = fax if fax != OMIT
|
56
60
|
@additional_properties = additional_properties
|
57
61
|
@_field_set = {
|
58
62
|
"name": name,
|
@@ -61,7 +65,8 @@ module CandidApiClient
|
|
61
65
|
"telecoms": telecoms,
|
62
66
|
"addresses": addresses,
|
63
67
|
"period": period,
|
64
|
-
"canonical_id": canonical_id
|
68
|
+
"canonical_id": canonical_id,
|
69
|
+
"fax": fax
|
65
70
|
}.reject do |_k, v|
|
66
71
|
v == OMIT
|
67
72
|
end
|
@@ -97,6 +102,7 @@ module CandidApiClient
|
|
97
102
|
period = CandidApiClient::PreEncounter::Common::Types::Period.from_json(json_object: period)
|
98
103
|
end
|
99
104
|
canonical_id = struct["canonical_id"]
|
105
|
+
fax = struct["fax"]
|
100
106
|
new(
|
101
107
|
name: name,
|
102
108
|
type: type,
|
@@ -105,6 +111,7 @@ module CandidApiClient
|
|
105
111
|
addresses: addresses,
|
106
112
|
period: period,
|
107
113
|
canonical_id: canonical_id,
|
114
|
+
fax: fax,
|
108
115
|
additional_properties: struct
|
109
116
|
)
|
110
117
|
end
|
@@ -130,6 +137,7 @@ module CandidApiClient
|
|
130
137
|
obj.addresses&.is_a?(Array) != false || raise("Passed value for field obj.addresses is not the expected type, validation failed.")
|
131
138
|
obj.period.nil? || CandidApiClient::PreEncounter::Common::Types::Period.validate_raw(obj: obj.period)
|
132
139
|
obj.canonical_id&.is_a?(String) != false || raise("Passed value for field obj.canonical_id is not the expected type, validation failed.")
|
140
|
+
obj.fax&.is_a?(String) != false || raise("Passed value for field obj.fax is not the expected type, validation failed.")
|
133
141
|
end
|
134
142
|
end
|
135
143
|
end
|
@@ -3,6 +3,7 @@
|
|
3
3
|
require_relative "../../../../requests"
|
4
4
|
require_relative "types/mutable_coverage"
|
5
5
|
require_relative "types/coverage"
|
6
|
+
require_relative "types/coverages_page"
|
6
7
|
require "json"
|
7
8
|
require "date"
|
8
9
|
require_relative "types/service_type_code"
|
@@ -71,6 +72,7 @@ module CandidApiClient
|
|
71
72
|
# * :start (Date)
|
72
73
|
# * :end_ (Date)
|
73
74
|
# * :insurance_card_image_locator (String)
|
75
|
+
# * :payer_plan_group_id (String)
|
74
76
|
# * :verified (Boolean)
|
75
77
|
# * :eligibility_checks (Array<CandidApiClient::PreEncounter::Coverages::V1::Types::EligibilityCheckMetadata>)
|
76
78
|
# * :latest_eligibility_check (Hash)
|
@@ -172,7 +174,7 @@ module CandidApiClient
|
|
172
174
|
# @return [CandidApiClient::PreEncounter::Coverages::V1::Types::Coverage]
|
173
175
|
# @example
|
174
176
|
# api = CandidApiClient::Client.new(base_url: "https://api.example.com", environment: CandidApiClient::Environment::PRODUCTION)
|
175
|
-
# api.pre_encounter.coverages.v_1.create(request: { status: ACTIVE, subscriber: { name: { family: "string", given: ["string"], use: USUAL, period: { } }, date_of_birth: DateTime.parse(2023-01-15), biological_sex: FEMALE, address: { use: HOME, line: ["string"], city: "string", state: "string", postal_code: "string", country: "string", period: { } } }, relationship: SELF, patient: "string", insurance_plan: { member_id: "string", payer_id: "string", payer_name: "string", additional_payer_information: { }, group_number: "string", name: "string", plan_type: SELF_PAY, type: C_01, period: { }, insurance_card_image_locator: "string"
|
177
|
+
# api.pre_encounter.coverages.v_1.create(request: { status: ACTIVE, subscriber: { name: { family: "string", given: ["string"], use: USUAL, period: { } }, date_of_birth: DateTime.parse(2023-01-15), biological_sex: FEMALE, address: { use: HOME, line: ["string"], city: "string", state: "string", postal_code: "string", country: "string", period: { } } }, relationship: SELF, patient: "string", insurance_plan: { member_id: "string", payer_id: "string", payer_name: "string", additional_payer_information: { }, group_number: "string", name: "string", plan_type: SELF_PAY, type: C_01, period: { }, insurance_card_image_locator: "string", payer_plan_group_id: "d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32" }, verified: true, eligibility_checks: , latest_eligibility_check: { check_id: "string", status: ACTIVE, initiated_at: DateTime.parse(2024-01-15T09:30:00.000Z) }, benefits: { } })
|
176
178
|
def create(request:, request_options: nil)
|
177
179
|
response = @request_client.conn.post do |req|
|
178
180
|
req.options.timeout = request_options.timeout_in_seconds unless request_options&.timeout_in_seconds.nil?
|
@@ -235,6 +237,7 @@ module CandidApiClient
|
|
235
237
|
# * :start (Date)
|
236
238
|
# * :end_ (Date)
|
237
239
|
# * :insurance_card_image_locator (String)
|
240
|
+
# * :payer_plan_group_id (String)
|
238
241
|
# * :verified (Boolean)
|
239
242
|
# * :eligibility_checks (Array<CandidApiClient::PreEncounter::Coverages::V1::Types::EligibilityCheckMetadata>)
|
240
243
|
# * :latest_eligibility_check (Hash)
|
@@ -339,7 +342,7 @@ module CandidApiClient
|
|
339
342
|
# api.pre_encounter.coverages.v_1.update(
|
340
343
|
# id: "d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32",
|
341
344
|
# version: "string",
|
342
|
-
# request: { status: ACTIVE, subscriber: { name: { family: "string", given: ["string"], use: USUAL, period: { } }, date_of_birth: DateTime.parse(2023-01-15), biological_sex: FEMALE, address: { use: HOME, line: ["string"], city: "string", state: "string", postal_code: "string", country: "string", period: { } } }, relationship: SELF, patient: "string", insurance_plan: { member_id: "string", payer_id: "string", payer_name: "string", additional_payer_information: { }, group_number: "string", name: "string", plan_type: SELF_PAY, type: C_01, period: { }, insurance_card_image_locator: "string"
|
345
|
+
# request: { status: ACTIVE, subscriber: { name: { family: "string", given: ["string"], use: USUAL, period: { } }, date_of_birth: DateTime.parse(2023-01-15), biological_sex: FEMALE, address: { use: HOME, line: ["string"], city: "string", state: "string", postal_code: "string", country: "string", period: { } } }, relationship: SELF, patient: "string", insurance_plan: { member_id: "string", payer_id: "string", payer_name: "string", additional_payer_information: { }, group_number: "string", name: "string", plan_type: SELF_PAY, type: C_01, period: { }, insurance_card_image_locator: "string", payer_plan_group_id: "d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32" }, verified: true, eligibility_checks: , latest_eligibility_check: { check_id: "string", status: ACTIVE, initiated_at: DateTime.parse(2024-01-15T09:30:00.000Z) }, benefits: { } }
|
343
346
|
# )
|
344
347
|
def update(id:, version:, request:, request_options: nil)
|
345
348
|
response = @request_client.conn.put do |req|
|
@@ -357,6 +360,45 @@ module CandidApiClient
|
|
357
360
|
CandidApiClient::PreEncounter::Coverages::V1::Types::Coverage.from_json(json_object: response.body)
|
358
361
|
end
|
359
362
|
|
363
|
+
# Returns a page of Coverages based on the search criteria.
|
364
|
+
#
|
365
|
+
# @param patient_id [String]
|
366
|
+
# @param payer_plan_group_id [String]
|
367
|
+
# @param page_token [String]
|
368
|
+
# @param limit [Integer] Must be between 0 and 1000. Defaults to 100
|
369
|
+
# @param request_options [CandidApiClient::RequestOptions]
|
370
|
+
# @return [CandidApiClient::PreEncounter::Coverages::V1::Types::CoveragesPage]
|
371
|
+
# @example
|
372
|
+
# api = CandidApiClient::Client.new(base_url: "https://api.example.com", environment: CandidApiClient::Environment::PRODUCTION)
|
373
|
+
# api.pre_encounter.coverages.v_1.get_multi_paginated(
|
374
|
+
# patient_id: "string",
|
375
|
+
# payer_plan_group_id: "string",
|
376
|
+
# page_token: "string",
|
377
|
+
# limit: 1
|
378
|
+
# )
|
379
|
+
def get_multi_paginated(patient_id: nil, payer_plan_group_id: nil, page_token: nil, limit: nil,
|
380
|
+
request_options: nil)
|
381
|
+
response = @request_client.conn.get do |req|
|
382
|
+
req.options.timeout = request_options.timeout_in_seconds unless request_options&.timeout_in_seconds.nil?
|
383
|
+
req.headers["Authorization"] = request_options.token unless request_options&.token.nil?
|
384
|
+
req.headers = {
|
385
|
+
**(req.headers || {}),
|
386
|
+
**@request_client.get_headers,
|
387
|
+
**(request_options&.additional_headers || {})
|
388
|
+
}.compact
|
389
|
+
req.params = {
|
390
|
+
**(request_options&.additional_query_parameters || {}),
|
391
|
+
"patient_id": patient_id,
|
392
|
+
"payer_plan_group_id": payer_plan_group_id,
|
393
|
+
"page_token": page_token,
|
394
|
+
"limit": limit
|
395
|
+
}.compact
|
396
|
+
req.url "#{@request_client.get_url(environment: PreEncounter,
|
397
|
+
request_options: request_options)}/coverages/v1/get-multi-paginated"
|
398
|
+
end
|
399
|
+
CandidApiClient::PreEncounter::Coverages::V1::Types::CoveragesPage.from_json(json_object: response.body)
|
400
|
+
end
|
401
|
+
|
360
402
|
# gets a specific Coverage
|
361
403
|
#
|
362
404
|
# @param id [String]
|
@@ -585,6 +627,7 @@ module CandidApiClient
|
|
585
627
|
# * :start (Date)
|
586
628
|
# * :end_ (Date)
|
587
629
|
# * :insurance_card_image_locator (String)
|
630
|
+
# * :payer_plan_group_id (String)
|
588
631
|
# * :verified (Boolean)
|
589
632
|
# * :eligibility_checks (Array<CandidApiClient::PreEncounter::Coverages::V1::Types::EligibilityCheckMetadata>)
|
590
633
|
# * :latest_eligibility_check (Hash)
|
@@ -686,7 +729,7 @@ module CandidApiClient
|
|
686
729
|
# @return [CandidApiClient::PreEncounter::Coverages::V1::Types::Coverage]
|
687
730
|
# @example
|
688
731
|
# api = CandidApiClient::Client.new(base_url: "https://api.example.com", environment: CandidApiClient::Environment::PRODUCTION)
|
689
|
-
# api.pre_encounter.coverages.v_1.create(request: { status: ACTIVE, subscriber: { name: { family: "string", given: ["string"], use: USUAL, period: { } }, date_of_birth: DateTime.parse(2023-01-15), biological_sex: FEMALE, address: { use: HOME, line: ["string"], city: "string", state: "string", postal_code: "string", country: "string", period: { } } }, relationship: SELF, patient: "string", insurance_plan: { member_id: "string", payer_id: "string", payer_name: "string", additional_payer_information: { }, group_number: "string", name: "string", plan_type: SELF_PAY, type: C_01, period: { }, insurance_card_image_locator: "string"
|
732
|
+
# api.pre_encounter.coverages.v_1.create(request: { status: ACTIVE, subscriber: { name: { family: "string", given: ["string"], use: USUAL, period: { } }, date_of_birth: DateTime.parse(2023-01-15), biological_sex: FEMALE, address: { use: HOME, line: ["string"], city: "string", state: "string", postal_code: "string", country: "string", period: { } } }, relationship: SELF, patient: "string", insurance_plan: { member_id: "string", payer_id: "string", payer_name: "string", additional_payer_information: { }, group_number: "string", name: "string", plan_type: SELF_PAY, type: C_01, period: { }, insurance_card_image_locator: "string", payer_plan_group_id: "d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32" }, verified: true, eligibility_checks: , latest_eligibility_check: { check_id: "string", status: ACTIVE, initiated_at: DateTime.parse(2024-01-15T09:30:00.000Z) }, benefits: { } })
|
690
733
|
def create(request:, request_options: nil)
|
691
734
|
Async do
|
692
735
|
response = @request_client.conn.post do |req|
|
@@ -751,6 +794,7 @@ module CandidApiClient
|
|
751
794
|
# * :start (Date)
|
752
795
|
# * :end_ (Date)
|
753
796
|
# * :insurance_card_image_locator (String)
|
797
|
+
# * :payer_plan_group_id (String)
|
754
798
|
# * :verified (Boolean)
|
755
799
|
# * :eligibility_checks (Array<CandidApiClient::PreEncounter::Coverages::V1::Types::EligibilityCheckMetadata>)
|
756
800
|
# * :latest_eligibility_check (Hash)
|
@@ -855,7 +899,7 @@ module CandidApiClient
|
|
855
899
|
# api.pre_encounter.coverages.v_1.update(
|
856
900
|
# id: "d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32",
|
857
901
|
# version: "string",
|
858
|
-
# request: { status: ACTIVE, subscriber: { name: { family: "string", given: ["string"], use: USUAL, period: { } }, date_of_birth: DateTime.parse(2023-01-15), biological_sex: FEMALE, address: { use: HOME, line: ["string"], city: "string", state: "string", postal_code: "string", country: "string", period: { } } }, relationship: SELF, patient: "string", insurance_plan: { member_id: "string", payer_id: "string", payer_name: "string", additional_payer_information: { }, group_number: "string", name: "string", plan_type: SELF_PAY, type: C_01, period: { }, insurance_card_image_locator: "string"
|
902
|
+
# request: { status: ACTIVE, subscriber: { name: { family: "string", given: ["string"], use: USUAL, period: { } }, date_of_birth: DateTime.parse(2023-01-15), biological_sex: FEMALE, address: { use: HOME, line: ["string"], city: "string", state: "string", postal_code: "string", country: "string", period: { } } }, relationship: SELF, patient: "string", insurance_plan: { member_id: "string", payer_id: "string", payer_name: "string", additional_payer_information: { }, group_number: "string", name: "string", plan_type: SELF_PAY, type: C_01, period: { }, insurance_card_image_locator: "string", payer_plan_group_id: "d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32" }, verified: true, eligibility_checks: , latest_eligibility_check: { check_id: "string", status: ACTIVE, initiated_at: DateTime.parse(2024-01-15T09:30:00.000Z) }, benefits: { } }
|
859
903
|
# )
|
860
904
|
def update(id:, version:, request:, request_options: nil)
|
861
905
|
Async do
|
@@ -875,6 +919,47 @@ module CandidApiClient
|
|
875
919
|
end
|
876
920
|
end
|
877
921
|
|
922
|
+
# Returns a page of Coverages based on the search criteria.
|
923
|
+
#
|
924
|
+
# @param patient_id [String]
|
925
|
+
# @param payer_plan_group_id [String]
|
926
|
+
# @param page_token [String]
|
927
|
+
# @param limit [Integer] Must be between 0 and 1000. Defaults to 100
|
928
|
+
# @param request_options [CandidApiClient::RequestOptions]
|
929
|
+
# @return [CandidApiClient::PreEncounter::Coverages::V1::Types::CoveragesPage]
|
930
|
+
# @example
|
931
|
+
# api = CandidApiClient::Client.new(base_url: "https://api.example.com", environment: CandidApiClient::Environment::PRODUCTION)
|
932
|
+
# api.pre_encounter.coverages.v_1.get_multi_paginated(
|
933
|
+
# patient_id: "string",
|
934
|
+
# payer_plan_group_id: "string",
|
935
|
+
# page_token: "string",
|
936
|
+
# limit: 1
|
937
|
+
# )
|
938
|
+
def get_multi_paginated(patient_id: nil, payer_plan_group_id: nil, page_token: nil, limit: nil,
|
939
|
+
request_options: nil)
|
940
|
+
Async do
|
941
|
+
response = @request_client.conn.get do |req|
|
942
|
+
req.options.timeout = request_options.timeout_in_seconds unless request_options&.timeout_in_seconds.nil?
|
943
|
+
req.headers["Authorization"] = request_options.token unless request_options&.token.nil?
|
944
|
+
req.headers = {
|
945
|
+
**(req.headers || {}),
|
946
|
+
**@request_client.get_headers,
|
947
|
+
**(request_options&.additional_headers || {})
|
948
|
+
}.compact
|
949
|
+
req.params = {
|
950
|
+
**(request_options&.additional_query_parameters || {}),
|
951
|
+
"patient_id": patient_id,
|
952
|
+
"payer_plan_group_id": payer_plan_group_id,
|
953
|
+
"page_token": page_token,
|
954
|
+
"limit": limit
|
955
|
+
}.compact
|
956
|
+
req.url "#{@request_client.get_url(environment: PreEncounter,
|
957
|
+
request_options: request_options)}/coverages/v1/get-multi-paginated"
|
958
|
+
end
|
959
|
+
CandidApiClient::PreEncounter::Coverages::V1::Types::CoveragesPage.from_json(json_object: response.body)
|
960
|
+
end
|
961
|
+
end
|
962
|
+
|
878
963
|
# gets a specific Coverage
|
879
964
|
#
|
880
965
|
# @param id [String]
|
@@ -0,0 +1,118 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require "ostruct"
|
4
|
+
require "json"
|
5
|
+
|
6
|
+
module CandidApiClient
|
7
|
+
module PreEncounter
|
8
|
+
module Coverages
|
9
|
+
module V1
|
10
|
+
module Types
|
11
|
+
class Address
|
12
|
+
# @return [String]
|
13
|
+
attr_reader :address_1
|
14
|
+
# @return [String]
|
15
|
+
attr_reader :address_2
|
16
|
+
# @return [String]
|
17
|
+
attr_reader :city
|
18
|
+
# @return [String]
|
19
|
+
attr_reader :state
|
20
|
+
# @return [String]
|
21
|
+
attr_reader :postal_code
|
22
|
+
# @return [String]
|
23
|
+
attr_reader :country_code
|
24
|
+
# @return [String]
|
25
|
+
attr_reader :country_sub_division_code
|
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 address_1 [String]
|
35
|
+
# @param address_2 [String]
|
36
|
+
# @param city [String]
|
37
|
+
# @param state [String]
|
38
|
+
# @param postal_code [String]
|
39
|
+
# @param country_code [String]
|
40
|
+
# @param country_sub_division_code [String]
|
41
|
+
# @param additional_properties [OpenStruct] Additional properties unmapped to the current class definition
|
42
|
+
# @return [CandidApiClient::PreEncounter::Coverages::V1::Types::Address]
|
43
|
+
def initialize(address_1: OMIT, address_2: OMIT, city: OMIT, state: OMIT, postal_code: OMIT,
|
44
|
+
country_code: OMIT, country_sub_division_code: OMIT, additional_properties: nil)
|
45
|
+
@address_1 = address_1 if address_1 != OMIT
|
46
|
+
@address_2 = address_2 if address_2 != OMIT
|
47
|
+
@city = city if city != OMIT
|
48
|
+
@state = state if state != OMIT
|
49
|
+
@postal_code = postal_code if postal_code != OMIT
|
50
|
+
@country_code = country_code if country_code != OMIT
|
51
|
+
@country_sub_division_code = country_sub_division_code if country_sub_division_code != OMIT
|
52
|
+
@additional_properties = additional_properties
|
53
|
+
@_field_set = {
|
54
|
+
"address1": address_1,
|
55
|
+
"address2": address_2,
|
56
|
+
"city": city,
|
57
|
+
"state": state,
|
58
|
+
"postal_code": postal_code,
|
59
|
+
"country_code": country_code,
|
60
|
+
"country_sub_division_code": country_sub_division_code
|
61
|
+
}.reject do |_k, v|
|
62
|
+
v == OMIT
|
63
|
+
end
|
64
|
+
end
|
65
|
+
|
66
|
+
# Deserialize a JSON object to an instance of Address
|
67
|
+
#
|
68
|
+
# @param json_object [String]
|
69
|
+
# @return [CandidApiClient::PreEncounter::Coverages::V1::Types::Address]
|
70
|
+
def self.from_json(json_object:)
|
71
|
+
struct = JSON.parse(json_object, object_class: OpenStruct)
|
72
|
+
address_1 = struct["address1"]
|
73
|
+
address_2 = struct["address2"]
|
74
|
+
city = struct["city"]
|
75
|
+
state = struct["state"]
|
76
|
+
postal_code = struct["postal_code"]
|
77
|
+
country_code = struct["country_code"]
|
78
|
+
country_sub_division_code = struct["country_sub_division_code"]
|
79
|
+
new(
|
80
|
+
address_1: address_1,
|
81
|
+
address_2: address_2,
|
82
|
+
city: city,
|
83
|
+
state: state,
|
84
|
+
postal_code: postal_code,
|
85
|
+
country_code: country_code,
|
86
|
+
country_sub_division_code: country_sub_division_code,
|
87
|
+
additional_properties: struct
|
88
|
+
)
|
89
|
+
end
|
90
|
+
|
91
|
+
# Serialize an instance of Address to a JSON object
|
92
|
+
#
|
93
|
+
# @return [String]
|
94
|
+
def to_json(*_args)
|
95
|
+
@_field_set&.to_json
|
96
|
+
end
|
97
|
+
|
98
|
+
# Leveraged for Union-type generation, validate_raw attempts to parse the given
|
99
|
+
# hash and check each fields type against the current object's property
|
100
|
+
# definitions.
|
101
|
+
#
|
102
|
+
# @param obj [Object]
|
103
|
+
# @return [Void]
|
104
|
+
def self.validate_raw(obj:)
|
105
|
+
obj.address_1&.is_a?(String) != false || raise("Passed value for field obj.address_1 is not the expected type, validation failed.")
|
106
|
+
obj.address_2&.is_a?(String) != false || raise("Passed value for field obj.address_2 is not the expected type, validation failed.")
|
107
|
+
obj.city&.is_a?(String) != false || raise("Passed value for field obj.city is not the expected type, validation failed.")
|
108
|
+
obj.state&.is_a?(String) != false || raise("Passed value for field obj.state is not the expected type, validation failed.")
|
109
|
+
obj.postal_code&.is_a?(String) != false || raise("Passed value for field obj.postal_code is not the expected type, validation failed.")
|
110
|
+
obj.country_code&.is_a?(String) != false || raise("Passed value for field obj.country_code is not the expected type, validation failed.")
|
111
|
+
obj.country_sub_division_code&.is_a?(String) != false || raise("Passed value for field obj.country_sub_division_code is not the expected type, validation failed.")
|
112
|
+
end
|
113
|
+
end
|
114
|
+
end
|
115
|
+
end
|
116
|
+
end
|
117
|
+
end
|
118
|
+
end
|