candidhealth 0.34.1 → 0.34.2
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/encounter_providers/v_2/types/rendering_provider.rb +10 -10
- data/lib/candidhealth/encounter_providers/v_2/types/rendering_provider_update.rb +123 -0
- data/lib/candidhealth/encounters/v_4/client.rb +282 -32
- data/lib/candidhealth/encounters/v_4/types/encounter.rb +11 -11
- data/lib/candidhealth/encounters/v_4/types/encounter_base.rb +11 -1
- data/lib/candidhealth/{third_party_payers/v_1/types/toggle_third_party_payer_enablement_request.rb → encounters/v_4/types/insurance_pay_missing_primary_coverage_error_type.rb} +17 -16
- data/lib/candidhealth/guarantor/v_1/client.rb +39 -89
- data/lib/candidhealth/guarantor/v_1/types/guarantor_update.rb +144 -0
- data/lib/candidhealth/payers/v_3/types/payer.rb +41 -2
- data/lib/candidhealth/pre_encounter/appointments/v_1/client.rb +68 -4
- data/lib/candidhealth/pre_encounter/appointments/v_1/types/appointment.rb +17 -1
- data/lib/candidhealth/pre_encounter/appointments/v_1/types/mutable_appointment.rb +17 -1
- data/lib/candidhealth/pre_encounter/common/types/additional_payer_information.rb +92 -0
- data/lib/candidhealth/pre_encounter/coverages/v_1/client.rb +48 -4
- data/lib/candidhealth/pre_encounter/coverages/v_1/types/benefit_type.rb +20 -0
- data/lib/candidhealth/pre_encounter/coverages/v_1/types/coverage.rb +15 -1
- data/lib/candidhealth/pre_encounter/coverages/v_1/types/coverage_details.rb +104 -0
- data/lib/candidhealth/pre_encounter/coverages/v_1/types/coverage_level.rb +17 -0
- data/lib/candidhealth/pre_encounter/coverages/v_1/types/coverage_value_unit.rb +17 -0
- data/lib/candidhealth/pre_encounter/coverages/v_1/types/insurance_plan.rb +16 -2
- data/lib/candidhealth/pre_encounter/coverages/v_1/types/latest_eligibility_check.rb +83 -0
- data/lib/candidhealth/pre_encounter/coverages/v_1/types/mutable_coverage.rb +15 -1
- data/lib/candidhealth/pre_encounter/coverages/v_1/types/plan_coverage.rb +29 -2
- data/lib/candidhealth/pre_encounter/coverages/v_1/types/service_coverage.rb +26 -2
- data/lib/candidhealth/pre_encounter/patients/v_1/client.rb +12 -4
- data/lib/candidhealth/pre_encounter/patients/v_1/types/authorization.rb +148 -0
- data/lib/candidhealth/pre_encounter/patients/v_1/types/authorization_unit.rb +15 -0
- data/lib/candidhealth/pre_encounter/patients/v_1/types/mutable_patient.rb +26 -2
- data/lib/candidhealth/pre_encounter/patients/v_1/types/patient.rb +26 -2
- data/lib/candidhealth/pre_encounter/patients/v_1/types/referral.rb +106 -0
- data/lib/candidhealth/service_facility/client.rb +27 -51
- data/lib/candidhealth/service_facility/types/encounter_service_facility_update.rb +90 -0
- data/lib/candidhealth.rb +0 -21
- data/lib/requests.rb +2 -2
- data/lib/types_export.rb +13 -16
- metadata +15 -24
- data/lib/candidhealth/third_party_payer_payments/client.rb +0 -30
- data/lib/candidhealth/third_party_payer_payments/v_1/client.rb +0 -360
- data/lib/candidhealth/third_party_payer_payments/v_1/types/third_party_payer_payment.rb +0 -138
- data/lib/candidhealth/third_party_payer_payments/v_1/types/third_party_payer_payment_create.rb +0 -124
- data/lib/candidhealth/third_party_payer_payments/v_1/types/third_party_payer_payment_sort_field.rb +0 -14
- data/lib/candidhealth/third_party_payer_payments/v_1/types/third_party_payer_payments_page.rb +0 -88
- data/lib/candidhealth/third_party_payer_refunds/client.rb +0 -30
- data/lib/candidhealth/third_party_payer_refunds/v_1/client.rb +0 -385
- data/lib/candidhealth/third_party_payer_refunds/v_1/types/third_party_payer_refund.rb +0 -139
- data/lib/candidhealth/third_party_payer_refunds/v_1/types/third_party_payer_refund_create.rb +0 -125
- data/lib/candidhealth/third_party_payer_refunds/v_1/types/third_party_payer_refund_sort_field.rb +0 -14
- data/lib/candidhealth/third_party_payer_refunds/v_1/types/third_party_payer_refunds_page.rb +0 -88
- data/lib/candidhealth/third_party_payers/client.rb +0 -30
- data/lib/candidhealth/third_party_payers/v_1/client.rb +0 -375
- data/lib/candidhealth/third_party_payers/v_1/types/create_third_party_payer_request.rb +0 -79
- data/lib/candidhealth/third_party_payers/v_1/types/third_party_payer.rb +0 -100
- data/lib/candidhealth/third_party_payers/v_1/types/third_party_payer_category_update.rb +0 -97
- data/lib/candidhealth/third_party_payers/v_1/types/third_party_payer_description_update.rb +0 -97
- data/lib/candidhealth/third_party_payers/v_1/types/third_party_payer_page.rb +0 -88
- data/lib/candidhealth/third_party_payers/v_1/types/third_party_payer_sort_field.rb +0 -16
- data/lib/candidhealth/third_party_payers/v_1/types/third_party_payer_update_request.rb +0 -92
@@ -5,6 +5,7 @@ require_relative "subscriber"
|
|
5
5
|
require_relative "../../../common/types/relationship"
|
6
6
|
require_relative "insurance_plan"
|
7
7
|
require_relative "eligibility_check_metadata"
|
8
|
+
require_relative "latest_eligibility_check"
|
8
9
|
require_relative "coverage_benefits"
|
9
10
|
require "ostruct"
|
10
11
|
require "json"
|
@@ -32,6 +33,8 @@ module CandidApiClient
|
|
32
33
|
attr_reader :verified
|
33
34
|
# @return [Array<CandidApiClient::PreEncounter::Coverages::V1::Types::EligibilityCheckMetadata>] A list of eligibility check metadata that have been initiated on this coverage.
|
34
35
|
attr_reader :eligibility_checks
|
36
|
+
# @return [CandidApiClient::PreEncounter::Coverages::V1::Types::LatestEligibilityCheck] The latest eligibility check metadata that has been initiated on this coverage.
|
37
|
+
attr_reader :latest_eligibility_check
|
35
38
|
# @return [CandidApiClient::PreEncounter::Coverages::V1::Types::CoverageBenefits] The eligibility of the patient for the coverage, manually verified by users.
|
36
39
|
attr_reader :benefits
|
37
40
|
# @return [OpenStruct] Additional properties unmapped to the current class definition
|
@@ -52,11 +55,12 @@ module CandidApiClient
|
|
52
55
|
# @param insurance_plan [CandidApiClient::PreEncounter::Coverages::V1::Types::InsurancePlan]
|
53
56
|
# @param verified [Boolean] A boolean indicating if the coverage has been verified by a user.
|
54
57
|
# @param eligibility_checks [Array<CandidApiClient::PreEncounter::Coverages::V1::Types::EligibilityCheckMetadata>] A list of eligibility check metadata that have been initiated on this coverage.
|
58
|
+
# @param latest_eligibility_check [CandidApiClient::PreEncounter::Coverages::V1::Types::LatestEligibilityCheck] The latest eligibility check metadata that has been initiated on this coverage.
|
55
59
|
# @param benefits [CandidApiClient::PreEncounter::Coverages::V1::Types::CoverageBenefits] The eligibility of the patient for the coverage, manually verified by users.
|
56
60
|
# @param additional_properties [OpenStruct] Additional properties unmapped to the current class definition
|
57
61
|
# @return [CandidApiClient::PreEncounter::Coverages::V1::Types::MutableCoverage]
|
58
62
|
def initialize(status:, subscriber:, relationship:, patient:, insurance_plan:, verified:,
|
59
|
-
eligibility_checks: OMIT, benefits: OMIT, additional_properties: nil)
|
63
|
+
eligibility_checks: OMIT, latest_eligibility_check: OMIT, benefits: OMIT, additional_properties: nil)
|
60
64
|
@status = status
|
61
65
|
@subscriber = subscriber
|
62
66
|
@relationship = relationship
|
@@ -64,6 +68,7 @@ module CandidApiClient
|
|
64
68
|
@insurance_plan = insurance_plan
|
65
69
|
@verified = verified
|
66
70
|
@eligibility_checks = eligibility_checks if eligibility_checks != OMIT
|
71
|
+
@latest_eligibility_check = latest_eligibility_check if latest_eligibility_check != OMIT
|
67
72
|
@benefits = benefits if benefits != OMIT
|
68
73
|
@additional_properties = additional_properties
|
69
74
|
@_field_set = {
|
@@ -74,6 +79,7 @@ module CandidApiClient
|
|
74
79
|
"insurance_plan": insurance_plan,
|
75
80
|
"verified": verified,
|
76
81
|
"eligibility_checks": eligibility_checks,
|
82
|
+
"latest_eligibility_check": latest_eligibility_check,
|
77
83
|
"benefits": benefits
|
78
84
|
}.reject do |_k, v|
|
79
85
|
v == OMIT
|
@@ -107,6 +113,12 @@ module CandidApiClient
|
|
107
113
|
item = item.to_json
|
108
114
|
CandidApiClient::PreEncounter::Coverages::V1::Types::EligibilityCheckMetadata.from_json(json_object: item)
|
109
115
|
end
|
116
|
+
if parsed_json["latest_eligibility_check"].nil?
|
117
|
+
latest_eligibility_check = nil
|
118
|
+
else
|
119
|
+
latest_eligibility_check = parsed_json["latest_eligibility_check"].to_json
|
120
|
+
latest_eligibility_check = CandidApiClient::PreEncounter::Coverages::V1::Types::LatestEligibilityCheck.from_json(json_object: latest_eligibility_check)
|
121
|
+
end
|
110
122
|
if parsed_json["benefits"].nil?
|
111
123
|
benefits = nil
|
112
124
|
else
|
@@ -121,6 +133,7 @@ module CandidApiClient
|
|
121
133
|
insurance_plan: insurance_plan,
|
122
134
|
verified: verified,
|
123
135
|
eligibility_checks: eligibility_checks,
|
136
|
+
latest_eligibility_check: latest_eligibility_check,
|
124
137
|
benefits: benefits,
|
125
138
|
additional_properties: struct
|
126
139
|
)
|
@@ -147,6 +160,7 @@ module CandidApiClient
|
|
147
160
|
CandidApiClient::PreEncounter::Coverages::V1::Types::InsurancePlan.validate_raw(obj: obj.insurance_plan)
|
148
161
|
obj.verified.is_a?(Boolean) != false || raise("Passed value for field obj.verified is not the expected type, validation failed.")
|
149
162
|
obj.eligibility_checks&.is_a?(Array) != false || raise("Passed value for field obj.eligibility_checks is not the expected type, validation failed.")
|
163
|
+
obj.latest_eligibility_check.nil? || CandidApiClient::PreEncounter::Coverages::V1::Types::LatestEligibilityCheck.validate_raw(obj: obj.latest_eligibility_check)
|
150
164
|
obj.benefits.nil? || CandidApiClient::PreEncounter::Coverages::V1::Types::CoverageBenefits.validate_raw(obj: obj.benefits)
|
151
165
|
end
|
152
166
|
end
|
@@ -1,6 +1,7 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
3
|
require_relative "plan_coverage_details"
|
4
|
+
require_relative "coverage_details"
|
4
5
|
require "ostruct"
|
5
6
|
require "json"
|
6
7
|
|
@@ -12,8 +13,12 @@ module CandidApiClient
|
|
12
13
|
class PlanCoverage
|
13
14
|
# @return [CandidApiClient::PreEncounter::Coverages::V1::Types::PlanCoverageDetails]
|
14
15
|
attr_reader :in_network
|
16
|
+
# @return [Array<CandidApiClient::PreEncounter::Coverages::V1::Types::CoverageDetails>]
|
17
|
+
attr_reader :in_network_flat
|
15
18
|
# @return [CandidApiClient::PreEncounter::Coverages::V1::Types::PlanCoverageDetails]
|
16
19
|
attr_reader :out_of_network
|
20
|
+
# @return [Array<CandidApiClient::PreEncounter::Coverages::V1::Types::CoverageDetails>]
|
21
|
+
attr_reader :out_of_network_flat
|
17
22
|
# @return [OpenStruct] Additional properties unmapped to the current class definition
|
18
23
|
attr_reader :additional_properties
|
19
24
|
# @return [Object]
|
@@ -23,14 +28,24 @@ module CandidApiClient
|
|
23
28
|
OMIT = Object.new
|
24
29
|
|
25
30
|
# @param in_network [CandidApiClient::PreEncounter::Coverages::V1::Types::PlanCoverageDetails]
|
31
|
+
# @param in_network_flat [Array<CandidApiClient::PreEncounter::Coverages::V1::Types::CoverageDetails>]
|
26
32
|
# @param out_of_network [CandidApiClient::PreEncounter::Coverages::V1::Types::PlanCoverageDetails]
|
33
|
+
# @param out_of_network_flat [Array<CandidApiClient::PreEncounter::Coverages::V1::Types::CoverageDetails>]
|
27
34
|
# @param additional_properties [OpenStruct] Additional properties unmapped to the current class definition
|
28
35
|
# @return [CandidApiClient::PreEncounter::Coverages::V1::Types::PlanCoverage]
|
29
|
-
def initialize(in_network: OMIT, out_of_network: OMIT,
|
36
|
+
def initialize(in_network: OMIT, in_network_flat: OMIT, out_of_network: OMIT, out_of_network_flat: OMIT,
|
37
|
+
additional_properties: nil)
|
30
38
|
@in_network = in_network if in_network != OMIT
|
39
|
+
@in_network_flat = in_network_flat if in_network_flat != OMIT
|
31
40
|
@out_of_network = out_of_network if out_of_network != OMIT
|
41
|
+
@out_of_network_flat = out_of_network_flat if out_of_network_flat != OMIT
|
32
42
|
@additional_properties = additional_properties
|
33
|
-
@_field_set = {
|
43
|
+
@_field_set = {
|
44
|
+
"in_network": in_network,
|
45
|
+
"in_network_flat": in_network_flat,
|
46
|
+
"out_of_network": out_of_network,
|
47
|
+
"out_of_network_flat": out_of_network_flat
|
48
|
+
}.reject do |_k, v|
|
34
49
|
v == OMIT
|
35
50
|
end
|
36
51
|
end
|
@@ -48,15 +63,25 @@ module CandidApiClient
|
|
48
63
|
in_network = parsed_json["in_network"].to_json
|
49
64
|
in_network = CandidApiClient::PreEncounter::Coverages::V1::Types::PlanCoverageDetails.from_json(json_object: in_network)
|
50
65
|
end
|
66
|
+
in_network_flat = parsed_json["in_network_flat"]&.map do |item|
|
67
|
+
item = item.to_json
|
68
|
+
CandidApiClient::PreEncounter::Coverages::V1::Types::CoverageDetails.from_json(json_object: item)
|
69
|
+
end
|
51
70
|
if parsed_json["out_of_network"].nil?
|
52
71
|
out_of_network = nil
|
53
72
|
else
|
54
73
|
out_of_network = parsed_json["out_of_network"].to_json
|
55
74
|
out_of_network = CandidApiClient::PreEncounter::Coverages::V1::Types::PlanCoverageDetails.from_json(json_object: out_of_network)
|
56
75
|
end
|
76
|
+
out_of_network_flat = parsed_json["out_of_network_flat"]&.map do |item|
|
77
|
+
item = item.to_json
|
78
|
+
CandidApiClient::PreEncounter::Coverages::V1::Types::CoverageDetails.from_json(json_object: item)
|
79
|
+
end
|
57
80
|
new(
|
58
81
|
in_network: in_network,
|
82
|
+
in_network_flat: in_network_flat,
|
59
83
|
out_of_network: out_of_network,
|
84
|
+
out_of_network_flat: out_of_network_flat,
|
60
85
|
additional_properties: struct
|
61
86
|
)
|
62
87
|
end
|
@@ -76,7 +101,9 @@ module CandidApiClient
|
|
76
101
|
# @return [Void]
|
77
102
|
def self.validate_raw(obj:)
|
78
103
|
obj.in_network.nil? || CandidApiClient::PreEncounter::Coverages::V1::Types::PlanCoverageDetails.validate_raw(obj: obj.in_network)
|
104
|
+
obj.in_network_flat&.is_a?(Array) != false || raise("Passed value for field obj.in_network_flat is not the expected type, validation failed.")
|
79
105
|
obj.out_of_network.nil? || CandidApiClient::PreEncounter::Coverages::V1::Types::PlanCoverageDetails.validate_raw(obj: obj.out_of_network)
|
106
|
+
obj.out_of_network_flat&.is_a?(Array) != false || raise("Passed value for field obj.out_of_network_flat is not the expected type, validation failed.")
|
80
107
|
end
|
81
108
|
end
|
82
109
|
end
|
@@ -2,6 +2,7 @@
|
|
2
2
|
|
3
3
|
require_relative "service_type_code"
|
4
4
|
require_relative "service_coverage_details"
|
5
|
+
require_relative "coverage_details"
|
5
6
|
require "ostruct"
|
6
7
|
require "json"
|
7
8
|
|
@@ -15,8 +16,12 @@ module CandidApiClient
|
|
15
16
|
attr_reader :service_code
|
16
17
|
# @return [CandidApiClient::PreEncounter::Coverages::V1::Types::ServiceCoverageDetails]
|
17
18
|
attr_reader :in_network
|
19
|
+
# @return [Array<CandidApiClient::PreEncounter::Coverages::V1::Types::CoverageDetails>]
|
20
|
+
attr_reader :in_network_flat
|
18
21
|
# @return [CandidApiClient::PreEncounter::Coverages::V1::Types::ServiceCoverageDetails]
|
19
22
|
attr_reader :out_of_network
|
23
|
+
# @return [Array<CandidApiClient::PreEncounter::Coverages::V1::Types::CoverageDetails>]
|
24
|
+
attr_reader :out_of_network_flat
|
20
25
|
# @return [OpenStruct] Additional properties unmapped to the current class definition
|
21
26
|
attr_reader :additional_properties
|
22
27
|
# @return [Object]
|
@@ -27,18 +32,25 @@ module CandidApiClient
|
|
27
32
|
|
28
33
|
# @param service_code [CandidApiClient::PreEncounter::Coverages::V1::Types::ServiceTypeCode]
|
29
34
|
# @param in_network [CandidApiClient::PreEncounter::Coverages::V1::Types::ServiceCoverageDetails]
|
35
|
+
# @param in_network_flat [Array<CandidApiClient::PreEncounter::Coverages::V1::Types::CoverageDetails>]
|
30
36
|
# @param out_of_network [CandidApiClient::PreEncounter::Coverages::V1::Types::ServiceCoverageDetails]
|
37
|
+
# @param out_of_network_flat [Array<CandidApiClient::PreEncounter::Coverages::V1::Types::CoverageDetails>]
|
31
38
|
# @param additional_properties [OpenStruct] Additional properties unmapped to the current class definition
|
32
39
|
# @return [CandidApiClient::PreEncounter::Coverages::V1::Types::ServiceCoverage]
|
33
|
-
def initialize(service_code:, in_network: OMIT,
|
40
|
+
def initialize(service_code:, in_network: OMIT, in_network_flat: OMIT, out_of_network: OMIT,
|
41
|
+
out_of_network_flat: OMIT, additional_properties: nil)
|
34
42
|
@service_code = service_code
|
35
43
|
@in_network = in_network if in_network != OMIT
|
44
|
+
@in_network_flat = in_network_flat if in_network_flat != OMIT
|
36
45
|
@out_of_network = out_of_network if out_of_network != OMIT
|
46
|
+
@out_of_network_flat = out_of_network_flat if out_of_network_flat != OMIT
|
37
47
|
@additional_properties = additional_properties
|
38
48
|
@_field_set = {
|
39
49
|
"service_code": service_code,
|
40
50
|
"in_network": in_network,
|
41
|
-
"
|
51
|
+
"in_network_flat": in_network_flat,
|
52
|
+
"out_of_network": out_of_network,
|
53
|
+
"out_of_network_flat": out_of_network_flat
|
42
54
|
}.reject do |_k, v|
|
43
55
|
v == OMIT
|
44
56
|
end
|
@@ -58,16 +70,26 @@ module CandidApiClient
|
|
58
70
|
in_network = parsed_json["in_network"].to_json
|
59
71
|
in_network = CandidApiClient::PreEncounter::Coverages::V1::Types::ServiceCoverageDetails.from_json(json_object: in_network)
|
60
72
|
end
|
73
|
+
in_network_flat = parsed_json["in_network_flat"]&.map do |item|
|
74
|
+
item = item.to_json
|
75
|
+
CandidApiClient::PreEncounter::Coverages::V1::Types::CoverageDetails.from_json(json_object: item)
|
76
|
+
end
|
61
77
|
if parsed_json["out_of_network"].nil?
|
62
78
|
out_of_network = nil
|
63
79
|
else
|
64
80
|
out_of_network = parsed_json["out_of_network"].to_json
|
65
81
|
out_of_network = CandidApiClient::PreEncounter::Coverages::V1::Types::ServiceCoverageDetails.from_json(json_object: out_of_network)
|
66
82
|
end
|
83
|
+
out_of_network_flat = parsed_json["out_of_network_flat"]&.map do |item|
|
84
|
+
item = item.to_json
|
85
|
+
CandidApiClient::PreEncounter::Coverages::V1::Types::CoverageDetails.from_json(json_object: item)
|
86
|
+
end
|
67
87
|
new(
|
68
88
|
service_code: service_code,
|
69
89
|
in_network: in_network,
|
90
|
+
in_network_flat: in_network_flat,
|
70
91
|
out_of_network: out_of_network,
|
92
|
+
out_of_network_flat: out_of_network_flat,
|
71
93
|
additional_properties: struct
|
72
94
|
)
|
73
95
|
end
|
@@ -88,7 +110,9 @@ module CandidApiClient
|
|
88
110
|
def self.validate_raw(obj:)
|
89
111
|
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.")
|
90
112
|
obj.in_network.nil? || CandidApiClient::PreEncounter::Coverages::V1::Types::ServiceCoverageDetails.validate_raw(obj: obj.in_network)
|
113
|
+
obj.in_network_flat&.is_a?(Array) != false || raise("Passed value for field obj.in_network_flat is not the expected type, validation failed.")
|
91
114
|
obj.out_of_network.nil? || CandidApiClient::PreEncounter::Coverages::V1::Types::ServiceCoverageDetails.validate_raw(obj: obj.out_of_network)
|
115
|
+
obj.out_of_network_flat&.is_a?(Array) != false || raise("Passed value for field obj.out_of_network_flat is not the expected type, validation failed.")
|
92
116
|
end
|
93
117
|
end
|
94
118
|
end
|
@@ -104,11 +104,13 @@ module CandidApiClient
|
|
104
104
|
# * :start (Date)
|
105
105
|
# * :end_ (Date)
|
106
106
|
# * :self_pay (Boolean)
|
107
|
+
# * :authorizations (Array<CandidApiClient::PreEncounter::Patients::V1::Types::Authorization>)
|
108
|
+
# * :referrals (Array<CandidApiClient::PreEncounter::Patients::V1::Types::Referral>)
|
107
109
|
# @param request_options [CandidApiClient::RequestOptions]
|
108
110
|
# @return [CandidApiClient::PreEncounter::Patients::V1::Types::Patient]
|
109
111
|
# @example
|
110
112
|
# api = CandidApiClient::Client.new(base_url: "https://api.example.com", environment: CandidApiClient::Environment::PRODUCTION)
|
111
|
-
# api.pre_encounter.patients.v_1.create(skip_duplicate_check: true, request: { name: { family: "string", given: ["string"], use: USUAL, period: { start:
|
113
|
+
# api.pre_encounter.patients.v_1.create(skip_duplicate_check: true, request: { name: { family: "string", given: ["string"], use: USUAL, period: { start: {"key":"value"}, end_: {"key":"value"} } }, other_names: [{ family: "string", given: ["string"], use: USUAL, period: { start: {"key":"value"}, end_: {"key":"value"} } }], gender: MAN, birth_date: DateTime.parse(2023-01-15), social_security_number: "string", biological_sex: FEMALE, sexual_orientation: HETEROSEXUAL, race: AMERICAN_INDIAN_OR_ALASKA_NATIVE, ethnicity: HISPANIC_OR_LATINO, disability_status: DISABLED, marital_status: ANNULLED, deceased: DateTime.parse(2024-01-15T09:30:00.000Z), multiple_birth: 1, primary_address: { use: HOME, line: ["string"], city: "string", state: "string", postal_code: "string", country: "string", period: { start: {"key":"value"}, end_: {"key":"value"} } }, other_addresses: [{ use: HOME, line: ["string"], city: "string", state: "string", postal_code: "string", country: "string", period: { start: {"key":"value"}, end_: {"key":"value"} } }], primary_telecom: { value: "string", use: HOME, period: {"key":"value"} }, other_telecoms: [{ value: "string", use: HOME, period: {"key":"value"} }], email: "string", electronic_communication_opt_in: true, photo: "string", language: "string", external_provenance: { external_id: "string", system_name: "string" }, contacts: [{ relationship: [SELF], name: { family: "string", given: ["string"], use: USUAL, period: { start: {"key":"value"}, end_: {"key":"value"} } }, telecoms: [{ value: "string", use: HOME, period: {"key":"value"} }], addresses: [{ use: HOME, line: ["string"], city: "string", state: "string", postal_code: "string", country: "string", period: { start: {"key":"value"}, end_: {"key":"value"} } }], period: { start: {"key":"value"}, end_: {"key":"value"} }, hipaa_authorization: true }], general_practitioners: [{ name: { family: "string", given: ["string"], use: USUAL, period: { start: {"key":"value"}, end_: {"key":"value"} } }, type: PRIMARY, npi: "string", telecoms: [{ value: "string", use: HOME, period: {"key":"value"} }], addresses: [{"key":"value"}], period: { start: {"key":"value"}, end_: {"key":"value"} }, canonical_id: "string" }], filing_order: { coverages: ["d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32"] }, non_insurance_payers: ["string"], guarantor: { name: { family: "string", given: ["string"], use: USUAL, period: { start: {"key":"value"}, end_: {"key":"value"} } }, telecom: { value: "string", use: HOME, period: {"key":"value"} }, email: "string", birth_date: DateTime.parse(2023-01-15), address: { use: HOME, line: ["string"], city: "string", state: "string", postal_code: "string", country: "string", period: { start: {"key":"value"}, end_: {"key":"value"} } } }, self_pay: true, authorizations: [{ payer_id: "string", payer_name: "string", additional_payer_information: {"key":"value"}, authorization_number: "string", cpt_code: "string", units: VISIT, quantity: {"key":"value"}, period: {"key":"value"}, notes: {"key":"value"} }], referrals: [{ provider: { name: { family: "string", given: ["string"], use: USUAL, period: { start: {"key":"value"}, end_: {"key":"value"} } }, type: PRIMARY, npi: "string", telecoms: [{ value: "string", use: HOME, period: {"key":"value"} }], addresses: [{"key":"value"}], period: { start: {"key":"value"}, end_: {"key":"value"} }, canonical_id: "string" }, referral_number: "string", period: {"key":"value"}, notes: {"key":"value"} }] })
|
112
114
|
def create(request:, skip_duplicate_check: nil, request_options: nil)
|
113
115
|
response = @request_client.conn.post do |req|
|
114
116
|
req.options.timeout = request_options.timeout_in_seconds unless request_options&.timeout_in_seconds.nil?
|
@@ -304,6 +306,8 @@ module CandidApiClient
|
|
304
306
|
# * :start (Date)
|
305
307
|
# * :end_ (Date)
|
306
308
|
# * :self_pay (Boolean)
|
309
|
+
# * :authorizations (Array<CandidApiClient::PreEncounter::Patients::V1::Types::Authorization>)
|
310
|
+
# * :referrals (Array<CandidApiClient::PreEncounter::Patients::V1::Types::Referral>)
|
307
311
|
# @param request_options [CandidApiClient::RequestOptions]
|
308
312
|
# @return [CandidApiClient::PreEncounter::Patients::V1::Types::Patient]
|
309
313
|
# @example
|
@@ -311,7 +315,7 @@ module CandidApiClient
|
|
311
315
|
# api.pre_encounter.patients.v_1.update(
|
312
316
|
# id: "string",
|
313
317
|
# version: "string",
|
314
|
-
# request: { name: { family: "string", given: ["string"], use: USUAL, period: { start:
|
318
|
+
# request: { name: { family: "string", given: ["string"], use: USUAL, period: { start: {"key":"value"}, end_: {"key":"value"} } }, other_names: [{ family: "string", given: ["string"], use: USUAL, period: { start: {"key":"value"}, end_: {"key":"value"} } }], gender: MAN, birth_date: DateTime.parse(2023-01-15), social_security_number: "string", biological_sex: FEMALE, sexual_orientation: HETEROSEXUAL, race: AMERICAN_INDIAN_OR_ALASKA_NATIVE, ethnicity: HISPANIC_OR_LATINO, disability_status: DISABLED, marital_status: ANNULLED, deceased: DateTime.parse(2024-01-15T09:30:00.000Z), multiple_birth: 1, primary_address: { use: HOME, line: ["string"], city: "string", state: "string", postal_code: "string", country: "string", period: { start: {"key":"value"}, end_: {"key":"value"} } }, other_addresses: [{ use: HOME, line: ["string"], city: "string", state: "string", postal_code: "string", country: "string", period: { start: {"key":"value"}, end_: {"key":"value"} } }], primary_telecom: { value: "string", use: HOME, period: {"key":"value"} }, other_telecoms: [{ value: "string", use: HOME, period: {"key":"value"} }], email: "string", electronic_communication_opt_in: true, photo: "string", language: "string", external_provenance: { external_id: "string", system_name: "string" }, contacts: [{ relationship: [SELF], name: { family: "string", given: ["string"], use: USUAL, period: { start: {"key":"value"}, end_: {"key":"value"} } }, telecoms: [{ value: "string", use: HOME, period: {"key":"value"} }], addresses: [{ use: HOME, line: ["string"], city: "string", state: "string", postal_code: "string", country: "string", period: { start: {"key":"value"}, end_: {"key":"value"} } }], period: { start: {"key":"value"}, end_: {"key":"value"} }, hipaa_authorization: true }], general_practitioners: [{ name: { family: "string", given: ["string"], use: USUAL, period: { start: {"key":"value"}, end_: {"key":"value"} } }, type: PRIMARY, npi: "string", telecoms: [{ value: "string", use: HOME, period: {"key":"value"} }], addresses: [{"key":"value"}], period: { start: {"key":"value"}, end_: {"key":"value"} }, canonical_id: "string" }], filing_order: { coverages: ["d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32"] }, non_insurance_payers: ["string"], guarantor: { name: { family: "string", given: ["string"], use: USUAL, period: { start: {"key":"value"}, end_: {"key":"value"} } }, telecom: { value: "string", use: HOME, period: {"key":"value"} }, email: "string", birth_date: DateTime.parse(2023-01-15), address: { use: HOME, line: ["string"], city: "string", state: "string", postal_code: "string", country: "string", period: { start: {"key":"value"}, end_: {"key":"value"} } } }, self_pay: true, authorizations: [{ payer_id: "string", payer_name: "string", additional_payer_information: {"key":"value"}, authorization_number: "string", cpt_code: "string", units: VISIT, quantity: {"key":"value"}, period: {"key":"value"}, notes: {"key":"value"} }], referrals: [{ provider: { name: { family: "string", given: ["string"], use: USUAL, period: { start: {"key":"value"}, end_: {"key":"value"} } }, type: PRIMARY, npi: "string", telecoms: [{ value: "string", use: HOME, period: {"key":"value"} }], addresses: [{"key":"value"}], period: { start: {"key":"value"}, end_: {"key":"value"} }, canonical_id: "string" }, referral_number: "string", period: {"key":"value"}, notes: {"key":"value"} }] }
|
315
319
|
# )
|
316
320
|
def update(id:, version:, request:, request_options: nil)
|
317
321
|
response = @request_client.conn.put do |req|
|
@@ -509,11 +513,13 @@ module CandidApiClient
|
|
509
513
|
# * :start (Date)
|
510
514
|
# * :end_ (Date)
|
511
515
|
# * :self_pay (Boolean)
|
516
|
+
# * :authorizations (Array<CandidApiClient::PreEncounter::Patients::V1::Types::Authorization>)
|
517
|
+
# * :referrals (Array<CandidApiClient::PreEncounter::Patients::V1::Types::Referral>)
|
512
518
|
# @param request_options [CandidApiClient::RequestOptions]
|
513
519
|
# @return [CandidApiClient::PreEncounter::Patients::V1::Types::Patient]
|
514
520
|
# @example
|
515
521
|
# api = CandidApiClient::Client.new(base_url: "https://api.example.com", environment: CandidApiClient::Environment::PRODUCTION)
|
516
|
-
# api.pre_encounter.patients.v_1.create(skip_duplicate_check: true, request: { name: { family: "string", given: ["string"], use: USUAL, period: { start:
|
522
|
+
# api.pre_encounter.patients.v_1.create(skip_duplicate_check: true, request: { name: { family: "string", given: ["string"], use: USUAL, period: { start: {"key":"value"}, end_: {"key":"value"} } }, other_names: [{ family: "string", given: ["string"], use: USUAL, period: { start: {"key":"value"}, end_: {"key":"value"} } }], gender: MAN, birth_date: DateTime.parse(2023-01-15), social_security_number: "string", biological_sex: FEMALE, sexual_orientation: HETEROSEXUAL, race: AMERICAN_INDIAN_OR_ALASKA_NATIVE, ethnicity: HISPANIC_OR_LATINO, disability_status: DISABLED, marital_status: ANNULLED, deceased: DateTime.parse(2024-01-15T09:30:00.000Z), multiple_birth: 1, primary_address: { use: HOME, line: ["string"], city: "string", state: "string", postal_code: "string", country: "string", period: { start: {"key":"value"}, end_: {"key":"value"} } }, other_addresses: [{ use: HOME, line: ["string"], city: "string", state: "string", postal_code: "string", country: "string", period: { start: {"key":"value"}, end_: {"key":"value"} } }], primary_telecom: { value: "string", use: HOME, period: {"key":"value"} }, other_telecoms: [{ value: "string", use: HOME, period: {"key":"value"} }], email: "string", electronic_communication_opt_in: true, photo: "string", language: "string", external_provenance: { external_id: "string", system_name: "string" }, contacts: [{ relationship: [SELF], name: { family: "string", given: ["string"], use: USUAL, period: { start: {"key":"value"}, end_: {"key":"value"} } }, telecoms: [{ value: "string", use: HOME, period: {"key":"value"} }], addresses: [{ use: HOME, line: ["string"], city: "string", state: "string", postal_code: "string", country: "string", period: { start: {"key":"value"}, end_: {"key":"value"} } }], period: { start: {"key":"value"}, end_: {"key":"value"} }, hipaa_authorization: true }], general_practitioners: [{ name: { family: "string", given: ["string"], use: USUAL, period: { start: {"key":"value"}, end_: {"key":"value"} } }, type: PRIMARY, npi: "string", telecoms: [{ value: "string", use: HOME, period: {"key":"value"} }], addresses: [{"key":"value"}], period: { start: {"key":"value"}, end_: {"key":"value"} }, canonical_id: "string" }], filing_order: { coverages: ["d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32"] }, non_insurance_payers: ["string"], guarantor: { name: { family: "string", given: ["string"], use: USUAL, period: { start: {"key":"value"}, end_: {"key":"value"} } }, telecom: { value: "string", use: HOME, period: {"key":"value"} }, email: "string", birth_date: DateTime.parse(2023-01-15), address: { use: HOME, line: ["string"], city: "string", state: "string", postal_code: "string", country: "string", period: { start: {"key":"value"}, end_: {"key":"value"} } } }, self_pay: true, authorizations: [{ payer_id: "string", payer_name: "string", additional_payer_information: {"key":"value"}, authorization_number: "string", cpt_code: "string", units: VISIT, quantity: {"key":"value"}, period: {"key":"value"}, notes: {"key":"value"} }], referrals: [{ provider: { name: { family: "string", given: ["string"], use: USUAL, period: { start: {"key":"value"}, end_: {"key":"value"} } }, type: PRIMARY, npi: "string", telecoms: [{ value: "string", use: HOME, period: {"key":"value"} }], addresses: [{"key":"value"}], period: { start: {"key":"value"}, end_: {"key":"value"} }, canonical_id: "string" }, referral_number: "string", period: {"key":"value"}, notes: {"key":"value"} }] })
|
517
523
|
def create(request:, skip_duplicate_check: nil, request_options: nil)
|
518
524
|
Async do
|
519
525
|
response = @request_client.conn.post do |req|
|
@@ -717,6 +723,8 @@ module CandidApiClient
|
|
717
723
|
# * :start (Date)
|
718
724
|
# * :end_ (Date)
|
719
725
|
# * :self_pay (Boolean)
|
726
|
+
# * :authorizations (Array<CandidApiClient::PreEncounter::Patients::V1::Types::Authorization>)
|
727
|
+
# * :referrals (Array<CandidApiClient::PreEncounter::Patients::V1::Types::Referral>)
|
720
728
|
# @param request_options [CandidApiClient::RequestOptions]
|
721
729
|
# @return [CandidApiClient::PreEncounter::Patients::V1::Types::Patient]
|
722
730
|
# @example
|
@@ -724,7 +732,7 @@ module CandidApiClient
|
|
724
732
|
# api.pre_encounter.patients.v_1.update(
|
725
733
|
# id: "string",
|
726
734
|
# version: "string",
|
727
|
-
# request: { name: { family: "string", given: ["string"], use: USUAL, period: { start:
|
735
|
+
# request: { name: { family: "string", given: ["string"], use: USUAL, period: { start: {"key":"value"}, end_: {"key":"value"} } }, other_names: [{ family: "string", given: ["string"], use: USUAL, period: { start: {"key":"value"}, end_: {"key":"value"} } }], gender: MAN, birth_date: DateTime.parse(2023-01-15), social_security_number: "string", biological_sex: FEMALE, sexual_orientation: HETEROSEXUAL, race: AMERICAN_INDIAN_OR_ALASKA_NATIVE, ethnicity: HISPANIC_OR_LATINO, disability_status: DISABLED, marital_status: ANNULLED, deceased: DateTime.parse(2024-01-15T09:30:00.000Z), multiple_birth: 1, primary_address: { use: HOME, line: ["string"], city: "string", state: "string", postal_code: "string", country: "string", period: { start: {"key":"value"}, end_: {"key":"value"} } }, other_addresses: [{ use: HOME, line: ["string"], city: "string", state: "string", postal_code: "string", country: "string", period: { start: {"key":"value"}, end_: {"key":"value"} } }], primary_telecom: { value: "string", use: HOME, period: {"key":"value"} }, other_telecoms: [{ value: "string", use: HOME, period: {"key":"value"} }], email: "string", electronic_communication_opt_in: true, photo: "string", language: "string", external_provenance: { external_id: "string", system_name: "string" }, contacts: [{ relationship: [SELF], name: { family: "string", given: ["string"], use: USUAL, period: { start: {"key":"value"}, end_: {"key":"value"} } }, telecoms: [{ value: "string", use: HOME, period: {"key":"value"} }], addresses: [{ use: HOME, line: ["string"], city: "string", state: "string", postal_code: "string", country: "string", period: { start: {"key":"value"}, end_: {"key":"value"} } }], period: { start: {"key":"value"}, end_: {"key":"value"} }, hipaa_authorization: true }], general_practitioners: [{ name: { family: "string", given: ["string"], use: USUAL, period: { start: {"key":"value"}, end_: {"key":"value"} } }, type: PRIMARY, npi: "string", telecoms: [{ value: "string", use: HOME, period: {"key":"value"} }], addresses: [{"key":"value"}], period: { start: {"key":"value"}, end_: {"key":"value"} }, canonical_id: "string" }], filing_order: { coverages: ["d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32"] }, non_insurance_payers: ["string"], guarantor: { name: { family: "string", given: ["string"], use: USUAL, period: { start: {"key":"value"}, end_: {"key":"value"} } }, telecom: { value: "string", use: HOME, period: {"key":"value"} }, email: "string", birth_date: DateTime.parse(2023-01-15), address: { use: HOME, line: ["string"], city: "string", state: "string", postal_code: "string", country: "string", period: { start: {"key":"value"}, end_: {"key":"value"} } } }, self_pay: true, authorizations: [{ payer_id: "string", payer_name: "string", additional_payer_information: {"key":"value"}, authorization_number: "string", cpt_code: "string", units: VISIT, quantity: {"key":"value"}, period: {"key":"value"}, notes: {"key":"value"} }], referrals: [{ provider: { name: { family: "string", given: ["string"], use: USUAL, period: { start: {"key":"value"}, end_: {"key":"value"} } }, type: PRIMARY, npi: "string", telecoms: [{ value: "string", use: HOME, period: {"key":"value"} }], addresses: [{"key":"value"}], period: { start: {"key":"value"}, end_: {"key":"value"} }, canonical_id: "string" }, referral_number: "string", period: {"key":"value"}, notes: {"key":"value"} }] }
|
728
736
|
# )
|
729
737
|
def update(id:, version:, request:, request_options: nil)
|
730
738
|
Async do
|
@@ -0,0 +1,148 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require_relative "../../../common/types/additional_payer_information"
|
4
|
+
require_relative "authorization_unit"
|
5
|
+
require_relative "../../../common/types/period"
|
6
|
+
require "ostruct"
|
7
|
+
require "json"
|
8
|
+
|
9
|
+
module CandidApiClient
|
10
|
+
module PreEncounter
|
11
|
+
module Patients
|
12
|
+
module V1
|
13
|
+
module Types
|
14
|
+
class Authorization
|
15
|
+
# @return [String]
|
16
|
+
attr_reader :payer_id
|
17
|
+
# @return [String]
|
18
|
+
attr_reader :payer_name
|
19
|
+
# @return [CandidApiClient::PreEncounter::Common::Types::AdditionalPayerInformation]
|
20
|
+
attr_reader :additional_payer_information
|
21
|
+
# @return [String]
|
22
|
+
attr_reader :authorization_number
|
23
|
+
# @return [String]
|
24
|
+
attr_reader :cpt_code
|
25
|
+
# @return [CandidApiClient::PreEncounter::Patients::V1::Types::AuthorizationUnit]
|
26
|
+
attr_reader :units
|
27
|
+
# @return [Integer]
|
28
|
+
attr_reader :quantity
|
29
|
+
# @return [CandidApiClient::PreEncounter::Common::Types::Period]
|
30
|
+
attr_reader :period
|
31
|
+
# @return [String]
|
32
|
+
attr_reader :notes
|
33
|
+
# @return [OpenStruct] Additional properties unmapped to the current class definition
|
34
|
+
attr_reader :additional_properties
|
35
|
+
# @return [Object]
|
36
|
+
attr_reader :_field_set
|
37
|
+
protected :_field_set
|
38
|
+
|
39
|
+
OMIT = Object.new
|
40
|
+
|
41
|
+
# @param payer_id [String]
|
42
|
+
# @param payer_name [String]
|
43
|
+
# @param additional_payer_information [CandidApiClient::PreEncounter::Common::Types::AdditionalPayerInformation]
|
44
|
+
# @param authorization_number [String]
|
45
|
+
# @param cpt_code [String]
|
46
|
+
# @param units [CandidApiClient::PreEncounter::Patients::V1::Types::AuthorizationUnit]
|
47
|
+
# @param quantity [Integer]
|
48
|
+
# @param period [CandidApiClient::PreEncounter::Common::Types::Period]
|
49
|
+
# @param notes [String]
|
50
|
+
# @param additional_properties [OpenStruct] Additional properties unmapped to the current class definition
|
51
|
+
# @return [CandidApiClient::PreEncounter::Patients::V1::Types::Authorization]
|
52
|
+
def initialize(payer_id:, payer_name:, authorization_number:, cpt_code:, units:,
|
53
|
+
additional_payer_information: OMIT, quantity: OMIT, period: OMIT, notes: OMIT, additional_properties: nil)
|
54
|
+
@payer_id = payer_id
|
55
|
+
@payer_name = payer_name
|
56
|
+
@additional_payer_information = additional_payer_information if additional_payer_information != OMIT
|
57
|
+
@authorization_number = authorization_number
|
58
|
+
@cpt_code = cpt_code
|
59
|
+
@units = units
|
60
|
+
@quantity = quantity if quantity != OMIT
|
61
|
+
@period = period if period != OMIT
|
62
|
+
@notes = notes if notes != OMIT
|
63
|
+
@additional_properties = additional_properties
|
64
|
+
@_field_set = {
|
65
|
+
"payer_id": payer_id,
|
66
|
+
"payer_name": payer_name,
|
67
|
+
"additional_payer_information": additional_payer_information,
|
68
|
+
"authorization_number": authorization_number,
|
69
|
+
"cpt_code": cpt_code,
|
70
|
+
"units": units,
|
71
|
+
"quantity": quantity,
|
72
|
+
"period": period,
|
73
|
+
"notes": notes
|
74
|
+
}.reject do |_k, v|
|
75
|
+
v == OMIT
|
76
|
+
end
|
77
|
+
end
|
78
|
+
|
79
|
+
# Deserialize a JSON object to an instance of Authorization
|
80
|
+
#
|
81
|
+
# @param json_object [String]
|
82
|
+
# @return [CandidApiClient::PreEncounter::Patients::V1::Types::Authorization]
|
83
|
+
def self.from_json(json_object:)
|
84
|
+
struct = JSON.parse(json_object, object_class: OpenStruct)
|
85
|
+
parsed_json = JSON.parse(json_object)
|
86
|
+
payer_id = struct["payer_id"]
|
87
|
+
payer_name = struct["payer_name"]
|
88
|
+
if parsed_json["additional_payer_information"].nil?
|
89
|
+
additional_payer_information = nil
|
90
|
+
else
|
91
|
+
additional_payer_information = parsed_json["additional_payer_information"].to_json
|
92
|
+
additional_payer_information = CandidApiClient::PreEncounter::Common::Types::AdditionalPayerInformation.from_json(json_object: additional_payer_information)
|
93
|
+
end
|
94
|
+
authorization_number = struct["authorization_number"]
|
95
|
+
cpt_code = struct["cpt_code"]
|
96
|
+
units = struct["units"]
|
97
|
+
quantity = struct["quantity"]
|
98
|
+
if parsed_json["period"].nil?
|
99
|
+
period = nil
|
100
|
+
else
|
101
|
+
period = parsed_json["period"].to_json
|
102
|
+
period = CandidApiClient::PreEncounter::Common::Types::Period.from_json(json_object: period)
|
103
|
+
end
|
104
|
+
notes = struct["notes"]
|
105
|
+
new(
|
106
|
+
payer_id: payer_id,
|
107
|
+
payer_name: payer_name,
|
108
|
+
additional_payer_information: additional_payer_information,
|
109
|
+
authorization_number: authorization_number,
|
110
|
+
cpt_code: cpt_code,
|
111
|
+
units: units,
|
112
|
+
quantity: quantity,
|
113
|
+
period: period,
|
114
|
+
notes: notes,
|
115
|
+
additional_properties: struct
|
116
|
+
)
|
117
|
+
end
|
118
|
+
|
119
|
+
# Serialize an instance of Authorization to a JSON object
|
120
|
+
#
|
121
|
+
# @return [String]
|
122
|
+
def to_json(*_args)
|
123
|
+
@_field_set&.to_json
|
124
|
+
end
|
125
|
+
|
126
|
+
# Leveraged for Union-type generation, validate_raw attempts to parse the given
|
127
|
+
# hash and check each fields type against the current object's property
|
128
|
+
# definitions.
|
129
|
+
#
|
130
|
+
# @param obj [Object]
|
131
|
+
# @return [Void]
|
132
|
+
def self.validate_raw(obj:)
|
133
|
+
obj.payer_id.is_a?(String) != false || raise("Passed value for field obj.payer_id is not the expected type, validation failed.")
|
134
|
+
obj.payer_name.is_a?(String) != false || raise("Passed value for field obj.payer_name is not the expected type, validation failed.")
|
135
|
+
obj.additional_payer_information.nil? || CandidApiClient::PreEncounter::Common::Types::AdditionalPayerInformation.validate_raw(obj: obj.additional_payer_information)
|
136
|
+
obj.authorization_number.is_a?(String) != false || raise("Passed value for field obj.authorization_number is not the expected type, validation failed.")
|
137
|
+
obj.cpt_code.is_a?(String) != false || raise("Passed value for field obj.cpt_code is not the expected type, validation failed.")
|
138
|
+
obj.units.is_a?(CandidApiClient::PreEncounter::Patients::V1::Types::AuthorizationUnit) != false || raise("Passed value for field obj.units is not the expected type, validation failed.")
|
139
|
+
obj.quantity&.is_a?(Integer) != false || raise("Passed value for field obj.quantity is not the expected type, validation failed.")
|
140
|
+
obj.period.nil? || CandidApiClient::PreEncounter::Common::Types::Period.validate_raw(obj: obj.period)
|
141
|
+
obj.notes&.is_a?(String) != false || raise("Passed value for field obj.notes is not the expected type, validation failed.")
|
142
|
+
end
|
143
|
+
end
|
144
|
+
end
|
145
|
+
end
|
146
|
+
end
|
147
|
+
end
|
148
|
+
end
|
@@ -16,6 +16,8 @@ require_relative "contact"
|
|
16
16
|
require_relative "../../../common/types/external_provider"
|
17
17
|
require_relative "filing_order"
|
18
18
|
require_relative "guarantor"
|
19
|
+
require_relative "authorization"
|
20
|
+
require_relative "referral"
|
19
21
|
require "ostruct"
|
20
22
|
require "json"
|
21
23
|
|
@@ -86,6 +88,10 @@ module CandidApiClient
|
|
86
88
|
attr_reader :guarantor
|
87
89
|
# @return [Boolean]
|
88
90
|
attr_reader :self_pay
|
91
|
+
# @return [Array<CandidApiClient::PreEncounter::Patients::V1::Types::Authorization>]
|
92
|
+
attr_reader :authorizations
|
93
|
+
# @return [Array<CandidApiClient::PreEncounter::Patients::V1::Types::Referral>]
|
94
|
+
attr_reader :referrals
|
89
95
|
# @return [OpenStruct] Additional properties unmapped to the current class definition
|
90
96
|
attr_reader :additional_properties
|
91
97
|
# @return [Object]
|
@@ -126,10 +132,12 @@ module CandidApiClient
|
|
126
132
|
# @param non_insurance_payers [Array<String>]
|
127
133
|
# @param guarantor [CandidApiClient::PreEncounter::Patients::V1::Types::Guarantor]
|
128
134
|
# @param self_pay [Boolean]
|
135
|
+
# @param authorizations [Array<CandidApiClient::PreEncounter::Patients::V1::Types::Authorization>]
|
136
|
+
# @param referrals [Array<CandidApiClient::PreEncounter::Patients::V1::Types::Referral>]
|
129
137
|
# @param additional_properties [OpenStruct] Additional properties unmapped to the current class definition
|
130
138
|
# @return [CandidApiClient::PreEncounter::Patients::V1::Types::MutablePatient]
|
131
139
|
def initialize(name:, other_names:, birth_date:, biological_sex:, primary_address:, other_addresses:,
|
132
|
-
primary_telecom:, other_telecoms:, contacts:, general_practitioners:, filing_order:, gender: OMIT, social_security_number: OMIT, sexual_orientation: OMIT, race: OMIT, ethnicity: OMIT, disability_status: OMIT, marital_status: OMIT, deceased: OMIT, multiple_birth: OMIT, email: OMIT, electronic_communication_opt_in: OMIT, photo: OMIT, language: OMIT, external_provenance: OMIT, non_insurance_payers: OMIT, guarantor: OMIT, self_pay: OMIT, additional_properties: nil)
|
140
|
+
primary_telecom:, other_telecoms:, contacts:, general_practitioners:, filing_order:, gender: OMIT, social_security_number: OMIT, sexual_orientation: OMIT, race: OMIT, ethnicity: OMIT, disability_status: OMIT, marital_status: OMIT, deceased: OMIT, multiple_birth: OMIT, email: OMIT, electronic_communication_opt_in: OMIT, photo: OMIT, language: OMIT, external_provenance: OMIT, non_insurance_payers: OMIT, guarantor: OMIT, self_pay: OMIT, authorizations: OMIT, referrals: OMIT, additional_properties: nil)
|
133
141
|
@name = name
|
134
142
|
@other_names = other_names
|
135
143
|
@gender = gender if gender != OMIT
|
@@ -160,6 +168,8 @@ module CandidApiClient
|
|
160
168
|
@non_insurance_payers = non_insurance_payers if non_insurance_payers != OMIT
|
161
169
|
@guarantor = guarantor if guarantor != OMIT
|
162
170
|
@self_pay = self_pay if self_pay != OMIT
|
171
|
+
@authorizations = authorizations if authorizations != OMIT
|
172
|
+
@referrals = referrals if referrals != OMIT
|
163
173
|
@additional_properties = additional_properties
|
164
174
|
@_field_set = {
|
165
175
|
"name": name,
|
@@ -189,7 +199,9 @@ module CandidApiClient
|
|
189
199
|
"filing_order": filing_order,
|
190
200
|
"non_insurance_payers": non_insurance_payers,
|
191
201
|
"guarantor": guarantor,
|
192
|
-
"self_pay": self_pay
|
202
|
+
"self_pay": self_pay,
|
203
|
+
"authorizations": authorizations,
|
204
|
+
"referrals": referrals
|
193
205
|
}.reject do |_k, v|
|
194
206
|
v == OMIT
|
195
207
|
end
|
@@ -275,6 +287,14 @@ module CandidApiClient
|
|
275
287
|
guarantor = CandidApiClient::PreEncounter::Patients::V1::Types::Guarantor.from_json(json_object: guarantor)
|
276
288
|
end
|
277
289
|
self_pay = struct["self_pay"]
|
290
|
+
authorizations = parsed_json["authorizations"]&.map do |item|
|
291
|
+
item = item.to_json
|
292
|
+
CandidApiClient::PreEncounter::Patients::V1::Types::Authorization.from_json(json_object: item)
|
293
|
+
end
|
294
|
+
referrals = parsed_json["referrals"]&.map do |item|
|
295
|
+
item = item.to_json
|
296
|
+
CandidApiClient::PreEncounter::Patients::V1::Types::Referral.from_json(json_object: item)
|
297
|
+
end
|
278
298
|
new(
|
279
299
|
name: name,
|
280
300
|
other_names: other_names,
|
@@ -304,6 +324,8 @@ module CandidApiClient
|
|
304
324
|
non_insurance_payers: non_insurance_payers,
|
305
325
|
guarantor: guarantor,
|
306
326
|
self_pay: self_pay,
|
327
|
+
authorizations: authorizations,
|
328
|
+
referrals: referrals,
|
307
329
|
additional_properties: struct
|
308
330
|
)
|
309
331
|
end
|
@@ -350,6 +372,8 @@ module CandidApiClient
|
|
350
372
|
obj.non_insurance_payers&.is_a?(Array) != false || raise("Passed value for field obj.non_insurance_payers is not the expected type, validation failed.")
|
351
373
|
obj.guarantor.nil? || CandidApiClient::PreEncounter::Patients::V1::Types::Guarantor.validate_raw(obj: obj.guarantor)
|
352
374
|
obj.self_pay&.is_a?(Boolean) != false || raise("Passed value for field obj.self_pay is not the expected type, validation failed.")
|
375
|
+
obj.authorizations&.is_a?(Array) != false || raise("Passed value for field obj.authorizations is not the expected type, validation failed.")
|
376
|
+
obj.referrals&.is_a?(Array) != false || raise("Passed value for field obj.referrals is not the expected type, validation failed.")
|
353
377
|
end
|
354
378
|
end
|
355
379
|
end
|