candidhealth 1.6.0 → 1.7.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/auth/default/client.rb +46 -0
- data/lib/candidhealth/credentialing/v_2/client.rb +342 -8
- data/lib/candidhealth/credentialing/v_2/types/base_credentialing_span.rb +143 -0
- data/lib/candidhealth/credentialing/v_2/types/facility_credentialing_span.rb +165 -0
- data/lib/candidhealth/credentialing/v_2/types/facility_credentialing_span_page.rb +88 -0
- data/lib/candidhealth/credentialing/v_2/types/provider_credentialing_span.rb +34 -34
- data/lib/candidhealth/health_care_code_information/client.rb +30 -0
- data/lib/candidhealth/health_care_code_information/v_1/client.rb +268 -0
- data/lib/candidhealth/health_care_code_information/v_1/types/admitting_diagnosis.rb +236 -0
- data/lib/candidhealth/health_care_code_information/v_1/types/admitting_diagnosis_code_qualifier.rb +14 -0
- data/lib/candidhealth/health_care_code_information/v_1/types/code_list_qualifier_code.rb +1068 -0
- data/lib/candidhealth/health_care_code_information/v_1/types/condition_code.rb +71 -0
- data/lib/candidhealth/health_care_code_information/v_1/types/condition_information.rb +237 -0
- data/lib/candidhealth/health_care_code_information/v_1/types/condition_information_code_qualifier.rb +13 -0
- data/lib/candidhealth/health_care_code_information/v_1/types/date_time_period_format_qualifier.rb +54 -0
- data/lib/candidhealth/health_care_code_information/v_1/types/diagnosis_related_group.rb +236 -0
- data/lib/candidhealth/health_care_code_information/v_1/types/diagnosis_related_group_code_qualifier.rb +13 -0
- data/lib/candidhealth/health_care_code_information/v_1/types/external_cause_of_injury.rb +245 -0
- data/lib/candidhealth/health_care_code_information/v_1/types/external_cause_of_injury_code_qualifier.rb +14 -0
- data/lib/candidhealth/health_care_code_information/v_1/types/health_care_code_information.rb +218 -0
- data/lib/candidhealth/health_care_code_information/v_1/types/health_care_code_information_get_all_response.rb +227 -0
- data/lib/candidhealth/health_care_code_information/v_1/types/health_care_code_information_new.rb +188 -0
- data/lib/candidhealth/health_care_code_information/v_1/types/health_care_code_information_update.rb +225 -0
- data/lib/candidhealth/health_care_code_information/v_1/types/occurrence_code.rb +71 -0
- data/lib/candidhealth/health_care_code_information/v_1/types/occurrence_information.rb +249 -0
- data/lib/candidhealth/health_care_code_information/v_1/types/occurrence_information_code_qualifier.rb +13 -0
- data/lib/candidhealth/health_care_code_information/v_1/types/occurrence_span_code.rb +25 -0
- data/lib/candidhealth/health_care_code_information/v_1/types/occurrence_span_code_qualifier.rb +13 -0
- data/lib/candidhealth/health_care_code_information/v_1/types/occurrence_span_information.rb +252 -0
- data/lib/candidhealth/health_care_code_information/v_1/types/other_diagnosis_information.rb +245 -0
- data/lib/candidhealth/health_care_code_information/v_1/types/other_diagnosis_information_code_qualifier.rb +14 -0
- data/lib/candidhealth/health_care_code_information/v_1/types/other_procedure_information.rb +248 -0
- data/lib/candidhealth/health_care_code_information/v_1/types/other_procedure_information_code_qualifier.rb +14 -0
- data/lib/candidhealth/health_care_code_information/v_1/types/patient_reason_for_visit.rb +236 -0
- data/lib/candidhealth/health_care_code_information/v_1/types/patient_reason_for_visit_code_qualifier.rb +14 -0
- data/lib/candidhealth/health_care_code_information/v_1/types/present_on_admission_indicator_code.rb +17 -0
- data/lib/candidhealth/health_care_code_information/v_1/types/principal_diagnosis.rb +245 -0
- data/lib/candidhealth/health_care_code_information/v_1/types/principal_diagnosis_code_qualifier.rb +14 -0
- data/lib/candidhealth/health_care_code_information/v_1/types/principal_procedure_information.rb +246 -0
- data/lib/candidhealth/health_care_code_information/v_1/types/principal_procedure_information_code_qualifier.rb +15 -0
- data/lib/candidhealth/health_care_code_information/v_1/types/rd_8_date.rb +72 -0
- data/lib/candidhealth/health_care_code_information/v_1/types/set_or_clear_admitting_diagnosis.rb +69 -0
- data/lib/candidhealth/health_care_code_information/v_1/types/set_or_clear_diagnosis_related_group.rb +69 -0
- data/lib/candidhealth/health_care_code_information/v_1/types/set_or_clear_principal_diagnosis.rb +69 -0
- data/lib/candidhealth/health_care_code_information/v_1/types/set_or_clear_principal_procedure_information.rb +71 -0
- data/lib/candidhealth/health_care_code_information/v_1/types/treatment_code_information.rb +236 -0
- data/lib/candidhealth/health_care_code_information/v_1/types/treatment_code_qualifier.rb +13 -0
- data/lib/candidhealth/health_care_code_information/v_1/types/value_code.rb +119 -0
- data/lib/candidhealth/health_care_code_information/v_1/types/value_code_qualifier.rb +13 -0
- data/lib/candidhealth/health_care_code_information/v_1/types/value_information.rb +245 -0
- data/lib/candidhealth/patient_ar/client.rb +30 -0
- data/lib/candidhealth/patient_ar/v_1/client.rb +161 -0
- data/lib/candidhealth/patient_ar/v_1/types/insurance_adjustment_info.rb +60 -0
- data/lib/candidhealth/patient_ar/v_1/types/insurance_payment_info.rb +60 -0
- data/lib/candidhealth/patient_ar/v_1/types/invalid_filters_error_type.rb +60 -0
- data/lib/candidhealth/patient_ar/v_1/types/inventory_record.rb +101 -0
- data/lib/candidhealth/patient_ar/v_1/types/invoice_itemization_response.rb +103 -0
- data/lib/candidhealth/patient_ar/v_1/types/list_inventory_paged_response.rb +77 -0
- data/lib/candidhealth/patient_ar/v_1/types/non_insurance_adjustment_info.rb +60 -0
- data/lib/candidhealth/patient_ar/v_1/types/non_insurance_payment_info.rb +60 -0
- data/lib/candidhealth/patient_ar/v_1/types/patient_adjustment_info.rb +60 -0
- data/lib/candidhealth/patient_ar/v_1/types/patient_ar_status.rb +14 -0
- data/lib/candidhealth/patient_ar/v_1/types/patient_payment_allocation.rb +76 -0
- data/lib/candidhealth/patient_ar/v_1/types/patient_payment_info.rb +75 -0
- data/lib/candidhealth/patient_ar/v_1/types/service_line_itemization.rb +210 -0
- data/lib/candidhealth/pre_encounter/patients/v_1/client.rb +132 -0
- data/lib/candidhealth/pre_encounter/patients/v_1/types/mutable_patient.rb +16 -2
- data/lib/candidhealth/pre_encounter/patients/v_1/types/mutable_patient_with_mrn.rb +16 -2
- data/lib/candidhealth/pre_encounter/patients/v_1/types/origination_detail.rb +104 -0
- data/lib/candidhealth/pre_encounter/patients/v_1/types/patient.rb +16 -2
- data/lib/candidhealth/pre_encounter/patients/v_1/types/referral_source.rb +18 -0
- data/lib/candidhealth/pre_encounter/patients/v_1/types/referral_type.rb +16 -0
- data/lib/candidhealth/pre_encounter/patients/v_1/types/specialization_category.rb +42 -0
- data/lib/candidhealth.rb +21 -7
- data/lib/requests.rb +2 -2
- data/lib/types_export.rb +72 -9
- metadata +68 -2
@@ -0,0 +1,60 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require "ostruct"
|
4
|
+
require "json"
|
5
|
+
|
6
|
+
module CandidApiClient
|
7
|
+
module PatientAr
|
8
|
+
module V1
|
9
|
+
module Types
|
10
|
+
class NonInsuranceAdjustmentInfo
|
11
|
+
# @return [Integer] The total amount of non-insurance adjustments in cents for the service line.
|
12
|
+
attr_reader :total_adjustment_cents
|
13
|
+
# @return [OpenStruct] Additional properties unmapped to the current class definition
|
14
|
+
attr_reader :additional_properties
|
15
|
+
# @return [Object]
|
16
|
+
attr_reader :_field_set
|
17
|
+
protected :_field_set
|
18
|
+
|
19
|
+
OMIT = Object.new
|
20
|
+
|
21
|
+
# @param total_adjustment_cents [Integer] The total amount of non-insurance adjustments in cents for the service line.
|
22
|
+
# @param additional_properties [OpenStruct] Additional properties unmapped to the current class definition
|
23
|
+
# @return [CandidApiClient::PatientAr::V1::Types::NonInsuranceAdjustmentInfo]
|
24
|
+
def initialize(total_adjustment_cents:, additional_properties: nil)
|
25
|
+
@total_adjustment_cents = total_adjustment_cents
|
26
|
+
@additional_properties = additional_properties
|
27
|
+
@_field_set = { "total_adjustment_cents": total_adjustment_cents }
|
28
|
+
end
|
29
|
+
|
30
|
+
# Deserialize a JSON object to an instance of NonInsuranceAdjustmentInfo
|
31
|
+
#
|
32
|
+
# @param json_object [String]
|
33
|
+
# @return [CandidApiClient::PatientAr::V1::Types::NonInsuranceAdjustmentInfo]
|
34
|
+
def self.from_json(json_object:)
|
35
|
+
struct = JSON.parse(json_object, object_class: OpenStruct)
|
36
|
+
total_adjustment_cents = struct["total_adjustment_cents"]
|
37
|
+
new(total_adjustment_cents: total_adjustment_cents, additional_properties: struct)
|
38
|
+
end
|
39
|
+
|
40
|
+
# Serialize an instance of NonInsuranceAdjustmentInfo to a JSON object
|
41
|
+
#
|
42
|
+
# @return [String]
|
43
|
+
def to_json(*_args)
|
44
|
+
@_field_set&.to_json
|
45
|
+
end
|
46
|
+
|
47
|
+
# Leveraged for Union-type generation, validate_raw attempts to parse the given
|
48
|
+
# hash and check each fields type against the current object's property
|
49
|
+
# definitions.
|
50
|
+
#
|
51
|
+
# @param obj [Object]
|
52
|
+
# @return [Void]
|
53
|
+
def self.validate_raw(obj:)
|
54
|
+
obj.total_adjustment_cents.is_a?(Integer) != false || raise("Passed value for field obj.total_adjustment_cents is not the expected type, validation failed.")
|
55
|
+
end
|
56
|
+
end
|
57
|
+
end
|
58
|
+
end
|
59
|
+
end
|
60
|
+
end
|
@@ -0,0 +1,60 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require "ostruct"
|
4
|
+
require "json"
|
5
|
+
|
6
|
+
module CandidApiClient
|
7
|
+
module PatientAr
|
8
|
+
module V1
|
9
|
+
module Types
|
10
|
+
class NonInsurancePaymentInfo
|
11
|
+
# @return [Integer] The total amount of non-insurance payments in cents for the service line.
|
12
|
+
attr_reader :total_payment_cents
|
13
|
+
# @return [OpenStruct] Additional properties unmapped to the current class definition
|
14
|
+
attr_reader :additional_properties
|
15
|
+
# @return [Object]
|
16
|
+
attr_reader :_field_set
|
17
|
+
protected :_field_set
|
18
|
+
|
19
|
+
OMIT = Object.new
|
20
|
+
|
21
|
+
# @param total_payment_cents [Integer] The total amount of non-insurance payments in cents for the service line.
|
22
|
+
# @param additional_properties [OpenStruct] Additional properties unmapped to the current class definition
|
23
|
+
# @return [CandidApiClient::PatientAr::V1::Types::NonInsurancePaymentInfo]
|
24
|
+
def initialize(total_payment_cents:, additional_properties: nil)
|
25
|
+
@total_payment_cents = total_payment_cents
|
26
|
+
@additional_properties = additional_properties
|
27
|
+
@_field_set = { "total_payment_cents": total_payment_cents }
|
28
|
+
end
|
29
|
+
|
30
|
+
# Deserialize a JSON object to an instance of NonInsurancePaymentInfo
|
31
|
+
#
|
32
|
+
# @param json_object [String]
|
33
|
+
# @return [CandidApiClient::PatientAr::V1::Types::NonInsurancePaymentInfo]
|
34
|
+
def self.from_json(json_object:)
|
35
|
+
struct = JSON.parse(json_object, object_class: OpenStruct)
|
36
|
+
total_payment_cents = struct["total_payment_cents"]
|
37
|
+
new(total_payment_cents: total_payment_cents, additional_properties: struct)
|
38
|
+
end
|
39
|
+
|
40
|
+
# Serialize an instance of NonInsurancePaymentInfo to a JSON object
|
41
|
+
#
|
42
|
+
# @return [String]
|
43
|
+
def to_json(*_args)
|
44
|
+
@_field_set&.to_json
|
45
|
+
end
|
46
|
+
|
47
|
+
# Leveraged for Union-type generation, validate_raw attempts to parse the given
|
48
|
+
# hash and check each fields type against the current object's property
|
49
|
+
# definitions.
|
50
|
+
#
|
51
|
+
# @param obj [Object]
|
52
|
+
# @return [Void]
|
53
|
+
def self.validate_raw(obj:)
|
54
|
+
obj.total_payment_cents.is_a?(Integer) != false || raise("Passed value for field obj.total_payment_cents is not the expected type, validation failed.")
|
55
|
+
end
|
56
|
+
end
|
57
|
+
end
|
58
|
+
end
|
59
|
+
end
|
60
|
+
end
|
@@ -0,0 +1,60 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require "ostruct"
|
4
|
+
require "json"
|
5
|
+
|
6
|
+
module CandidApiClient
|
7
|
+
module PatientAr
|
8
|
+
module V1
|
9
|
+
module Types
|
10
|
+
class PatientAdjustmentInfo
|
11
|
+
# @return [Integer] The total amount of patient adjustments in cents for the service line.
|
12
|
+
attr_reader :total_adjustment_cents
|
13
|
+
# @return [OpenStruct] Additional properties unmapped to the current class definition
|
14
|
+
attr_reader :additional_properties
|
15
|
+
# @return [Object]
|
16
|
+
attr_reader :_field_set
|
17
|
+
protected :_field_set
|
18
|
+
|
19
|
+
OMIT = Object.new
|
20
|
+
|
21
|
+
# @param total_adjustment_cents [Integer] The total amount of patient adjustments in cents for the service line.
|
22
|
+
# @param additional_properties [OpenStruct] Additional properties unmapped to the current class definition
|
23
|
+
# @return [CandidApiClient::PatientAr::V1::Types::PatientAdjustmentInfo]
|
24
|
+
def initialize(total_adjustment_cents:, additional_properties: nil)
|
25
|
+
@total_adjustment_cents = total_adjustment_cents
|
26
|
+
@additional_properties = additional_properties
|
27
|
+
@_field_set = { "total_adjustment_cents": total_adjustment_cents }
|
28
|
+
end
|
29
|
+
|
30
|
+
# Deserialize a JSON object to an instance of PatientAdjustmentInfo
|
31
|
+
#
|
32
|
+
# @param json_object [String]
|
33
|
+
# @return [CandidApiClient::PatientAr::V1::Types::PatientAdjustmentInfo]
|
34
|
+
def self.from_json(json_object:)
|
35
|
+
struct = JSON.parse(json_object, object_class: OpenStruct)
|
36
|
+
total_adjustment_cents = struct["total_adjustment_cents"]
|
37
|
+
new(total_adjustment_cents: total_adjustment_cents, additional_properties: struct)
|
38
|
+
end
|
39
|
+
|
40
|
+
# Serialize an instance of PatientAdjustmentInfo to a JSON object
|
41
|
+
#
|
42
|
+
# @return [String]
|
43
|
+
def to_json(*_args)
|
44
|
+
@_field_set&.to_json
|
45
|
+
end
|
46
|
+
|
47
|
+
# Leveraged for Union-type generation, validate_raw attempts to parse the given
|
48
|
+
# hash and check each fields type against the current object's property
|
49
|
+
# definitions.
|
50
|
+
#
|
51
|
+
# @param obj [Object]
|
52
|
+
# @return [Void]
|
53
|
+
def self.validate_raw(obj:)
|
54
|
+
obj.total_adjustment_cents.is_a?(Integer) != false || raise("Passed value for field obj.total_adjustment_cents is not the expected type, validation failed.")
|
55
|
+
end
|
56
|
+
end
|
57
|
+
end
|
58
|
+
end
|
59
|
+
end
|
60
|
+
end
|
@@ -0,0 +1,76 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require "ostruct"
|
4
|
+
require "json"
|
5
|
+
|
6
|
+
module CandidApiClient
|
7
|
+
module PatientAr
|
8
|
+
module V1
|
9
|
+
module Types
|
10
|
+
class PatientPaymentAllocation
|
11
|
+
# @return [String] Payment identifier from the source system (e.g., patient portal, manual entry).
|
12
|
+
# Note multiple allocations may exist for a single payment and
|
13
|
+
# thus may share the same source_id.
|
14
|
+
attr_reader :source_id
|
15
|
+
# @return [Integer] The amount of the patient payment in cents.
|
16
|
+
attr_reader :amount_cents
|
17
|
+
# @return [OpenStruct] Additional properties unmapped to the current class definition
|
18
|
+
attr_reader :additional_properties
|
19
|
+
# @return [Object]
|
20
|
+
attr_reader :_field_set
|
21
|
+
protected :_field_set
|
22
|
+
|
23
|
+
OMIT = Object.new
|
24
|
+
|
25
|
+
# @param source_id [String] Payment identifier from the source system (e.g., patient portal, manual entry).
|
26
|
+
# Note multiple allocations may exist for a single payment and
|
27
|
+
# thus may share the same source_id.
|
28
|
+
# @param amount_cents [Integer] The amount of the patient payment in cents.
|
29
|
+
# @param additional_properties [OpenStruct] Additional properties unmapped to the current class definition
|
30
|
+
# @return [CandidApiClient::PatientAr::V1::Types::PatientPaymentAllocation]
|
31
|
+
def initialize(amount_cents:, source_id: OMIT, additional_properties: nil)
|
32
|
+
@source_id = source_id if source_id != OMIT
|
33
|
+
@amount_cents = amount_cents
|
34
|
+
@additional_properties = additional_properties
|
35
|
+
@_field_set = { "source_id": source_id, "amount_cents": amount_cents }.reject do |_k, v|
|
36
|
+
v == OMIT
|
37
|
+
end
|
38
|
+
end
|
39
|
+
|
40
|
+
# Deserialize a JSON object to an instance of PatientPaymentAllocation
|
41
|
+
#
|
42
|
+
# @param json_object [String]
|
43
|
+
# @return [CandidApiClient::PatientAr::V1::Types::PatientPaymentAllocation]
|
44
|
+
def self.from_json(json_object:)
|
45
|
+
struct = JSON.parse(json_object, object_class: OpenStruct)
|
46
|
+
source_id = struct["source_id"]
|
47
|
+
amount_cents = struct["amount_cents"]
|
48
|
+
new(
|
49
|
+
source_id: source_id,
|
50
|
+
amount_cents: amount_cents,
|
51
|
+
additional_properties: struct
|
52
|
+
)
|
53
|
+
end
|
54
|
+
|
55
|
+
# Serialize an instance of PatientPaymentAllocation to a JSON object
|
56
|
+
#
|
57
|
+
# @return [String]
|
58
|
+
def to_json(*_args)
|
59
|
+
@_field_set&.to_json
|
60
|
+
end
|
61
|
+
|
62
|
+
# Leveraged for Union-type generation, validate_raw attempts to parse the given
|
63
|
+
# hash and check each fields type against the current object's property
|
64
|
+
# definitions.
|
65
|
+
#
|
66
|
+
# @param obj [Object]
|
67
|
+
# @return [Void]
|
68
|
+
def self.validate_raw(obj:)
|
69
|
+
obj.source_id&.is_a?(String) != false || raise("Passed value for field obj.source_id is not the expected type, validation failed.")
|
70
|
+
obj.amount_cents.is_a?(Integer) != false || raise("Passed value for field obj.amount_cents is not the expected type, validation failed.")
|
71
|
+
end
|
72
|
+
end
|
73
|
+
end
|
74
|
+
end
|
75
|
+
end
|
76
|
+
end
|
@@ -0,0 +1,75 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require_relative "patient_payment_allocation"
|
4
|
+
require "ostruct"
|
5
|
+
require "json"
|
6
|
+
|
7
|
+
module CandidApiClient
|
8
|
+
module PatientAr
|
9
|
+
module V1
|
10
|
+
module Types
|
11
|
+
class PatientPaymentInfo
|
12
|
+
# @return [Integer] The total amount of patient payments in cents for the service line.
|
13
|
+
attr_reader :total_payment_cents
|
14
|
+
# @return [Array<CandidApiClient::PatientAr::V1::Types::PatientPaymentAllocation>] A list of patient payment items associated with the service line.
|
15
|
+
attr_reader :items
|
16
|
+
# @return [OpenStruct] Additional properties unmapped to the current class definition
|
17
|
+
attr_reader :additional_properties
|
18
|
+
# @return [Object]
|
19
|
+
attr_reader :_field_set
|
20
|
+
protected :_field_set
|
21
|
+
|
22
|
+
OMIT = Object.new
|
23
|
+
|
24
|
+
# @param total_payment_cents [Integer] The total amount of patient payments in cents for the service line.
|
25
|
+
# @param items [Array<CandidApiClient::PatientAr::V1::Types::PatientPaymentAllocation>] A list of patient payment items associated with the service line.
|
26
|
+
# @param additional_properties [OpenStruct] Additional properties unmapped to the current class definition
|
27
|
+
# @return [CandidApiClient::PatientAr::V1::Types::PatientPaymentInfo]
|
28
|
+
def initialize(total_payment_cents:, items:, additional_properties: nil)
|
29
|
+
@total_payment_cents = total_payment_cents
|
30
|
+
@items = items
|
31
|
+
@additional_properties = additional_properties
|
32
|
+
@_field_set = { "total_payment_cents": total_payment_cents, "items": items }
|
33
|
+
end
|
34
|
+
|
35
|
+
# Deserialize a JSON object to an instance of PatientPaymentInfo
|
36
|
+
#
|
37
|
+
# @param json_object [String]
|
38
|
+
# @return [CandidApiClient::PatientAr::V1::Types::PatientPaymentInfo]
|
39
|
+
def self.from_json(json_object:)
|
40
|
+
struct = JSON.parse(json_object, object_class: OpenStruct)
|
41
|
+
parsed_json = JSON.parse(json_object)
|
42
|
+
total_payment_cents = struct["total_payment_cents"]
|
43
|
+
items = parsed_json["items"]&.map do |item|
|
44
|
+
item = item.to_json
|
45
|
+
CandidApiClient::PatientAr::V1::Types::PatientPaymentAllocation.from_json(json_object: item)
|
46
|
+
end
|
47
|
+
new(
|
48
|
+
total_payment_cents: total_payment_cents,
|
49
|
+
items: items,
|
50
|
+
additional_properties: struct
|
51
|
+
)
|
52
|
+
end
|
53
|
+
|
54
|
+
# Serialize an instance of PatientPaymentInfo to a JSON object
|
55
|
+
#
|
56
|
+
# @return [String]
|
57
|
+
def to_json(*_args)
|
58
|
+
@_field_set&.to_json
|
59
|
+
end
|
60
|
+
|
61
|
+
# Leveraged for Union-type generation, validate_raw attempts to parse the given
|
62
|
+
# hash and check each fields type against the current object's property
|
63
|
+
# definitions.
|
64
|
+
#
|
65
|
+
# @param obj [Object]
|
66
|
+
# @return [Void]
|
67
|
+
def self.validate_raw(obj:)
|
68
|
+
obj.total_payment_cents.is_a?(Integer) != false || raise("Passed value for field obj.total_payment_cents is not the expected type, validation failed.")
|
69
|
+
obj.items.is_a?(Array) != false || raise("Passed value for field obj.items is not the expected type, validation failed.")
|
70
|
+
end
|
71
|
+
end
|
72
|
+
end
|
73
|
+
end
|
74
|
+
end
|
75
|
+
end
|
@@ -0,0 +1,210 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require "date"
|
4
|
+
require_relative "insurance_adjustment_info"
|
5
|
+
require_relative "insurance_payment_info"
|
6
|
+
require_relative "non_insurance_adjustment_info"
|
7
|
+
require_relative "non_insurance_payment_info"
|
8
|
+
require_relative "patient_adjustment_info"
|
9
|
+
require_relative "patient_payment_info"
|
10
|
+
require "ostruct"
|
11
|
+
require "json"
|
12
|
+
|
13
|
+
module CandidApiClient
|
14
|
+
module PatientAr
|
15
|
+
module V1
|
16
|
+
module Types
|
17
|
+
class ServiceLineItemization
|
18
|
+
# @return [String] The ID of the service line.
|
19
|
+
attr_reader :service_line_id
|
20
|
+
# @return [String] The procedure code (CPT/HCPCS) associated with the service line.
|
21
|
+
attr_reader :procedure_code
|
22
|
+
# @return [Date] The date of service for the service line.
|
23
|
+
attr_reader :date_of_service
|
24
|
+
# @return [Integer] The total patient balance in cents for the service line. Negative values
|
25
|
+
# indicate a credit balance.
|
26
|
+
attr_reader :patient_balance_cents
|
27
|
+
# @return [Integer] The total charge amount in cents for the service line.
|
28
|
+
attr_reader :charge_amount_cents
|
29
|
+
# @return [CandidApiClient::PatientAr::V1::Types::InsuranceAdjustmentInfo]
|
30
|
+
attr_reader :insurance_adjustments
|
31
|
+
# @return [CandidApiClient::PatientAr::V1::Types::InsurancePaymentInfo]
|
32
|
+
attr_reader :insurance_payments
|
33
|
+
# @return [CandidApiClient::PatientAr::V1::Types::NonInsuranceAdjustmentInfo]
|
34
|
+
attr_reader :non_insurance_adjustments
|
35
|
+
# @return [CandidApiClient::PatientAr::V1::Types::NonInsurancePaymentInfo]
|
36
|
+
attr_reader :non_insurance_payments
|
37
|
+
# @return [CandidApiClient::PatientAr::V1::Types::PatientAdjustmentInfo]
|
38
|
+
attr_reader :patient_adjustments
|
39
|
+
# @return [CandidApiClient::PatientAr::V1::Types::PatientPaymentInfo]
|
40
|
+
attr_reader :patient_payments
|
41
|
+
# @return [Integer] The copay amount in cents for the service line.
|
42
|
+
attr_reader :copay_cents
|
43
|
+
# @return [Integer] The coinsurance amount in cents for the service line.
|
44
|
+
attr_reader :coinsurance_cents
|
45
|
+
# @return [Integer] The deductible amount in cents for the service line.
|
46
|
+
attr_reader :deductible_cents
|
47
|
+
# @return [OpenStruct] Additional properties unmapped to the current class definition
|
48
|
+
attr_reader :additional_properties
|
49
|
+
# @return [Object]
|
50
|
+
attr_reader :_field_set
|
51
|
+
protected :_field_set
|
52
|
+
|
53
|
+
OMIT = Object.new
|
54
|
+
|
55
|
+
# @param service_line_id [String] The ID of the service line.
|
56
|
+
# @param procedure_code [String] The procedure code (CPT/HCPCS) associated with the service line.
|
57
|
+
# @param date_of_service [Date] The date of service for the service line.
|
58
|
+
# @param patient_balance_cents [Integer] The total patient balance in cents for the service line. Negative values
|
59
|
+
# indicate a credit balance.
|
60
|
+
# @param charge_amount_cents [Integer] The total charge amount in cents for the service line.
|
61
|
+
# @param insurance_adjustments [CandidApiClient::PatientAr::V1::Types::InsuranceAdjustmentInfo]
|
62
|
+
# @param insurance_payments [CandidApiClient::PatientAr::V1::Types::InsurancePaymentInfo]
|
63
|
+
# @param non_insurance_adjustments [CandidApiClient::PatientAr::V1::Types::NonInsuranceAdjustmentInfo]
|
64
|
+
# @param non_insurance_payments [CandidApiClient::PatientAr::V1::Types::NonInsurancePaymentInfo]
|
65
|
+
# @param patient_adjustments [CandidApiClient::PatientAr::V1::Types::PatientAdjustmentInfo]
|
66
|
+
# @param patient_payments [CandidApiClient::PatientAr::V1::Types::PatientPaymentInfo]
|
67
|
+
# @param copay_cents [Integer] The copay amount in cents for the service line.
|
68
|
+
# @param coinsurance_cents [Integer] The coinsurance amount in cents for the service line.
|
69
|
+
# @param deductible_cents [Integer] The deductible amount in cents for the service line.
|
70
|
+
# @param additional_properties [OpenStruct] Additional properties unmapped to the current class definition
|
71
|
+
# @return [CandidApiClient::PatientAr::V1::Types::ServiceLineItemization]
|
72
|
+
def initialize(service_line_id:, procedure_code:, date_of_service:, patient_balance_cents:,
|
73
|
+
charge_amount_cents:, insurance_adjustments:, insurance_payments:, non_insurance_adjustments:, non_insurance_payments:, patient_adjustments:, patient_payments:, copay_cents:, coinsurance_cents:, deductible_cents:, additional_properties: nil)
|
74
|
+
@service_line_id = service_line_id
|
75
|
+
@procedure_code = procedure_code
|
76
|
+
@date_of_service = date_of_service
|
77
|
+
@patient_balance_cents = patient_balance_cents
|
78
|
+
@charge_amount_cents = charge_amount_cents
|
79
|
+
@insurance_adjustments = insurance_adjustments
|
80
|
+
@insurance_payments = insurance_payments
|
81
|
+
@non_insurance_adjustments = non_insurance_adjustments
|
82
|
+
@non_insurance_payments = non_insurance_payments
|
83
|
+
@patient_adjustments = patient_adjustments
|
84
|
+
@patient_payments = patient_payments
|
85
|
+
@copay_cents = copay_cents
|
86
|
+
@coinsurance_cents = coinsurance_cents
|
87
|
+
@deductible_cents = deductible_cents
|
88
|
+
@additional_properties = additional_properties
|
89
|
+
@_field_set = {
|
90
|
+
"service_line_id": service_line_id,
|
91
|
+
"procedure_code": procedure_code,
|
92
|
+
"date_of_service": date_of_service,
|
93
|
+
"patient_balance_cents": patient_balance_cents,
|
94
|
+
"charge_amount_cents": charge_amount_cents,
|
95
|
+
"insurance_adjustments": insurance_adjustments,
|
96
|
+
"insurance_payments": insurance_payments,
|
97
|
+
"non_insurance_adjustments": non_insurance_adjustments,
|
98
|
+
"non_insurance_payments": non_insurance_payments,
|
99
|
+
"patient_adjustments": patient_adjustments,
|
100
|
+
"patient_payments": patient_payments,
|
101
|
+
"copay_cents": copay_cents,
|
102
|
+
"coinsurance_cents": coinsurance_cents,
|
103
|
+
"deductible_cents": deductible_cents
|
104
|
+
}
|
105
|
+
end
|
106
|
+
|
107
|
+
# Deserialize a JSON object to an instance of ServiceLineItemization
|
108
|
+
#
|
109
|
+
# @param json_object [String]
|
110
|
+
# @return [CandidApiClient::PatientAr::V1::Types::ServiceLineItemization]
|
111
|
+
def self.from_json(json_object:)
|
112
|
+
struct = JSON.parse(json_object, object_class: OpenStruct)
|
113
|
+
parsed_json = JSON.parse(json_object)
|
114
|
+
service_line_id = struct["service_line_id"]
|
115
|
+
procedure_code = struct["procedure_code"]
|
116
|
+
date_of_service = (Date.parse(parsed_json["date_of_service"]) unless parsed_json["date_of_service"].nil?)
|
117
|
+
patient_balance_cents = struct["patient_balance_cents"]
|
118
|
+
charge_amount_cents = struct["charge_amount_cents"]
|
119
|
+
if parsed_json["insurance_adjustments"].nil?
|
120
|
+
insurance_adjustments = nil
|
121
|
+
else
|
122
|
+
insurance_adjustments = parsed_json["insurance_adjustments"].to_json
|
123
|
+
insurance_adjustments = CandidApiClient::PatientAr::V1::Types::InsuranceAdjustmentInfo.from_json(json_object: insurance_adjustments)
|
124
|
+
end
|
125
|
+
if parsed_json["insurance_payments"].nil?
|
126
|
+
insurance_payments = nil
|
127
|
+
else
|
128
|
+
insurance_payments = parsed_json["insurance_payments"].to_json
|
129
|
+
insurance_payments = CandidApiClient::PatientAr::V1::Types::InsurancePaymentInfo.from_json(json_object: insurance_payments)
|
130
|
+
end
|
131
|
+
if parsed_json["non_insurance_adjustments"].nil?
|
132
|
+
non_insurance_adjustments = nil
|
133
|
+
else
|
134
|
+
non_insurance_adjustments = parsed_json["non_insurance_adjustments"].to_json
|
135
|
+
non_insurance_adjustments = CandidApiClient::PatientAr::V1::Types::NonInsuranceAdjustmentInfo.from_json(json_object: non_insurance_adjustments)
|
136
|
+
end
|
137
|
+
if parsed_json["non_insurance_payments"].nil?
|
138
|
+
non_insurance_payments = nil
|
139
|
+
else
|
140
|
+
non_insurance_payments = parsed_json["non_insurance_payments"].to_json
|
141
|
+
non_insurance_payments = CandidApiClient::PatientAr::V1::Types::NonInsurancePaymentInfo.from_json(json_object: non_insurance_payments)
|
142
|
+
end
|
143
|
+
if parsed_json["patient_adjustments"].nil?
|
144
|
+
patient_adjustments = nil
|
145
|
+
else
|
146
|
+
patient_adjustments = parsed_json["patient_adjustments"].to_json
|
147
|
+
patient_adjustments = CandidApiClient::PatientAr::V1::Types::PatientAdjustmentInfo.from_json(json_object: patient_adjustments)
|
148
|
+
end
|
149
|
+
if parsed_json["patient_payments"].nil?
|
150
|
+
patient_payments = nil
|
151
|
+
else
|
152
|
+
patient_payments = parsed_json["patient_payments"].to_json
|
153
|
+
patient_payments = CandidApiClient::PatientAr::V1::Types::PatientPaymentInfo.from_json(json_object: patient_payments)
|
154
|
+
end
|
155
|
+
copay_cents = struct["copay_cents"]
|
156
|
+
coinsurance_cents = struct["coinsurance_cents"]
|
157
|
+
deductible_cents = struct["deductible_cents"]
|
158
|
+
new(
|
159
|
+
service_line_id: service_line_id,
|
160
|
+
procedure_code: procedure_code,
|
161
|
+
date_of_service: date_of_service,
|
162
|
+
patient_balance_cents: patient_balance_cents,
|
163
|
+
charge_amount_cents: charge_amount_cents,
|
164
|
+
insurance_adjustments: insurance_adjustments,
|
165
|
+
insurance_payments: insurance_payments,
|
166
|
+
non_insurance_adjustments: non_insurance_adjustments,
|
167
|
+
non_insurance_payments: non_insurance_payments,
|
168
|
+
patient_adjustments: patient_adjustments,
|
169
|
+
patient_payments: patient_payments,
|
170
|
+
copay_cents: copay_cents,
|
171
|
+
coinsurance_cents: coinsurance_cents,
|
172
|
+
deductible_cents: deductible_cents,
|
173
|
+
additional_properties: struct
|
174
|
+
)
|
175
|
+
end
|
176
|
+
|
177
|
+
# Serialize an instance of ServiceLineItemization to a JSON object
|
178
|
+
#
|
179
|
+
# @return [String]
|
180
|
+
def to_json(*_args)
|
181
|
+
@_field_set&.to_json
|
182
|
+
end
|
183
|
+
|
184
|
+
# Leveraged for Union-type generation, validate_raw attempts to parse the given
|
185
|
+
# hash and check each fields type against the current object's property
|
186
|
+
# definitions.
|
187
|
+
#
|
188
|
+
# @param obj [Object]
|
189
|
+
# @return [Void]
|
190
|
+
def self.validate_raw(obj:)
|
191
|
+
obj.service_line_id.is_a?(String) != false || raise("Passed value for field obj.service_line_id is not the expected type, validation failed.")
|
192
|
+
obj.procedure_code.is_a?(String) != false || raise("Passed value for field obj.procedure_code is not the expected type, validation failed.")
|
193
|
+
obj.date_of_service.is_a?(Date) != false || raise("Passed value for field obj.date_of_service is not the expected type, validation failed.")
|
194
|
+
obj.patient_balance_cents.is_a?(Integer) != false || raise("Passed value for field obj.patient_balance_cents is not the expected type, validation failed.")
|
195
|
+
obj.charge_amount_cents.is_a?(Integer) != false || raise("Passed value for field obj.charge_amount_cents is not the expected type, validation failed.")
|
196
|
+
CandidApiClient::PatientAr::V1::Types::InsuranceAdjustmentInfo.validate_raw(obj: obj.insurance_adjustments)
|
197
|
+
CandidApiClient::PatientAr::V1::Types::InsurancePaymentInfo.validate_raw(obj: obj.insurance_payments)
|
198
|
+
CandidApiClient::PatientAr::V1::Types::NonInsuranceAdjustmentInfo.validate_raw(obj: obj.non_insurance_adjustments)
|
199
|
+
CandidApiClient::PatientAr::V1::Types::NonInsurancePaymentInfo.validate_raw(obj: obj.non_insurance_payments)
|
200
|
+
CandidApiClient::PatientAr::V1::Types::PatientAdjustmentInfo.validate_raw(obj: obj.patient_adjustments)
|
201
|
+
CandidApiClient::PatientAr::V1::Types::PatientPaymentInfo.validate_raw(obj: obj.patient_payments)
|
202
|
+
obj.copay_cents.is_a?(Integer) != false || raise("Passed value for field obj.copay_cents is not the expected type, validation failed.")
|
203
|
+
obj.coinsurance_cents.is_a?(Integer) != false || raise("Passed value for field obj.coinsurance_cents is not the expected type, validation failed.")
|
204
|
+
obj.deductible_cents.is_a?(Integer) != false || raise("Passed value for field obj.deductible_cents is not the expected type, validation failed.")
|
205
|
+
end
|
206
|
+
end
|
207
|
+
end
|
208
|
+
end
|
209
|
+
end
|
210
|
+
end
|