candidhealth 1.6.0 → 1.8.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.
Files changed (151) hide show
  1. checksums.yaml +4 -4
  2. data/lib/candidhealth/auth/default/client.rb +74 -0
  3. data/lib/candidhealth/charge_capture/v_1/client.rb +48 -48
  4. data/lib/candidhealth/charge_capture/v_1/types/charge_capture_data.rb +70 -56
  5. data/lib/candidhealth/commons/types/clearinghouse.rb +18 -0
  6. data/lib/candidhealth/commons/types/procedure_modifier.rb +11 -0
  7. data/lib/candidhealth/credentialing/v_2/client.rb +342 -8
  8. data/lib/candidhealth/credentialing/v_2/types/base_credentialing_span.rb +143 -0
  9. data/lib/candidhealth/credentialing/v_2/types/facility_credentialing_span.rb +165 -0
  10. data/lib/candidhealth/credentialing/v_2/types/facility_credentialing_span_page.rb +88 -0
  11. data/lib/candidhealth/credentialing/v_2/types/provider_credentialing_span.rb +34 -34
  12. data/lib/candidhealth/encounter_providers/v_2/types/billing_provider.rb +1 -1
  13. data/lib/candidhealth/encounter_providers/v_2/types/billing_provider_update.rb +1 -1
  14. data/lib/candidhealth/encounter_providers/v_2/types/billing_provider_update_with_optional_address.rb +1 -1
  15. data/lib/candidhealth/encounters/v_4/client.rb +3253 -2040
  16. data/lib/candidhealth/encounters/v_4/types/encounter.rb +111 -86
  17. data/lib/candidhealth/encounters/v_4/types/encounter_base.rb +39 -33
  18. data/lib/candidhealth/encounters/v_4/types/encounter_create.rb +796 -0
  19. data/lib/candidhealth/encounters/v_4/types/encounter_create_from_pre_encounter.rb +131 -117
  20. data/lib/candidhealth/encounters/v_4/types/encounter_deep_optional.rb +70 -56
  21. data/lib/candidhealth/encounters/v_4/types/encounter_optional.rb +29 -39
  22. data/lib/candidhealth/encounters/v_4/types/encounter_rendering_or_attending_provider_required_error.rb +55 -0
  23. data/lib/candidhealth/encounters/v_4/types/encounter_update.rb +736 -0
  24. data/lib/candidhealth/encounters_universal/types/universal_encounter_create.rb +944 -0
  25. data/lib/candidhealth/encounters_universal/types/universal_encounter_create_base.rb +691 -0
  26. data/lib/candidhealth/encounters_universal/types/universal_encounter_create_from_pre_encounter.rb +791 -0
  27. data/lib/candidhealth/encounters_universal/types/universal_encounter_create_from_pre_encounter_base.rb +572 -0
  28. data/lib/candidhealth/encounters_universal/types/universal_encounter_update.rb +872 -0
  29. data/lib/candidhealth/encounters_universal/types/universal_encounter_update_base.rb +700 -0
  30. data/lib/candidhealth/fee_schedules/v_3/client.rb +57 -0
  31. data/lib/candidhealth/fee_schedules/v_3/types/validation_error.rb +12 -0
  32. data/lib/candidhealth/financials/types/patient_transaction_source.rb +1 -0
  33. data/lib/candidhealth/health_care_code_information/client.rb +30 -0
  34. data/lib/candidhealth/health_care_code_information/v_1/client.rb +268 -0
  35. data/lib/candidhealth/health_care_code_information/v_1/types/admitting_diagnosis.rb +236 -0
  36. data/lib/candidhealth/health_care_code_information/v_1/types/admitting_diagnosis_code_qualifier.rb +14 -0
  37. data/lib/candidhealth/health_care_code_information/v_1/types/admitting_diagnosis_new.rb +206 -0
  38. data/lib/candidhealth/health_care_code_information/v_1/types/code_list_qualifier_code.rb +1068 -0
  39. data/lib/candidhealth/health_care_code_information/v_1/types/condition_code.rb +71 -0
  40. data/lib/candidhealth/health_care_code_information/v_1/types/condition_information.rb +237 -0
  41. data/lib/candidhealth/health_care_code_information/v_1/types/condition_information_code_qualifier.rb +13 -0
  42. data/lib/candidhealth/health_care_code_information/v_1/types/condition_information_new.rb +207 -0
  43. data/lib/candidhealth/health_care_code_information/v_1/types/date_time_period_format_qualifier.rb +54 -0
  44. data/lib/candidhealth/health_care_code_information/v_1/types/diagnosis_related_group.rb +236 -0
  45. data/lib/candidhealth/health_care_code_information/v_1/types/diagnosis_related_group_code_qualifier.rb +13 -0
  46. data/lib/candidhealth/health_care_code_information/v_1/types/diagnosis_related_group_new.rb +206 -0
  47. data/lib/candidhealth/health_care_code_information/v_1/types/external_cause_of_injury.rb +245 -0
  48. data/lib/candidhealth/health_care_code_information/v_1/types/external_cause_of_injury_code_qualifier.rb +14 -0
  49. data/lib/candidhealth/health_care_code_information/v_1/types/external_cause_of_injury_new.rb +245 -0
  50. data/lib/candidhealth/health_care_code_information/v_1/types/health_care_code_information.rb +218 -0
  51. data/lib/candidhealth/health_care_code_information/v_1/types/health_care_code_information_create.rb +225 -0
  52. data/lib/candidhealth/health_care_code_information/v_1/types/health_care_code_information_get_all_response.rb +227 -0
  53. data/lib/candidhealth/health_care_code_information/v_1/types/health_care_code_information_new.rb +188 -0
  54. data/lib/candidhealth/health_care_code_information/v_1/types/health_care_code_information_update.rb +225 -0
  55. data/lib/candidhealth/health_care_code_information/v_1/types/occurrence_code.rb +71 -0
  56. data/lib/candidhealth/health_care_code_information/v_1/types/occurrence_information.rb +249 -0
  57. data/lib/candidhealth/health_care_code_information/v_1/types/occurrence_information_code_qualifier.rb +13 -0
  58. data/lib/candidhealth/health_care_code_information/v_1/types/occurrence_information_new.rb +219 -0
  59. data/lib/candidhealth/health_care_code_information/v_1/types/occurrence_span_code.rb +25 -0
  60. data/lib/candidhealth/health_care_code_information/v_1/types/occurrence_span_code_qualifier.rb +13 -0
  61. data/lib/candidhealth/health_care_code_information/v_1/types/occurrence_span_information.rb +252 -0
  62. data/lib/candidhealth/health_care_code_information/v_1/types/occurrence_span_information_new.rb +222 -0
  63. data/lib/candidhealth/health_care_code_information/v_1/types/other_diagnosis_information.rb +245 -0
  64. data/lib/candidhealth/health_care_code_information/v_1/types/other_diagnosis_information_code_qualifier.rb +14 -0
  65. data/lib/candidhealth/health_care_code_information/v_1/types/other_diagnosis_information_new.rb +215 -0
  66. data/lib/candidhealth/health_care_code_information/v_1/types/other_procedure_information.rb +248 -0
  67. data/lib/candidhealth/health_care_code_information/v_1/types/other_procedure_information_code_qualifier.rb +14 -0
  68. data/lib/candidhealth/health_care_code_information/v_1/types/other_procedure_information_new.rb +218 -0
  69. data/lib/candidhealth/health_care_code_information/v_1/types/patient_reason_for_visit.rb +236 -0
  70. data/lib/candidhealth/health_care_code_information/v_1/types/patient_reason_for_visit_code_qualifier.rb +14 -0
  71. data/lib/candidhealth/health_care_code_information/v_1/types/patient_reason_for_visit_new.rb +206 -0
  72. data/lib/candidhealth/health_care_code_information/v_1/types/present_on_admission_indicator_code.rb +17 -0
  73. data/lib/candidhealth/health_care_code_information/v_1/types/principal_diagnosis.rb +245 -0
  74. data/lib/candidhealth/health_care_code_information/v_1/types/principal_diagnosis_code_qualifier.rb +14 -0
  75. data/lib/candidhealth/health_care_code_information/v_1/types/principal_diagnosis_new.rb +215 -0
  76. data/lib/candidhealth/health_care_code_information/v_1/types/principal_procedure_information.rb +246 -0
  77. data/lib/candidhealth/health_care_code_information/v_1/types/principal_procedure_information_code_qualifier.rb +15 -0
  78. data/lib/candidhealth/health_care_code_information/v_1/types/principal_procedure_information_new.rb +216 -0
  79. data/lib/candidhealth/health_care_code_information/v_1/types/rd_8_date.rb +72 -0
  80. data/lib/candidhealth/health_care_code_information/v_1/types/set_or_clear_admitting_diagnosis.rb +69 -0
  81. data/lib/candidhealth/health_care_code_information/v_1/types/set_or_clear_diagnosis_related_group.rb +69 -0
  82. data/lib/candidhealth/health_care_code_information/v_1/types/set_or_clear_principal_diagnosis.rb +69 -0
  83. data/lib/candidhealth/health_care_code_information/v_1/types/set_or_clear_principal_procedure_information.rb +71 -0
  84. data/lib/candidhealth/health_care_code_information/v_1/types/treatment_code_information.rb +236 -0
  85. data/lib/candidhealth/health_care_code_information/v_1/types/treatment_code_information_new.rb +206 -0
  86. data/lib/candidhealth/health_care_code_information/v_1/types/treatment_code_qualifier.rb +13 -0
  87. data/lib/candidhealth/health_care_code_information/v_1/types/value_code.rb +119 -0
  88. data/lib/candidhealth/health_care_code_information/v_1/types/value_code_qualifier.rb +13 -0
  89. data/lib/candidhealth/health_care_code_information/v_1/types/value_information.rb +245 -0
  90. data/lib/candidhealth/health_care_code_information/v_1/types/value_information_new.rb +215 -0
  91. data/lib/candidhealth/individual/types/patient.rb +6 -6
  92. data/lib/candidhealth/individual/types/patient_base.rb +6 -6
  93. data/lib/candidhealth/individual/types/patient_create.rb +6 -6
  94. data/lib/candidhealth/individual/types/patient_update.rb +6 -6
  95. data/lib/candidhealth/individual/types/patient_update_with_optional_address.rb +6 -6
  96. data/lib/candidhealth/organization_providers/v_2/types/license_type.rb +2 -0
  97. data/lib/candidhealth/patient_ar/client.rb +30 -0
  98. data/lib/candidhealth/patient_ar/v_1/client.rb +161 -0
  99. data/lib/candidhealth/patient_ar/v_1/types/insurance_adjustment_info.rb +60 -0
  100. data/lib/candidhealth/patient_ar/v_1/types/insurance_payment_info.rb +60 -0
  101. data/lib/candidhealth/patient_ar/v_1/types/invalid_filters_error_type.rb +60 -0
  102. data/lib/candidhealth/patient_ar/v_1/types/inventory_record.rb +101 -0
  103. data/lib/candidhealth/patient_ar/v_1/types/invoice_itemization_response.rb +103 -0
  104. data/lib/candidhealth/patient_ar/v_1/types/list_inventory_paged_response.rb +77 -0
  105. data/lib/candidhealth/patient_ar/v_1/types/non_insurance_adjustment_info.rb +60 -0
  106. data/lib/candidhealth/patient_ar/v_1/types/non_insurance_payment_info.rb +60 -0
  107. data/lib/candidhealth/patient_ar/v_1/types/patient_adjustment_info.rb +60 -0
  108. data/lib/candidhealth/patient_ar/v_1/types/patient_ar_status.rb +14 -0
  109. data/lib/candidhealth/patient_ar/v_1/types/patient_payment_allocation.rb +76 -0
  110. data/lib/candidhealth/patient_ar/v_1/types/patient_payment_info.rb +75 -0
  111. data/lib/candidhealth/patient_ar/v_1/types/service_line_itemization.rb +210 -0
  112. data/lib/candidhealth/payers/client.rb +7 -0
  113. data/lib/candidhealth/payers/v_4/client.rb +137 -0
  114. data/lib/candidhealth/payers/v_4/types/clearinghouse_payer_info.rb +93 -0
  115. data/lib/candidhealth/payers/v_4/types/payer.rb +116 -0
  116. data/lib/candidhealth/payers/v_4/types/payer_ids.rb +107 -0
  117. data/lib/candidhealth/payers/v_4/types/payer_page.rb +88 -0
  118. data/lib/candidhealth/payers/v_4/types/support_state.rb +15 -0
  119. data/lib/candidhealth/pre_encounter/coverages/v_1/client.rb +4 -4
  120. data/lib/candidhealth/pre_encounter/coverages/v_1/types/subscriber.rb +3 -3
  121. data/lib/candidhealth/pre_encounter/patients/v_1/client.rb +204 -6
  122. data/lib/candidhealth/pre_encounter/patients/v_1/types/guarantor.rb +3 -3
  123. data/lib/candidhealth/pre_encounter/patients/v_1/types/inferred_patient_metadata.rb +80 -0
  124. data/lib/candidhealth/pre_encounter/patients/v_1/types/mutable_patient.rb +33 -5
  125. data/lib/candidhealth/pre_encounter/patients/v_1/types/mutable_patient_with_mrn.rb +33 -5
  126. data/lib/candidhealth/pre_encounter/patients/v_1/types/origination_detail.rb +104 -0
  127. data/lib/candidhealth/pre_encounter/patients/v_1/types/patient.rb +32 -4
  128. data/lib/candidhealth/pre_encounter/patients/v_1/types/referral_source.rb +18 -0
  129. data/lib/candidhealth/pre_encounter/patients/v_1/types/referral_type.rb +17 -0
  130. data/lib/candidhealth/pre_encounter/patients/v_1/types/specialization_category.rb +42 -0
  131. data/lib/candidhealth/service_lines/v_2/client.rb +252 -10
  132. data/lib/candidhealth/service_lines/v_2/types/service_line.rb +28 -10
  133. data/lib/candidhealth/service_lines/v_2/types/service_line_create.rb +52 -40
  134. data/lib/candidhealth/service_lines/v_2/types/service_line_create_base.rb +251 -0
  135. data/lib/candidhealth/service_lines/v_2/types/service_line_create_base_base.rb +243 -0
  136. data/lib/candidhealth/service_lines/v_2/types/service_line_create_optional.rb +48 -24
  137. data/lib/candidhealth/service_lines/v_2/types/service_line_create_standalone.rb +58 -46
  138. data/lib/candidhealth/service_lines/v_2/types/service_line_create_standalone_base.rb +273 -0
  139. data/lib/candidhealth/service_lines/v_2/types/service_line_create_standalone_base_base.rb +265 -0
  140. data/lib/candidhealth/service_lines/v_2/types/service_line_update.rb +64 -54
  141. data/lib/candidhealth/service_lines/v_2/types/service_line_update_base.rb +263 -0
  142. data/lib/candidhealth/service_lines/v_2/types/universal_service_line_create.rb +271 -0
  143. data/lib/candidhealth/service_lines/v_2/types/universal_service_line_create_standalone.rb +317 -0
  144. data/lib/candidhealth/service_lines/v_2/types/universal_service_line_update.rb +307 -0
  145. data/lib/candidhealth/x_12/v_1/types/type_of_bill_composite.rb +2 -2
  146. data/lib/candidhealth/x_12/v_1/types/type_of_bill_composite_base.rb +90 -0
  147. data/lib/candidhealth/x_12/v_1/types/type_of_bill_composite_update.rb +112 -0
  148. data/lib/candidhealth.rb +21 -7
  149. data/lib/requests.rb +2 -2
  150. data/lib/types_export.rb +116 -13
  151. metadata +109 -2
@@ -0,0 +1,103 @@
1
+ # frozen_string_literal: true
2
+
3
+ require_relative "patient_payment_info"
4
+ require_relative "service_line_itemization"
5
+ require "ostruct"
6
+ require "json"
7
+
8
+ module CandidApiClient
9
+ module PatientAr
10
+ module V1
11
+ module Types
12
+ class InvoiceItemizationResponse
13
+ # @return [String] The ID of the claim associated with the invoice itemization.
14
+ attr_reader :claim_id
15
+ # @return [Integer] The total patient balance in cents for the claim. Negative values indicate a
16
+ # credit balance.
17
+ attr_reader :patient_balance_cents
18
+ # @return [CandidApiClient::PatientAr::V1::Types::PatientPaymentInfo]
19
+ attr_reader :claim_level_patient_payments
20
+ # @return [Array<CandidApiClient::PatientAr::V1::Types::ServiceLineItemization>] A list of service line itemizations for the claim.
21
+ attr_reader :service_line_itemization
22
+ # @return [OpenStruct] Additional properties unmapped to the current class definition
23
+ attr_reader :additional_properties
24
+ # @return [Object]
25
+ attr_reader :_field_set
26
+ protected :_field_set
27
+
28
+ OMIT = Object.new
29
+
30
+ # @param claim_id [String] The ID of the claim associated with the invoice itemization.
31
+ # @param patient_balance_cents [Integer] The total patient balance in cents for the claim. Negative values indicate a
32
+ # credit balance.
33
+ # @param claim_level_patient_payments [CandidApiClient::PatientAr::V1::Types::PatientPaymentInfo]
34
+ # @param service_line_itemization [Array<CandidApiClient::PatientAr::V1::Types::ServiceLineItemization>] A list of service line itemizations for the claim.
35
+ # @param additional_properties [OpenStruct] Additional properties unmapped to the current class definition
36
+ # @return [CandidApiClient::PatientAr::V1::Types::InvoiceItemizationResponse]
37
+ def initialize(claim_id:, patient_balance_cents:, claim_level_patient_payments:, service_line_itemization:,
38
+ additional_properties: nil)
39
+ @claim_id = claim_id
40
+ @patient_balance_cents = patient_balance_cents
41
+ @claim_level_patient_payments = claim_level_patient_payments
42
+ @service_line_itemization = service_line_itemization
43
+ @additional_properties = additional_properties
44
+ @_field_set = {
45
+ "claim_id": claim_id,
46
+ "patient_balance_cents": patient_balance_cents,
47
+ "claim_level_patient_payments": claim_level_patient_payments,
48
+ "service_line_itemization": service_line_itemization
49
+ }
50
+ end
51
+
52
+ # Deserialize a JSON object to an instance of InvoiceItemizationResponse
53
+ #
54
+ # @param json_object [String]
55
+ # @return [CandidApiClient::PatientAr::V1::Types::InvoiceItemizationResponse]
56
+ def self.from_json(json_object:)
57
+ struct = JSON.parse(json_object, object_class: OpenStruct)
58
+ parsed_json = JSON.parse(json_object)
59
+ claim_id = struct["claim_id"]
60
+ patient_balance_cents = struct["patient_balance_cents"]
61
+ if parsed_json["claim_level_patient_payments"].nil?
62
+ claim_level_patient_payments = nil
63
+ else
64
+ claim_level_patient_payments = parsed_json["claim_level_patient_payments"].to_json
65
+ claim_level_patient_payments = CandidApiClient::PatientAr::V1::Types::PatientPaymentInfo.from_json(json_object: claim_level_patient_payments)
66
+ end
67
+ service_line_itemization = parsed_json["service_line_itemization"]&.map do |item|
68
+ item = item.to_json
69
+ CandidApiClient::PatientAr::V1::Types::ServiceLineItemization.from_json(json_object: item)
70
+ end
71
+ new(
72
+ claim_id: claim_id,
73
+ patient_balance_cents: patient_balance_cents,
74
+ claim_level_patient_payments: claim_level_patient_payments,
75
+ service_line_itemization: service_line_itemization,
76
+ additional_properties: struct
77
+ )
78
+ end
79
+
80
+ # Serialize an instance of InvoiceItemizationResponse to a JSON object
81
+ #
82
+ # @return [String]
83
+ def to_json(*_args)
84
+ @_field_set&.to_json
85
+ end
86
+
87
+ # Leveraged for Union-type generation, validate_raw attempts to parse the given
88
+ # hash and check each fields type against the current object's property
89
+ # definitions.
90
+ #
91
+ # @param obj [Object]
92
+ # @return [Void]
93
+ def self.validate_raw(obj:)
94
+ obj.claim_id.is_a?(String) != false || raise("Passed value for field obj.claim_id is not the expected type, validation failed.")
95
+ obj.patient_balance_cents.is_a?(Integer) != false || raise("Passed value for field obj.patient_balance_cents is not the expected type, validation failed.")
96
+ CandidApiClient::PatientAr::V1::Types::PatientPaymentInfo.validate_raw(obj: obj.claim_level_patient_payments)
97
+ obj.service_line_itemization.is_a?(Array) != false || raise("Passed value for field obj.service_line_itemization is not the expected type, validation failed.")
98
+ end
99
+ end
100
+ end
101
+ end
102
+ end
103
+ end
@@ -0,0 +1,77 @@
1
+ # frozen_string_literal: true
2
+
3
+ require_relative "inventory_record"
4
+ require "ostruct"
5
+ require "json"
6
+
7
+ module CandidApiClient
8
+ module PatientAr
9
+ module V1
10
+ module Types
11
+ class ListInventoryPagedResponse
12
+ # @return [Array<CandidApiClient::PatientAr::V1::Types::InventoryRecord>] List of inventory records matching the filters
13
+ attr_reader :records
14
+ # @return [String] Token for the next page of results, if available
15
+ attr_reader :next_page_token
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 records [Array<CandidApiClient::PatientAr::V1::Types::InventoryRecord>] List of inventory records matching the filters
25
+ # @param next_page_token [String] Token for the next page of results, if available
26
+ # @param additional_properties [OpenStruct] Additional properties unmapped to the current class definition
27
+ # @return [CandidApiClient::PatientAr::V1::Types::ListInventoryPagedResponse]
28
+ def initialize(records:, next_page_token: OMIT, additional_properties: nil)
29
+ @records = records
30
+ @next_page_token = next_page_token if next_page_token != OMIT
31
+ @additional_properties = additional_properties
32
+ @_field_set = { "records": records, "next_page_token": next_page_token }.reject do |_k, v|
33
+ v == OMIT
34
+ end
35
+ end
36
+
37
+ # Deserialize a JSON object to an instance of ListInventoryPagedResponse
38
+ #
39
+ # @param json_object [String]
40
+ # @return [CandidApiClient::PatientAr::V1::Types::ListInventoryPagedResponse]
41
+ def self.from_json(json_object:)
42
+ struct = JSON.parse(json_object, object_class: OpenStruct)
43
+ parsed_json = JSON.parse(json_object)
44
+ records = parsed_json["records"]&.map do |item|
45
+ item = item.to_json
46
+ CandidApiClient::PatientAr::V1::Types::InventoryRecord.from_json(json_object: item)
47
+ end
48
+ next_page_token = struct["next_page_token"]
49
+ new(
50
+ records: records,
51
+ next_page_token: next_page_token,
52
+ additional_properties: struct
53
+ )
54
+ end
55
+
56
+ # Serialize an instance of ListInventoryPagedResponse to a JSON object
57
+ #
58
+ # @return [String]
59
+ def to_json(*_args)
60
+ @_field_set&.to_json
61
+ end
62
+
63
+ # Leveraged for Union-type generation, validate_raw attempts to parse the given
64
+ # hash and check each fields type against the current object's property
65
+ # definitions.
66
+ #
67
+ # @param obj [Object]
68
+ # @return [Void]
69
+ def self.validate_raw(obj:)
70
+ obj.records.is_a?(Array) != false || raise("Passed value for field obj.records is not the expected type, validation failed.")
71
+ obj.next_page_token&.is_a?(String) != false || raise("Passed value for field obj.next_page_token is not the expected type, validation failed.")
72
+ end
73
+ end
74
+ end
75
+ end
76
+ end
77
+ 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 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,14 @@
1
+ # frozen_string_literal: true
2
+
3
+ module CandidApiClient
4
+ module PatientAr
5
+ module V1
6
+ module Types
7
+ class PatientArStatus
8
+ INVOICEABLE = "invoiceable"
9
+ NON_INVOICEABLE = "non_invoiceable"
10
+ end
11
+ end
12
+ end
13
+ end
14
+ 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