candidhealth 0.46.1 → 1.3.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 (77) hide show
  1. checksums.yaml +4 -4
  2. data/lib/candidhealth/auth/client.rb +7 -7
  3. data/lib/candidhealth/auth/{v_2 → default}/client.rb +39 -13
  4. data/lib/candidhealth/auth/{v_2 → default}/types/auth_get_token_response.rb +3 -3
  5. data/lib/candidhealth/auth/default/types/invalid_content_type_error_type.rb +60 -0
  6. data/lib/candidhealth/auth/{v_2 → default}/types/too_many_requests_error_type.rb +3 -3
  7. data/lib/candidhealth/billing_notes/v_2/types/billing_note_base_optional.rb +62 -0
  8. data/lib/candidhealth/charge_capture/v_1/client.rb +504 -524
  9. data/lib/candidhealth/charge_capture/v_1/types/charge_capture.rb +17 -1
  10. data/lib/candidhealth/charge_capture/v_1/types/charge_capture_data.rb +173 -173
  11. data/lib/candidhealth/charge_capture/v_1/types/charge_capture_error.rb +26 -2
  12. data/lib/candidhealth/charge_capture_bundles/v_1/client.rb +58 -0
  13. data/lib/candidhealth/claim_submission/v_1/types/claim_submission_record_create_optional.rb +100 -0
  14. data/lib/candidhealth/claim_submission/v_1/types/external_claim_submission_create_optional.rb +101 -0
  15. data/lib/candidhealth/commons/types/phone_number_optional.rb +71 -0
  16. data/lib/candidhealth/commons/types/procedure_modifier.rb +2 -0
  17. data/lib/candidhealth/commons/types/street_address_long_zip_optional.rb +107 -0
  18. data/lib/candidhealth/custom_schemas/v_1/types/schema_instance_optional.rb +78 -0
  19. data/lib/candidhealth/diagnoses/client.rb +23 -4
  20. data/lib/candidhealth/diagnoses/types/diagnosis.rb +21 -2
  21. data/lib/candidhealth/diagnoses/types/diagnosis_create.rb +25 -2
  22. data/lib/candidhealth/diagnoses/types/diagnosis_create_optional.rb +126 -0
  23. data/lib/candidhealth/diagnoses/types/standalone_diagnosis_create.rb +22 -2
  24. data/lib/candidhealth/encounter_providers/v_2/types/ordering_provider_optional.rb +123 -0
  25. data/lib/candidhealth/encounters/v_4/client.rb +214 -208
  26. data/lib/candidhealth/encounters/v_4/types/claim_supplemental_information_optional.rb +86 -0
  27. data/lib/candidhealth/encounters/v_4/types/clinical_note_category_create_optional.rb +78 -0
  28. data/lib/candidhealth/encounters/v_4/types/clinical_note_optional.rb +93 -0
  29. data/lib/candidhealth/encounters/v_4/types/encounter.rb +16 -4
  30. data/lib/candidhealth/encounters/v_4/types/encounter_create_from_pre_encounter.rb +4 -2
  31. data/lib/candidhealth/encounters/v_4/types/encounter_deep_optional.rb +780 -0
  32. data/lib/candidhealth/encounters/v_4/types/encounter_optional.rb +1 -139
  33. data/lib/candidhealth/encounters/v_4/types/epsdt_referral_optional.rb +85 -0
  34. data/lib/candidhealth/encounters/v_4/types/intake_question_optional.rb +84 -0
  35. data/lib/candidhealth/encounters/v_4/types/intervention_optional.rb +114 -0
  36. data/lib/candidhealth/encounters/v_4/types/lab_optional.rb +80 -0
  37. data/lib/candidhealth/encounters/v_4/types/medication_optional.rb +108 -0
  38. data/lib/candidhealth/encounters/v_4/types/patient_history_category_optional.rb +78 -0
  39. data/lib/candidhealth/guarantor/v_1/types/guarantor_optional.rb +144 -0
  40. data/lib/candidhealth/individual/types/individual_base_optional.rb +78 -0
  41. data/lib/candidhealth/individual/types/patient_non_insurance_payer_info_create_optional.rb +89 -0
  42. data/lib/candidhealth/individual/types/patient_update_with_optional_address.rb +8 -8
  43. data/lib/candidhealth/individual/types/subscriber_base_optional.rb +118 -0
  44. data/lib/candidhealth/individual/types/subscriber_create_optional.rb +132 -0
  45. data/lib/candidhealth/insurance_adjudications/v_1/client.rb +2 -0
  46. data/lib/candidhealth/insurance_adjudications/v_1/types/insurance_adjudication_create.rb +9 -1
  47. data/lib/candidhealth/insurance_cards/v_2/types/insurance_card_create_optional.rb +167 -0
  48. data/lib/candidhealth/pre_encounter/coverages/v_1/client.rb +13 -13
  49. data/lib/candidhealth/pre_encounter/coverages/v_1/types/coverage.rb +4 -4
  50. data/lib/candidhealth/pre_encounter/coverages/v_1/types/coverage_eligibility_check_response.rb +10 -10
  51. data/lib/candidhealth/pre_encounter/coverages/v_1/types/latest_eligibility_check.rb +4 -4
  52. data/lib/candidhealth/pre_encounter/coverages/v_1/types/mutable_coverage.rb +4 -4
  53. data/lib/candidhealth/pre_encounter/eligibility_checks/v_1/client.rb +140 -0
  54. data/lib/candidhealth/pre_encounter/eligibility_checks/v_1/types/batch_eligibility_response.rb +75 -0
  55. data/lib/candidhealth/pre_encounter/eligibility_checks/v_1/types/eligibility_check.rb +18 -6
  56. data/lib/candidhealth/pre_encounter/eligibility_checks/v_1/types/eligibility_check_error.rb +80 -0
  57. data/lib/candidhealth/pre_encounter/eligibility_checks/v_1/types/eligibility_check_error_details.rb +112 -0
  58. data/lib/candidhealth/pre_encounter/eligibility_checks/v_1/types/eligibility_check_error_source.rb +17 -0
  59. data/lib/candidhealth/pre_encounter/{coverages → eligibility_checks}/v_1/types/eligibility_check_metadata.rb +7 -7
  60. data/lib/candidhealth/pre_encounter/eligibility_checks/v_1/types/eligibility_check_page.rb +98 -0
  61. data/lib/candidhealth/pre_encounter/{coverages → eligibility_checks}/v_1/types/eligibility_check_status.rb +2 -2
  62. data/lib/candidhealth/pre_encounter/eligibility_checks/v_1/types/eligibility_request.rb +18 -2
  63. data/lib/candidhealth/pre_encounter/{coverages → eligibility_checks}/v_1/types/eligibility_status.rb +2 -1
  64. data/lib/candidhealth/pre_encounter/eligibility_checks/v_1/types/parsed_response.rb +4 -4
  65. data/lib/candidhealth/pre_encounter/patients/v_1/types/authorization.rb +13 -1
  66. data/lib/candidhealth/service_lines/v_2/types/denial_reason_content.rb +1 -0
  67. data/lib/candidhealth/service_lines/v_2/types/drug_identification_optional.rb +126 -0
  68. data/lib/candidhealth/service_lines/v_2/types/service_line_create_optional.rb +239 -0
  69. data/lib/candidhealth/service_lines/v_2/types/test_result_optional.rb +73 -0
  70. data/lib/candidhealth/write_offs/v_1/types/insurance_write_off_reason.rb +1 -0
  71. data/lib/candidhealth/write_offs/v_1/types/patient_write_off_reason.rb +1 -0
  72. data/lib/candidhealth/yes_no_indicator/types/yes_no_indicator.rb +14 -0
  73. data/lib/core/oauth.rb +2 -2
  74. data/lib/requests.rb +2 -2
  75. data/lib/types_export.rb +41 -8
  76. metadata +42 -9
  77. data/lib/candidhealth/pre_encounter/coverages/v_1/types/eligibility_check.rb +0 -116
@@ -0,0 +1,239 @@
1
+ # frozen_string_literal: true
2
+
3
+ require_relative "../../../commons/types/procedure_modifier"
4
+ require_relative "../../../commons/types/service_line_units"
5
+ require_relative "drug_identification_optional"
6
+ require_relative "../../../commons/types/facility_type_code"
7
+ require "date"
8
+ require_relative "../../../encounter_providers/v_2/types/ordering_provider_optional"
9
+ require_relative "test_result_optional"
10
+ require "ostruct"
11
+ require "json"
12
+
13
+ module CandidApiClient
14
+ module ServiceLines
15
+ module V2
16
+ module Types
17
+ class ServiceLineCreateOptional
18
+ # @return [Array<CandidApiClient::Commons::Types::ProcedureModifier>]
19
+ attr_reader :modifiers
20
+ # @return [Boolean] Maps to SV1-11 on the 837-P and Box 24H on the CMS-1500.
21
+ # If the value is true, the box will be populated with "Y". Otherwise, the box
22
+ # will not be populated.
23
+ attr_reader :has_epsdt_indicator
24
+ # @return [Boolean] Maps to SV1-12 on the 837-P and Box 24I on the CMS-1500.
25
+ # If the value is true, the box will be populated with "Y". Otherwise, the box
26
+ # will not be populated.
27
+ attr_reader :has_family_planning_indicator
28
+ # @return [String]
29
+ attr_reader :procedure_code
30
+ # @return [String] String representation of a Decimal that can be parsed by most libraries.
31
+ # A ServiceLine quantity cannot contain more than one digit of precision.
32
+ # Example: 1.1 is valid, 1.11 is not.
33
+ attr_reader :quantity
34
+ # @return [CandidApiClient::Commons::Types::ServiceLineUnits]
35
+ attr_reader :units
36
+ # @return [Integer] The total amount charged for this service line taking quantity into account. For
37
+ # example, if a single unit
38
+ # costs 100 cents and 2 units were rendered, the `charge_amount_cents` should be
39
+ # 200. Should be greater than or
40
+ # equal to 0.
41
+ attr_reader :charge_amount_cents
42
+ # @return [Array<Integer>] Indices (zero-indexed) of all the diagnoses this service line references
43
+ attr_reader :diagnosis_pointers
44
+ # @return [CandidApiClient::ServiceLines::V2::Types::DrugIdentificationOptional]
45
+ attr_reader :drug_identification
46
+ # @return [CandidApiClient::Commons::Types::FacilityTypeCode] 837p Loop2300, SV105. If your organization does not intend to submit claims with
47
+ # a different place of service at the service line level, this field should not be
48
+ # populated. 02 for telemedicine, 11 for in-person. Full list
49
+ # //www.cms.gov/Medicare/Coding/place-of-service-codes/Place_of_Service_Code_Set).
50
+ attr_reader :place_of_service_code
51
+ # @return [String] A free-form description to clarify the related data elements and their content.
52
+ # Maps to SV1-01, C003-07 on the 837-P.
53
+ attr_reader :description
54
+ # @return [Date]
55
+ attr_reader :date_of_service
56
+ # @return [Date]
57
+ attr_reader :end_date_of_service
58
+ # @return [CandidApiClient::EncounterProviders::V2::Types::OrderingProviderOptional] Required when the service or supply was ordered by a provider who is different
59
+ # than the rendering provider for this service line.
60
+ # If not required by this implementation guide, do not send.
61
+ attr_reader :ordering_provider
62
+ # @return [Array<CandidApiClient::ServiceLines::V2::Types::TestResultOptional>] Contains a list of test results. Test result types may map to MEA-02 on the
63
+ # 837-P (ex: Hemoglobin, Hematocrit).
64
+ # No more than 5 MEA-02 test results may be submitted per service line.
65
+ attr_reader :test_results
66
+ # @return [OpenStruct] Additional properties unmapped to the current class definition
67
+ attr_reader :additional_properties
68
+ # @return [Object]
69
+ attr_reader :_field_set
70
+ protected :_field_set
71
+
72
+ OMIT = Object.new
73
+
74
+ # @param modifiers [Array<CandidApiClient::Commons::Types::ProcedureModifier>]
75
+ # @param has_epsdt_indicator [Boolean] Maps to SV1-11 on the 837-P and Box 24H on the CMS-1500.
76
+ # If the value is true, the box will be populated with "Y". Otherwise, the box
77
+ # will not be populated.
78
+ # @param has_family_planning_indicator [Boolean] Maps to SV1-12 on the 837-P and Box 24I on the CMS-1500.
79
+ # If the value is true, the box will be populated with "Y". Otherwise, the box
80
+ # will not be populated.
81
+ # @param procedure_code [String]
82
+ # @param quantity [String] String representation of a Decimal that can be parsed by most libraries.
83
+ # A ServiceLine quantity cannot contain more than one digit of precision.
84
+ # Example: 1.1 is valid, 1.11 is not.
85
+ # @param units [CandidApiClient::Commons::Types::ServiceLineUnits]
86
+ # @param charge_amount_cents [Integer] The total amount charged for this service line taking quantity into account. For
87
+ # example, if a single unit
88
+ # costs 100 cents and 2 units were rendered, the `charge_amount_cents` should be
89
+ # 200. Should be greater than or
90
+ # equal to 0.
91
+ # @param diagnosis_pointers [Array<Integer>] Indices (zero-indexed) of all the diagnoses this service line references
92
+ # @param drug_identification [CandidApiClient::ServiceLines::V2::Types::DrugIdentificationOptional]
93
+ # @param place_of_service_code [CandidApiClient::Commons::Types::FacilityTypeCode] 837p Loop2300, SV105. If your organization does not intend to submit claims with
94
+ # a different place of service at the service line level, this field should not be
95
+ # populated. 02 for telemedicine, 11 for in-person. Full list
96
+ # //www.cms.gov/Medicare/Coding/place-of-service-codes/Place_of_Service_Code_Set).
97
+ # @param description [String] A free-form description to clarify the related data elements and their content.
98
+ # Maps to SV1-01, C003-07 on the 837-P.
99
+ # @param date_of_service [Date]
100
+ # @param end_date_of_service [Date]
101
+ # @param ordering_provider [CandidApiClient::EncounterProviders::V2::Types::OrderingProviderOptional] Required when the service or supply was ordered by a provider who is different
102
+ # than the rendering provider for this service line.
103
+ # If not required by this implementation guide, do not send.
104
+ # @param test_results [Array<CandidApiClient::ServiceLines::V2::Types::TestResultOptional>] Contains a list of test results. Test result types may map to MEA-02 on the
105
+ # 837-P (ex: Hemoglobin, Hematocrit).
106
+ # No more than 5 MEA-02 test results may be submitted per service line.
107
+ # @param additional_properties [OpenStruct] Additional properties unmapped to the current class definition
108
+ # @return [CandidApiClient::ServiceLines::V2::Types::ServiceLineCreateOptional]
109
+ def initialize(modifiers: OMIT, has_epsdt_indicator: OMIT, has_family_planning_indicator: OMIT,
110
+ procedure_code: OMIT, quantity: OMIT, units: OMIT, charge_amount_cents: OMIT, diagnosis_pointers: OMIT, drug_identification: OMIT, place_of_service_code: OMIT, description: OMIT, date_of_service: OMIT, end_date_of_service: OMIT, ordering_provider: OMIT, test_results: OMIT, additional_properties: nil)
111
+ @modifiers = modifiers if modifiers != OMIT
112
+ @has_epsdt_indicator = has_epsdt_indicator if has_epsdt_indicator != OMIT
113
+ @has_family_planning_indicator = has_family_planning_indicator if has_family_planning_indicator != OMIT
114
+ @procedure_code = procedure_code if procedure_code != OMIT
115
+ @quantity = quantity if quantity != OMIT
116
+ @units = units if units != OMIT
117
+ @charge_amount_cents = charge_amount_cents if charge_amount_cents != OMIT
118
+ @diagnosis_pointers = diagnosis_pointers if diagnosis_pointers != OMIT
119
+ @drug_identification = drug_identification if drug_identification != OMIT
120
+ @place_of_service_code = place_of_service_code if place_of_service_code != OMIT
121
+ @description = description if description != OMIT
122
+ @date_of_service = date_of_service if date_of_service != OMIT
123
+ @end_date_of_service = end_date_of_service if end_date_of_service != OMIT
124
+ @ordering_provider = ordering_provider if ordering_provider != OMIT
125
+ @test_results = test_results if test_results != OMIT
126
+ @additional_properties = additional_properties
127
+ @_field_set = {
128
+ "modifiers": modifiers,
129
+ "has_epsdt_indicator": has_epsdt_indicator,
130
+ "has_family_planning_indicator": has_family_planning_indicator,
131
+ "procedure_code": procedure_code,
132
+ "quantity": quantity,
133
+ "units": units,
134
+ "charge_amount_cents": charge_amount_cents,
135
+ "diagnosis_pointers": diagnosis_pointers,
136
+ "drug_identification": drug_identification,
137
+ "place_of_service_code": place_of_service_code,
138
+ "description": description,
139
+ "date_of_service": date_of_service,
140
+ "end_date_of_service": end_date_of_service,
141
+ "ordering_provider": ordering_provider,
142
+ "test_results": test_results
143
+ }.reject do |_k, v|
144
+ v == OMIT
145
+ end
146
+ end
147
+
148
+ # Deserialize a JSON object to an instance of ServiceLineCreateOptional
149
+ #
150
+ # @param json_object [String]
151
+ # @return [CandidApiClient::ServiceLines::V2::Types::ServiceLineCreateOptional]
152
+ def self.from_json(json_object:)
153
+ struct = JSON.parse(json_object, object_class: OpenStruct)
154
+ parsed_json = JSON.parse(json_object)
155
+ modifiers = struct["modifiers"]
156
+ has_epsdt_indicator = struct["has_epsdt_indicator"]
157
+ has_family_planning_indicator = struct["has_family_planning_indicator"]
158
+ procedure_code = struct["procedure_code"]
159
+ quantity = struct["quantity"]
160
+ units = struct["units"]
161
+ charge_amount_cents = struct["charge_amount_cents"]
162
+ diagnosis_pointers = struct["diagnosis_pointers"]
163
+ if parsed_json["drug_identification"].nil?
164
+ drug_identification = nil
165
+ else
166
+ drug_identification = parsed_json["drug_identification"].to_json
167
+ drug_identification = CandidApiClient::ServiceLines::V2::Types::DrugIdentificationOptional.from_json(json_object: drug_identification)
168
+ end
169
+ place_of_service_code = struct["place_of_service_code"]
170
+ description = struct["description"]
171
+ date_of_service = (Date.parse(parsed_json["date_of_service"]) unless parsed_json["date_of_service"].nil?)
172
+ end_date_of_service = unless parsed_json["end_date_of_service"].nil?
173
+ Date.parse(parsed_json["end_date_of_service"])
174
+ end
175
+ if parsed_json["ordering_provider"].nil?
176
+ ordering_provider = nil
177
+ else
178
+ ordering_provider = parsed_json["ordering_provider"].to_json
179
+ ordering_provider = CandidApiClient::EncounterProviders::V2::Types::OrderingProviderOptional.from_json(json_object: ordering_provider)
180
+ end
181
+ test_results = parsed_json["test_results"]&.map do |item|
182
+ item = item.to_json
183
+ CandidApiClient::ServiceLines::V2::Types::TestResultOptional.from_json(json_object: item)
184
+ end
185
+ new(
186
+ modifiers: modifiers,
187
+ has_epsdt_indicator: has_epsdt_indicator,
188
+ has_family_planning_indicator: has_family_planning_indicator,
189
+ procedure_code: procedure_code,
190
+ quantity: quantity,
191
+ units: units,
192
+ charge_amount_cents: charge_amount_cents,
193
+ diagnosis_pointers: diagnosis_pointers,
194
+ drug_identification: drug_identification,
195
+ place_of_service_code: place_of_service_code,
196
+ description: description,
197
+ date_of_service: date_of_service,
198
+ end_date_of_service: end_date_of_service,
199
+ ordering_provider: ordering_provider,
200
+ test_results: test_results,
201
+ additional_properties: struct
202
+ )
203
+ end
204
+
205
+ # Serialize an instance of ServiceLineCreateOptional to a JSON object
206
+ #
207
+ # @return [String]
208
+ def to_json(*_args)
209
+ @_field_set&.to_json
210
+ end
211
+
212
+ # Leveraged for Union-type generation, validate_raw attempts to parse the given
213
+ # hash and check each fields type against the current object's property
214
+ # definitions.
215
+ #
216
+ # @param obj [Object]
217
+ # @return [Void]
218
+ def self.validate_raw(obj:)
219
+ obj.modifiers&.is_a?(Array) != false || raise("Passed value for field obj.modifiers is not the expected type, validation failed.")
220
+ obj.has_epsdt_indicator&.is_a?(Boolean) != false || raise("Passed value for field obj.has_epsdt_indicator is not the expected type, validation failed.")
221
+ obj.has_family_planning_indicator&.is_a?(Boolean) != false || raise("Passed value for field obj.has_family_planning_indicator is not the expected type, validation failed.")
222
+ obj.procedure_code&.is_a?(String) != false || raise("Passed value for field obj.procedure_code is not the expected type, validation failed.")
223
+ obj.quantity&.is_a?(String) != false || raise("Passed value for field obj.quantity is not the expected type, validation failed.")
224
+ obj.units&.is_a?(CandidApiClient::Commons::Types::ServiceLineUnits) != false || raise("Passed value for field obj.units is not the expected type, validation failed.")
225
+ obj.charge_amount_cents&.is_a?(Integer) != false || raise("Passed value for field obj.charge_amount_cents is not the expected type, validation failed.")
226
+ obj.diagnosis_pointers&.is_a?(Array) != false || raise("Passed value for field obj.diagnosis_pointers is not the expected type, validation failed.")
227
+ obj.drug_identification.nil? || CandidApiClient::ServiceLines::V2::Types::DrugIdentificationOptional.validate_raw(obj: obj.drug_identification)
228
+ obj.place_of_service_code&.is_a?(CandidApiClient::Commons::Types::FacilityTypeCode) != false || raise("Passed value for field obj.place_of_service_code is not the expected type, validation failed.")
229
+ obj.description&.is_a?(String) != false || raise("Passed value for field obj.description is not the expected type, validation failed.")
230
+ obj.date_of_service&.is_a?(Date) != false || raise("Passed value for field obj.date_of_service is not the expected type, validation failed.")
231
+ obj.end_date_of_service&.is_a?(Date) != false || raise("Passed value for field obj.end_date_of_service is not the expected type, validation failed.")
232
+ obj.ordering_provider.nil? || CandidApiClient::EncounterProviders::V2::Types::OrderingProviderOptional.validate_raw(obj: obj.ordering_provider)
233
+ obj.test_results&.is_a?(Array) != false || raise("Passed value for field obj.test_results is not the expected type, validation failed.")
234
+ end
235
+ end
236
+ end
237
+ end
238
+ end
239
+ end
@@ -0,0 +1,73 @@
1
+ # frozen_string_literal: true
2
+
3
+ require_relative "test_result_type"
4
+ require "ostruct"
5
+ require "json"
6
+
7
+ module CandidApiClient
8
+ module ServiceLines
9
+ module V2
10
+ module Types
11
+ class TestResultOptional
12
+ # @return [Float]
13
+ attr_reader :value
14
+ # @return [CandidApiClient::ServiceLines::V2::Types::TestResultType]
15
+ attr_reader :result_type
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 value [Float]
25
+ # @param result_type [CandidApiClient::ServiceLines::V2::Types::TestResultType]
26
+ # @param additional_properties [OpenStruct] Additional properties unmapped to the current class definition
27
+ # @return [CandidApiClient::ServiceLines::V2::Types::TestResultOptional]
28
+ def initialize(value: OMIT, result_type: OMIT, additional_properties: nil)
29
+ @value = value if value != OMIT
30
+ @result_type = result_type if result_type != OMIT
31
+ @additional_properties = additional_properties
32
+ @_field_set = { "value": value, "result_type": result_type }.reject do |_k, v|
33
+ v == OMIT
34
+ end
35
+ end
36
+
37
+ # Deserialize a JSON object to an instance of TestResultOptional
38
+ #
39
+ # @param json_object [String]
40
+ # @return [CandidApiClient::ServiceLines::V2::Types::TestResultOptional]
41
+ def self.from_json(json_object:)
42
+ struct = JSON.parse(json_object, object_class: OpenStruct)
43
+ value = struct["value"]
44
+ result_type = struct["result_type"]
45
+ new(
46
+ value: value,
47
+ result_type: result_type,
48
+ additional_properties: struct
49
+ )
50
+ end
51
+
52
+ # Serialize an instance of TestResultOptional to a JSON object
53
+ #
54
+ # @return [String]
55
+ def to_json(*_args)
56
+ @_field_set&.to_json
57
+ end
58
+
59
+ # Leveraged for Union-type generation, validate_raw attempts to parse the given
60
+ # hash and check each fields type against the current object's property
61
+ # definitions.
62
+ #
63
+ # @param obj [Object]
64
+ # @return [Void]
65
+ def self.validate_raw(obj:)
66
+ obj.value&.is_a?(Float) != false || raise("Passed value for field obj.value is not the expected type, validation failed.")
67
+ obj.result_type&.is_a?(CandidApiClient::ServiceLines::V2::Types::TestResultType) != false || raise("Passed value for field obj.result_type is not the expected type, validation failed.")
68
+ end
69
+ end
70
+ end
71
+ end
72
+ end
73
+ end
@@ -21,6 +21,7 @@ module CandidApiClient
21
21
  OTHER = "OTHER"
22
22
  UNKNOWN = "UNKNOWN"
23
23
  CONTRACTUAL_ADJUSTMENT = "CONTRACTUAL_ADJUSTMENT"
24
+ PRIMARY_PAID_MAX_BENEFITS = "PRIMARY_PAID_MAX_BENEFITS"
24
25
  end
25
26
  end
26
27
  end
@@ -16,6 +16,7 @@ module CandidApiClient
16
16
  UNKNOWN = "UNKNOWN"
17
17
  UNCOLLECTIBLE_OR_NON_BILLABLE = "UNCOLLECTIBLE_OR_NON_BILLABLE"
18
18
  DECEASED = "DECEASED"
19
+ BANKRUPTCY = "BANKRUPTCY"
19
20
  end
20
21
  end
21
22
  end
@@ -0,0 +1,14 @@
1
+ # frozen_string_literal: true
2
+
3
+ module CandidApiClient
4
+ module YesNoIndicator
5
+ module Types
6
+ class YesNoIndicator
7
+ YES = "YES"
8
+ NO = "NO"
9
+ UNKNOWN = "UNKNOWN"
10
+ NOT_APPLICABLE = "NOT_APPLICABLE"
11
+ end
12
+ end
13
+ end
14
+ end
data/lib/core/oauth.rb CHANGED
@@ -1,7 +1,7 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  require_relative "../requests"
4
- require_relative "../candidhealth/auth/v_2/client"
4
+ require_relative "../candidhealth/auth/default/client"
5
5
  require_relative "oauth"
6
6
 
7
7
  module CandidApiClient
@@ -38,7 +38,7 @@ module CandidApiClient
38
38
  def initialize(client_id:, client_secret:, request_client:)
39
39
  @client_id = client_id
40
40
  @client_secret = client_secret
41
- @auth_client = CandidApiClient::Auth::V2::V2Client.new(request_client: request_client)
41
+ @auth_client = CandidApiClient::Auth::Default::DefaultClient.new(request_client: request_client)
42
42
  end
43
43
 
44
44
  # Returns a cached access token retrieved from the provided client credentials,
data/lib/requests.rb CHANGED
@@ -45,7 +45,7 @@ module CandidApiClient
45
45
 
46
46
  # @return [Hash{String => String}]
47
47
  def get_headers
48
- headers = { "X-Fern-Language": "Ruby", "X-Fern-SDK-Name": "candidhealth", "X-Fern-SDK-Version": "0.46.1" }
48
+ headers = { "X-Fern-Language": "Ruby", "X-Fern-SDK-Name": "candidhealth", "X-Fern-SDK-Version": "1.3.0" }
49
49
  headers["Authorization"] = ((@token.is_a? Method) ? @token.call : @token) unless token.nil?
50
50
  headers
51
51
  end
@@ -90,7 +90,7 @@ module CandidApiClient
90
90
 
91
91
  # @return [Hash{String => String}]
92
92
  def get_headers
93
- headers = { "X-Fern-Language": "Ruby", "X-Fern-SDK-Name": "candidhealth", "X-Fern-SDK-Version": "0.46.1" }
93
+ headers = { "X-Fern-Language": "Ruby", "X-Fern-SDK-Name": "candidhealth", "X-Fern-SDK-Version": "1.3.0" }
94
94
  headers["Authorization"] = ((@token.is_a? Method) ? @token.call : @token) unless token.nil?
95
95
  headers
96
96
  end
data/lib/types_export.rb CHANGED
@@ -1,7 +1,9 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- require_relative "candidhealth/auth/v_2/types/auth_get_token_response"
4
- require_relative "candidhealth/auth/v_2/types/too_many_requests_error_type"
3
+ require_relative "candidhealth/auth/default/types/auth_get_token_response"
4
+ require_relative "candidhealth/auth/default/types/too_many_requests_error_type"
5
+ require_relative "candidhealth/auth/default/types/invalid_content_type_error_type"
6
+ require_relative "candidhealth/billing_notes/v_2/types/billing_note_base_optional"
5
7
  require_relative "candidhealth/billing_notes/v_2/types/billing_note_base"
6
8
  require_relative "candidhealth/billing_notes/v_2/types/billing_note"
7
9
  require_relative "candidhealth/charge_capture_bundles/v_1/types/charge_capture_claim_creation_page"
@@ -9,9 +11,9 @@ require_relative "candidhealth/charge_capture_bundles/v_1/types/charge_capture_c
9
11
  require_relative "candidhealth/charge_capture_bundles/v_1/types/charge_capture_claim_creation_summary"
10
12
  require_relative "candidhealth/charge_capture_bundles/v_1/types/charge_capture_claim_creation_status"
11
13
  require_relative "candidhealth/charge_capture_bundles/v_1/types/charge_capture_claim_creation_sort_field"
14
+ require_relative "candidhealth/charge_capture/v_1/types/charge_capture_data"
12
15
  require_relative "candidhealth/charge_capture/v_1/types/charge_capture_page"
13
16
  require_relative "candidhealth/charge_capture/v_1/types/charge_capture"
14
- require_relative "candidhealth/charge_capture/v_1/types/charge_capture_data"
15
17
  require_relative "candidhealth/charge_capture/v_1/types/charge_capture_error"
16
18
  require_relative "candidhealth/charge_capture/v_1/types/charge_capture_sort_field"
17
19
  require_relative "candidhealth/charge_capture/v_1/types/charge_capture_status"
@@ -19,7 +21,9 @@ require_relative "candidhealth/charge_capture/v_1/types/charge_capture_post_bill
19
21
  require_relative "candidhealth/charge_capture/v_1/types/charge_external_id_conflict_error_message"
20
22
  require_relative "candidhealth/claim_submission/v_1/types/claim_frequency_type_code"
21
23
  require_relative "candidhealth/claim_submission/v_1/types/external_claim_submission_create"
24
+ require_relative "candidhealth/claim_submission/v_1/types/external_claim_submission_create_optional"
22
25
  require_relative "candidhealth/claim_submission/v_1/types/claim_submission_record_create"
26
+ require_relative "candidhealth/claim_submission/v_1/types/claim_submission_record_create_optional"
23
27
  require_relative "candidhealth/clinical_trials/v_1/types/mutable_clinical_trial"
24
28
  require_relative "candidhealth/clinical_trials/v_1/types/clinical_trial"
25
29
  require_relative "candidhealth/clinical_trials/v_1/types/clinical_trial_phase"
@@ -41,6 +45,7 @@ require_relative "candidhealth/credentialing/v_2/types/credentialing_span_status
41
45
  require_relative "candidhealth/credentialing/v_2/types/provider_credentialing_span_page"
42
46
  require_relative "candidhealth/custom_schemas/v_1/types/schema"
43
47
  require_relative "candidhealth/custom_schemas/v_1/types/schema_instance"
48
+ require_relative "candidhealth/custom_schemas/v_1/types/schema_instance_optional"
44
49
  require_relative "candidhealth/custom_schemas/v_1/types/schema_field"
45
50
  require_relative "candidhealth/custom_schemas/v_1/types/schema_get_multi_response"
46
51
  require_relative "candidhealth/custom_schemas/v_1/types/schema_with_name_already_exists_error"
@@ -60,6 +65,7 @@ require_relative "candidhealth/encounter_providers/v_2/types/initial_referring_p
60
65
  require_relative "candidhealth/encounter_providers/v_2/types/supervising_provider"
61
66
  require_relative "candidhealth/encounter_providers/v_2/types/supervising_provider_update"
62
67
  require_relative "candidhealth/encounter_providers/v_2/types/ordering_provider"
68
+ require_relative "candidhealth/encounter_providers/v_2/types/ordering_provider_optional"
63
69
  require_relative "candidhealth/encounter_providers/v_2/types/ordering_provider_update"
64
70
  require_relative "candidhealth/encounter_providers/v_2/types/billing_provider"
65
71
  require_relative "candidhealth/encounter_providers/v_2/types/billing_provider_update"
@@ -72,24 +78,32 @@ require_relative "candidhealth/encounter_providers/v_2/types/encounter_provider"
72
78
  require_relative "candidhealth/encounters/v_4/types/encounter_create_from_pre_encounter"
73
79
  require_relative "candidhealth/encounters/v_4/types/encounter_base"
74
80
  require_relative "candidhealth/encounters/v_4/types/encounter_optional"
81
+ require_relative "candidhealth/encounters/v_4/types/encounter_deep_optional"
75
82
  require_relative "candidhealth/encounters/v_4/types/encounter"
76
83
  require_relative "candidhealth/encounters/v_4/types/encounter_sort_options"
77
84
  require_relative "candidhealth/encounters/v_4/types/medication"
85
+ require_relative "candidhealth/encounters/v_4/types/medication_optional"
78
86
  require_relative "candidhealth/encounters/v_4/types/vitals"
79
87
  require_relative "candidhealth/encounters/v_4/types/vitals_update"
80
88
  require_relative "candidhealth/encounters/v_4/types/intervention"
89
+ require_relative "candidhealth/encounters/v_4/types/intervention_optional"
81
90
  require_relative "candidhealth/encounters/v_4/types/intervention_category"
82
91
  require_relative "candidhealth/encounters/v_4/types/lab"
92
+ require_relative "candidhealth/encounters/v_4/types/lab_optional"
83
93
  require_relative "candidhealth/encounters/v_4/types/lab_code_type"
84
94
  require_relative "candidhealth/encounters/v_4/types/patient_history_category"
95
+ require_relative "candidhealth/encounters/v_4/types/patient_history_category_optional"
85
96
  require_relative "candidhealth/encounters/v_4/types/patient_history_category_enum"
86
97
  require_relative "candidhealth/encounters/v_4/types/intake_question"
98
+ require_relative "candidhealth/encounters/v_4/types/intake_question_optional"
87
99
  require_relative "candidhealth/encounters/v_4/types/intake_response_and_follow_ups"
88
100
  require_relative "candidhealth/encounters/v_4/types/intake_follow_up"
89
101
  require_relative "candidhealth/encounters/v_4/types/clinical_note_category_create"
102
+ require_relative "candidhealth/encounters/v_4/types/clinical_note_category_create_optional"
90
103
  require_relative "candidhealth/encounters/v_4/types/clinical_note_category"
91
104
  require_relative "candidhealth/encounters/v_4/types/note_category"
92
105
  require_relative "candidhealth/encounters/v_4/types/clinical_note"
106
+ require_relative "candidhealth/encounters/v_4/types/clinical_note_optional"
93
107
  require_relative "candidhealth/encounters/v_4/types/responsible_party_type"
94
108
  require_relative "candidhealth/encounters/v_4/types/billable_status_type"
95
109
  require_relative "candidhealth/encounters/v_4/types/encounter_owner_of_next_action_type"
@@ -97,8 +111,10 @@ require_relative "candidhealth/encounters/v_4/types/encounter_submission_origin_
97
111
  require_relative "candidhealth/encounters/v_4/types/synchronicity_type"
98
112
  require_relative "candidhealth/encounters/v_4/types/coding_attribution_type"
99
113
  require_relative "candidhealth/encounters/v_4/types/epsdt_referral"
114
+ require_relative "candidhealth/encounters/v_4/types/epsdt_referral_optional"
100
115
  require_relative "candidhealth/encounters/v_4/types/report_type_code"
101
116
  require_relative "candidhealth/encounters/v_4/types/report_transmission_code"
117
+ require_relative "candidhealth/encounters/v_4/types/claim_supplemental_information_optional"
102
118
  require_relative "candidhealth/encounters/v_4/types/claim_supplemental_information"
103
119
  require_relative "candidhealth/encounters/v_4/types/encounter_page"
104
120
  require_relative "candidhealth/encounters/v_4/types/encounter_external_id_uniqueness_error_type"
@@ -172,6 +188,7 @@ require_relative "candidhealth/guarantor/v_1/types/guarantor_base"
172
188
  require_relative "candidhealth/guarantor/v_1/types/guarantor"
173
189
  require_relative "candidhealth/guarantor/v_1/types/guarantor_create"
174
190
  require_relative "candidhealth/guarantor/v_1/types/guarantor_update"
191
+ require_relative "candidhealth/guarantor/v_1/types/guarantor_optional"
175
192
  require_relative "candidhealth/guarantor/v_1/types/encounter_has_existing_guarantor_error_type"
176
193
  require_relative "candidhealth/import_invoice/v_1/types/import_invoice"
177
194
  require_relative "candidhealth/import_invoice/v_1/types/create_import_invoice_request"
@@ -187,6 +204,7 @@ require_relative "candidhealth/insurance_adjudications/v_1/types/service_line_ad
187
204
  require_relative "candidhealth/insurance_adjudications/v_1/types/service_line_adjudication"
188
205
  require_relative "candidhealth/insurance_cards/v_2/types/insurance_card_base"
189
206
  require_relative "candidhealth/insurance_cards/v_2/types/insurance_card_create"
207
+ require_relative "candidhealth/insurance_cards/v_2/types/insurance_card_create_optional"
190
208
  require_relative "candidhealth/insurance_cards/v_2/types/insurance_card"
191
209
  require_relative "candidhealth/insurance_payments/v_1/types/insurance_payment"
192
210
  require_relative "candidhealth/insurance_payments/v_1/types/insurance_payments_page"
@@ -268,6 +286,7 @@ require_relative "candidhealth/payers/v_3/types/payer_identifier"
268
286
  require_relative "candidhealth/remits/v_1/types/payee_identifier"
269
287
  require_relative "candidhealth/remits/v_1/types/payee"
270
288
  require_relative "candidhealth/service_lines/v_2/types/service_line_create"
289
+ require_relative "candidhealth/service_lines/v_2/types/service_line_create_optional"
271
290
  require_relative "candidhealth/service_lines/v_2/types/service_line_create_standalone"
272
291
  require_relative "candidhealth/service_lines/v_2/types/service_line_update"
273
292
  require_relative "candidhealth/service_lines/v_2/types/service_line"
@@ -275,8 +294,10 @@ require_relative "candidhealth/service_lines/v_2/types/service_line_era_data"
275
294
  require_relative "candidhealth/service_lines/v_2/types/service_line_adjustment"
276
295
  require_relative "candidhealth/service_lines/v_2/types/service_line_denial_reason"
277
296
  require_relative "candidhealth/service_lines/v_2/types/denial_reason_content"
297
+ require_relative "candidhealth/service_lines/v_2/types/drug_identification_optional"
278
298
  require_relative "candidhealth/service_lines/v_2/types/drug_identification"
279
299
  require_relative "candidhealth/service_lines/v_2/types/test_result_type"
300
+ require_relative "candidhealth/service_lines/v_2/types/test_result_optional"
280
301
  require_relative "candidhealth/service_lines/v_2/types/test_result"
281
302
  require_relative "candidhealth/service_lines/v_2/types/service_id_qualifier"
282
303
  require_relative "candidhealth/service_lines/v_2/types/measurement_unit_code"
@@ -323,11 +344,8 @@ require_relative "candidhealth/pre_encounter/appointments/v_1/types/visits_page"
323
344
  require_relative "candidhealth/pre_encounter/coverages/v_1/types/payer_plan_group_fields"
324
345
  require_relative "candidhealth/pre_encounter/coverages/v_1/types/coverages_page"
325
346
  require_relative "candidhealth/pre_encounter/coverages/v_1/types/latest_eligibility_check"
326
- require_relative "candidhealth/pre_encounter/coverages/v_1/types/eligibility_check_metadata"
327
- require_relative "candidhealth/pre_encounter/coverages/v_1/types/coverage_eligibility_check_response"
328
- require_relative "candidhealth/pre_encounter/coverages/v_1/types/eligibility_check"
329
- require_relative "candidhealth/pre_encounter/coverages/v_1/types/eligibility_check_status"
330
347
  require_relative "candidhealth/pre_encounter/coverages/v_1/types/benefit_type"
348
+ require_relative "candidhealth/pre_encounter/coverages/v_1/types/coverage_eligibility_check_response"
331
349
  require_relative "candidhealth/pre_encounter/coverages/v_1/types/coverage_value"
332
350
  require_relative "candidhealth/pre_encounter/coverages/v_1/types/coverage_benefits"
333
351
  require_relative "candidhealth/pre_encounter/coverages/v_1/types/coverage_details"
@@ -337,7 +355,6 @@ require_relative "candidhealth/pre_encounter/coverages/v_1/types/service_coverag
337
355
  require_relative "candidhealth/pre_encounter/coverages/v_1/types/service_coverage_details"
338
356
  require_relative "candidhealth/pre_encounter/coverages/v_1/types/plan_metadata"
339
357
  require_relative "candidhealth/pre_encounter/coverages/v_1/types/plan_date"
340
- require_relative "candidhealth/pre_encounter/coverages/v_1/types/eligibility_status"
341
358
  require_relative "candidhealth/pre_encounter/coverages/v_1/types/coverage_level"
342
359
  require_relative "candidhealth/pre_encounter/coverages/v_1/types/coverage_value_unit"
343
360
  require_relative "candidhealth/pre_encounter/coverages/v_1/types/subscriber"
@@ -357,11 +374,19 @@ require_relative "candidhealth/pre_encounter/eligibility_checks/v_1/types/indivi
357
374
  require_relative "candidhealth/pre_encounter/eligibility_checks/v_1/types/organization_provider"
358
375
  require_relative "candidhealth/pre_encounter/eligibility_checks/v_1/types/provider"
359
376
  require_relative "candidhealth/pre_encounter/eligibility_checks/v_1/types/encounter"
377
+ require_relative "candidhealth/pre_encounter/eligibility_checks/v_1/types/eligibility_check_status"
378
+ require_relative "candidhealth/pre_encounter/eligibility_checks/v_1/types/eligibility_status"
379
+ require_relative "candidhealth/pre_encounter/eligibility_checks/v_1/types/eligibility_check_metadata"
360
380
  require_relative "candidhealth/pre_encounter/eligibility_checks/v_1/types/eligibility_request"
361
381
  require_relative "candidhealth/pre_encounter/eligibility_checks/v_1/types/request_correction"
362
382
  require_relative "candidhealth/pre_encounter/eligibility_checks/v_1/types/parsed_response"
383
+ require_relative "candidhealth/pre_encounter/eligibility_checks/v_1/types/eligibility_check_error_details"
384
+ require_relative "candidhealth/pre_encounter/eligibility_checks/v_1/types/eligibility_check_error_source"
385
+ require_relative "candidhealth/pre_encounter/eligibility_checks/v_1/types/eligibility_check_error"
363
386
  require_relative "candidhealth/pre_encounter/eligibility_checks/v_1/types/eligibility_check"
364
387
  require_relative "candidhealth/pre_encounter/eligibility_checks/v_1/types/eligibility_response"
388
+ require_relative "candidhealth/pre_encounter/eligibility_checks/v_1/types/batch_eligibility_response"
389
+ require_relative "candidhealth/pre_encounter/eligibility_checks/v_1/types/eligibility_check_page"
365
390
  require_relative "candidhealth/pre_encounter/images/v_1/types/image_status"
366
391
  require_relative "candidhealth/pre_encounter/images/v_1/types/coverage_image_side"
367
392
  require_relative "candidhealth/pre_encounter/images/v_1/types/coverage_association"
@@ -403,6 +428,7 @@ require_relative "candidhealth/commons/types/street_address_optional_base"
403
428
  require_relative "candidhealth/commons/types/street_address_short_zip_optional"
404
429
  require_relative "candidhealth/commons/types/street_address_short_zip"
405
430
  require_relative "candidhealth/commons/types/street_address_long_zip"
431
+ require_relative "candidhealth/commons/types/street_address_long_zip_optional"
406
432
  require_relative "candidhealth/commons/types/regions"
407
433
  require_relative "candidhealth/commons/types/region_states"
408
434
  require_relative "candidhealth/commons/types/region_national"
@@ -426,11 +452,13 @@ require_relative "candidhealth/commons/types/request_validation_error"
426
452
  require_relative "candidhealth/commons/types/updates_disabled_due_to_external_system_integration_error_message"
427
453
  require_relative "candidhealth/commons/types/organization_not_authorized_error_message"
428
454
  require_relative "candidhealth/commons/types/phone_number"
455
+ require_relative "candidhealth/commons/types/phone_number_optional"
429
456
  require_relative "candidhealth/commons/types/phone_number_type"
430
457
  require_relative "candidhealth/commons/types/delay_reason_code"
431
458
  require_relative "candidhealth/commons/types/intended_submission_medium"
432
459
  require_relative "candidhealth/commons/types/billing_provider_commercial_license_type"
433
460
  require_relative "candidhealth/commons/types/epsdt_referral_condition_indicator_code"
461
+ require_relative "candidhealth/diagnoses/types/diagnosis_create_optional"
434
462
  require_relative "candidhealth/diagnoses/types/diagnosis_create"
435
463
  require_relative "candidhealth/diagnoses/types/standalone_diagnosis_create"
436
464
  require_relative "candidhealth/diagnoses/types/diagnosis_type_code"
@@ -465,10 +493,14 @@ require_relative "candidhealth/identifiers/types/identifier_create"
465
493
  require_relative "candidhealth/identifiers/types/identifier_update"
466
494
  require_relative "candidhealth/identifiers/types/updatable_identifier"
467
495
  require_relative "candidhealth/individual/types/individual_base"
496
+ require_relative "candidhealth/individual/types/individual_base_optional"
468
497
  require_relative "candidhealth/individual/types/subscriber_base"
498
+ require_relative "candidhealth/individual/types/subscriber_base_optional"
469
499
  require_relative "candidhealth/individual/types/subscriber_create"
500
+ require_relative "candidhealth/individual/types/subscriber_create_optional"
470
501
  require_relative "candidhealth/individual/types/subscriber"
471
502
  require_relative "candidhealth/individual/types/patient_non_insurance_payer_info_create"
503
+ require_relative "candidhealth/individual/types/patient_non_insurance_payer_info_create_optional"
472
504
  require_relative "candidhealth/individual/types/patient_clinical_trial_info_create"
473
505
  require_relative "candidhealth/individual/types/patient_clinical_trial_info"
474
506
  require_relative "candidhealth/individual/types/patient_non_insurance_payer_info"
@@ -491,6 +523,7 @@ require_relative "candidhealth/tags/types/tag_color_enum"
491
523
  require_relative "candidhealth/tasks/commons/types/task_status"
492
524
  require_relative "candidhealth/tasks/commons/types/task_type"
493
525
  require_relative "candidhealth/tasks/commons/types/task_category"
526
+ require_relative "candidhealth/yes_no_indicator/types/yes_no_indicator"
494
527
  require_relative "candidhealth/pre_encounter/common/types/base_model"
495
528
  require_relative "candidhealth/pre_encounter/common/types/external_identifier"
496
529
  require_relative "candidhealth/pre_encounter/common/types/canonical_non_insurance_payer_association"