candidhealth 1.7.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 (83) hide show
  1. checksums.yaml +4 -4
  2. data/lib/candidhealth/auth/default/client.rb +34 -6
  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/encounter_providers/v_2/types/billing_provider.rb +1 -1
  8. data/lib/candidhealth/encounter_providers/v_2/types/billing_provider_update.rb +1 -1
  9. data/lib/candidhealth/encounter_providers/v_2/types/billing_provider_update_with_optional_address.rb +1 -1
  10. data/lib/candidhealth/encounters/v_4/client.rb +3253 -2040
  11. data/lib/candidhealth/encounters/v_4/types/encounter.rb +111 -86
  12. data/lib/candidhealth/encounters/v_4/types/encounter_base.rb +39 -33
  13. data/lib/candidhealth/encounters/v_4/types/encounter_create.rb +796 -0
  14. data/lib/candidhealth/encounters/v_4/types/encounter_create_from_pre_encounter.rb +131 -117
  15. data/lib/candidhealth/encounters/v_4/types/encounter_deep_optional.rb +70 -56
  16. data/lib/candidhealth/encounters/v_4/types/encounter_optional.rb +29 -39
  17. data/lib/candidhealth/encounters/v_4/types/encounter_rendering_or_attending_provider_required_error.rb +55 -0
  18. data/lib/candidhealth/encounters/v_4/types/encounter_update.rb +736 -0
  19. data/lib/candidhealth/encounters_universal/types/universal_encounter_create.rb +944 -0
  20. data/lib/candidhealth/encounters_universal/types/universal_encounter_create_base.rb +691 -0
  21. data/lib/candidhealth/encounters_universal/types/universal_encounter_create_from_pre_encounter.rb +791 -0
  22. data/lib/candidhealth/encounters_universal/types/universal_encounter_create_from_pre_encounter_base.rb +572 -0
  23. data/lib/candidhealth/encounters_universal/types/universal_encounter_update.rb +872 -0
  24. data/lib/candidhealth/encounters_universal/types/universal_encounter_update_base.rb +700 -0
  25. data/lib/candidhealth/fee_schedules/v_3/client.rb +57 -0
  26. data/lib/candidhealth/fee_schedules/v_3/types/validation_error.rb +12 -0
  27. data/lib/candidhealth/financials/types/patient_transaction_source.rb +1 -0
  28. data/lib/candidhealth/health_care_code_information/v_1/types/admitting_diagnosis_new.rb +206 -0
  29. data/lib/candidhealth/health_care_code_information/v_1/types/condition_information_new.rb +207 -0
  30. data/lib/candidhealth/health_care_code_information/v_1/types/diagnosis_related_group_new.rb +206 -0
  31. data/lib/candidhealth/health_care_code_information/v_1/types/external_cause_of_injury_new.rb +245 -0
  32. data/lib/candidhealth/health_care_code_information/v_1/types/health_care_code_information_create.rb +225 -0
  33. data/lib/candidhealth/health_care_code_information/v_1/types/occurrence_information_new.rb +219 -0
  34. data/lib/candidhealth/health_care_code_information/v_1/types/occurrence_span_information_new.rb +222 -0
  35. data/lib/candidhealth/health_care_code_information/v_1/types/other_diagnosis_information_new.rb +215 -0
  36. data/lib/candidhealth/health_care_code_information/v_1/types/other_procedure_information_new.rb +218 -0
  37. data/lib/candidhealth/health_care_code_information/v_1/types/patient_reason_for_visit_new.rb +206 -0
  38. data/lib/candidhealth/health_care_code_information/v_1/types/principal_diagnosis_new.rb +215 -0
  39. data/lib/candidhealth/health_care_code_information/v_1/types/principal_procedure_information_new.rb +216 -0
  40. data/lib/candidhealth/health_care_code_information/v_1/types/treatment_code_information_new.rb +206 -0
  41. data/lib/candidhealth/health_care_code_information/v_1/types/value_information_new.rb +215 -0
  42. data/lib/candidhealth/individual/types/patient.rb +6 -6
  43. data/lib/candidhealth/individual/types/patient_base.rb +6 -6
  44. data/lib/candidhealth/individual/types/patient_create.rb +6 -6
  45. data/lib/candidhealth/individual/types/patient_update.rb +6 -6
  46. data/lib/candidhealth/individual/types/patient_update_with_optional_address.rb +6 -6
  47. data/lib/candidhealth/organization_providers/v_2/types/license_type.rb +2 -0
  48. data/lib/candidhealth/payers/client.rb +7 -0
  49. data/lib/candidhealth/payers/v_4/client.rb +137 -0
  50. data/lib/candidhealth/payers/v_4/types/clearinghouse_payer_info.rb +93 -0
  51. data/lib/candidhealth/payers/v_4/types/payer.rb +116 -0
  52. data/lib/candidhealth/payers/v_4/types/payer_ids.rb +107 -0
  53. data/lib/candidhealth/payers/v_4/types/payer_page.rb +88 -0
  54. data/lib/candidhealth/payers/v_4/types/support_state.rb +15 -0
  55. data/lib/candidhealth/pre_encounter/coverages/v_1/client.rb +4 -4
  56. data/lib/candidhealth/pre_encounter/coverages/v_1/types/subscriber.rb +3 -3
  57. data/lib/candidhealth/pre_encounter/patients/v_1/client.rb +72 -6
  58. data/lib/candidhealth/pre_encounter/patients/v_1/types/guarantor.rb +3 -3
  59. data/lib/candidhealth/pre_encounter/patients/v_1/types/inferred_patient_metadata.rb +80 -0
  60. data/lib/candidhealth/pre_encounter/patients/v_1/types/mutable_patient.rb +19 -5
  61. data/lib/candidhealth/pre_encounter/patients/v_1/types/mutable_patient_with_mrn.rb +19 -5
  62. data/lib/candidhealth/pre_encounter/patients/v_1/types/patient.rb +18 -4
  63. data/lib/candidhealth/pre_encounter/patients/v_1/types/referral_type.rb +1 -0
  64. data/lib/candidhealth/service_lines/v_2/client.rb +252 -10
  65. data/lib/candidhealth/service_lines/v_2/types/service_line.rb +28 -10
  66. data/lib/candidhealth/service_lines/v_2/types/service_line_create.rb +52 -40
  67. data/lib/candidhealth/service_lines/v_2/types/service_line_create_base.rb +251 -0
  68. data/lib/candidhealth/service_lines/v_2/types/service_line_create_base_base.rb +243 -0
  69. data/lib/candidhealth/service_lines/v_2/types/service_line_create_optional.rb +48 -24
  70. data/lib/candidhealth/service_lines/v_2/types/service_line_create_standalone.rb +58 -46
  71. data/lib/candidhealth/service_lines/v_2/types/service_line_create_standalone_base.rb +273 -0
  72. data/lib/candidhealth/service_lines/v_2/types/service_line_create_standalone_base_base.rb +265 -0
  73. data/lib/candidhealth/service_lines/v_2/types/service_line_update.rb +64 -54
  74. data/lib/candidhealth/service_lines/v_2/types/service_line_update_base.rb +263 -0
  75. data/lib/candidhealth/service_lines/v_2/types/universal_service_line_create.rb +271 -0
  76. data/lib/candidhealth/service_lines/v_2/types/universal_service_line_create_standalone.rb +317 -0
  77. data/lib/candidhealth/service_lines/v_2/types/universal_service_line_update.rb +307 -0
  78. data/lib/candidhealth/x_12/v_1/types/type_of_bill_composite.rb +2 -2
  79. data/lib/candidhealth/x_12/v_1/types/type_of_bill_composite_base.rb +90 -0
  80. data/lib/candidhealth/x_12/v_1/types/type_of_bill_composite_update.rb +112 -0
  81. data/lib/requests.rb +2 -2
  82. data/lib/types_export.rb +44 -4
  83. metadata +43 -2
@@ -0,0 +1,218 @@
1
+ # frozen_string_literal: true
2
+
3
+ require_relative "other_procedure_information_code_qualifier"
4
+ require "date"
5
+ require_relative "code_list_qualifier_code"
6
+ require_relative "date_time_period_format_qualifier"
7
+ require "ostruct"
8
+ require "json"
9
+
10
+ module CandidApiClient
11
+ module HealthCareCodeInformation
12
+ module V1
13
+ module Types
14
+ # This corresponds to the BBQ or BQ code qualifier values.
15
+ class OtherProcedureInformationNew
16
+ # @return [CandidApiClient::HealthCareCodeInformation::V1::Types::OtherProcedureInformationCodeQualifier]
17
+ attr_reader :other_procedure_code_qualifier
18
+ # @return [String]
19
+ attr_reader :other_procedure_code
20
+ # @return [DateTime]
21
+ attr_reader :other_procedure_date
22
+ # @return [CandidApiClient::HealthCareCodeInformation::V1::Types::CodeListQualifierCode]
23
+ attr_reader :code_list_qualifier
24
+ # @return [String] A code string whose interpretation depends on the code_list_qualifier being set.
25
+ # You do not need to set this field generally, instead it is provided as advisory
26
+ # context on how this HealthCareCodeInformation's data will be available in
27
+ # reporting.
28
+ attr_reader :industry_code_1
29
+ # @return [String] A code string whose interpretation depends on the code_list_qualifier being set.
30
+ # You do not need to set this field generally, instead it is provided as advisory
31
+ # context on how this HealthCareCodeInformation's data will be available in
32
+ # reporting.
33
+ attr_reader :industry_code_2
34
+ # @return [String] A code string whose interpretation depends on the code_list_qualifier being set.
35
+ # You do not need to set this field generally, instead it is provided as advisory
36
+ # context on how this HealthCareCodeInformation's data will be available in
37
+ # reporting.
38
+ attr_reader :industry_code_3
39
+ # @return [String] A code string whose interpretation depends on the code_list_qualifier being set.
40
+ # You do not need to set this field generally, instead it is provided as advisory
41
+ # context on how this HealthCareCodeInformation's data will be available in
42
+ # reporting.
43
+ attr_reader :industry_code_4
44
+ # @return [CandidApiClient::HealthCareCodeInformation::V1::Types::DateTimePeriodFormatQualifier] Controls how the date_time_period field is interpreted and is submitted
45
+ # as part of claim process.
46
+ # You do not need to set this field generally, instead it is provided as advisory
47
+ # context on how this HealthCareCodeInformation's data will be available in
48
+ # reporting.
49
+ attr_reader :date_time_period_format_qualifier
50
+ # @return [String] A string, formatted according to date_time_period_format_qualifier, which
51
+ # ultimately represents the date time period in which an information object
52
+ # is covering.
53
+ # You do not need to set this field generally, instead it is provided as advisory
54
+ # context on how this HealthCareCodeInformation's data will be available in
55
+ # reporting.
56
+ attr_reader :date_time_period
57
+ # @return [String] A decimal used to represent ValueInformation results.
58
+ # You do not need to set this field generally, instead it is provided as advisory
59
+ # context on how this HealthCareCodeInformation's data will be available in
60
+ # reporting.
61
+ attr_reader :monetary_amount
62
+ # @return [String] You do not need to set this field generally, instead it is provided as advisory
63
+ # context on how this HealthCareCodeInformation's data will be available in
64
+ # reporting.
65
+ attr_reader :quantity
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 other_procedure_code_qualifier [CandidApiClient::HealthCareCodeInformation::V1::Types::OtherProcedureInformationCodeQualifier]
75
+ # @param other_procedure_code [String]
76
+ # @param other_procedure_date [DateTime]
77
+ # @param code_list_qualifier [CandidApiClient::HealthCareCodeInformation::V1::Types::CodeListQualifierCode]
78
+ # @param industry_code_1 [String] A code string whose interpretation depends on the code_list_qualifier being set.
79
+ # You do not need to set this field generally, instead it is provided as advisory
80
+ # context on how this HealthCareCodeInformation's data will be available in
81
+ # reporting.
82
+ # @param industry_code_2 [String] A code string whose interpretation depends on the code_list_qualifier being set.
83
+ # You do not need to set this field generally, instead it is provided as advisory
84
+ # context on how this HealthCareCodeInformation's data will be available in
85
+ # reporting.
86
+ # @param industry_code_3 [String] A code string whose interpretation depends on the code_list_qualifier being set.
87
+ # You do not need to set this field generally, instead it is provided as advisory
88
+ # context on how this HealthCareCodeInformation's data will be available in
89
+ # reporting.
90
+ # @param industry_code_4 [String] A code string whose interpretation depends on the code_list_qualifier being set.
91
+ # You do not need to set this field generally, instead it is provided as advisory
92
+ # context on how this HealthCareCodeInformation's data will be available in
93
+ # reporting.
94
+ # @param date_time_period_format_qualifier [CandidApiClient::HealthCareCodeInformation::V1::Types::DateTimePeriodFormatQualifier] Controls how the date_time_period field is interpreted and is submitted
95
+ # as part of claim process.
96
+ # You do not need to set this field generally, instead it is provided as advisory
97
+ # context on how this HealthCareCodeInformation's data will be available in
98
+ # reporting.
99
+ # @param date_time_period [String] A string, formatted according to date_time_period_format_qualifier, which
100
+ # ultimately represents the date time period in which an information object
101
+ # is covering.
102
+ # You do not need to set this field generally, instead it is provided as advisory
103
+ # context on how this HealthCareCodeInformation's data will be available in
104
+ # reporting.
105
+ # @param monetary_amount [String] A decimal used to represent ValueInformation results.
106
+ # You do not need to set this field generally, instead it is provided as advisory
107
+ # context on how this HealthCareCodeInformation's data will be available in
108
+ # reporting.
109
+ # @param quantity [String] You do not need to set this field generally, instead it is provided as advisory
110
+ # context on how this HealthCareCodeInformation's data will be available in
111
+ # reporting.
112
+ # @param additional_properties [OpenStruct] Additional properties unmapped to the current class definition
113
+ # @return [CandidApiClient::HealthCareCodeInformation::V1::Types::OtherProcedureInformationNew]
114
+ def initialize(other_procedure_code_qualifier:, other_procedure_code:, other_procedure_date:,
115
+ code_list_qualifier: OMIT, industry_code_1: OMIT, industry_code_2: OMIT, industry_code_3: OMIT, industry_code_4: OMIT, date_time_period_format_qualifier: OMIT, date_time_period: OMIT, monetary_amount: OMIT, quantity: OMIT, additional_properties: nil)
116
+ @other_procedure_code_qualifier = other_procedure_code_qualifier
117
+ @other_procedure_code = other_procedure_code
118
+ @other_procedure_date = other_procedure_date
119
+ @code_list_qualifier = code_list_qualifier if code_list_qualifier != OMIT
120
+ @industry_code_1 = industry_code_1 if industry_code_1 != OMIT
121
+ @industry_code_2 = industry_code_2 if industry_code_2 != OMIT
122
+ @industry_code_3 = industry_code_3 if industry_code_3 != OMIT
123
+ @industry_code_4 = industry_code_4 if industry_code_4 != OMIT
124
+ if date_time_period_format_qualifier != OMIT
125
+ @date_time_period_format_qualifier = date_time_period_format_qualifier
126
+ end
127
+ @date_time_period = date_time_period if date_time_period != OMIT
128
+ @monetary_amount = monetary_amount if monetary_amount != OMIT
129
+ @quantity = quantity if quantity != OMIT
130
+ @additional_properties = additional_properties
131
+ @_field_set = {
132
+ "other_procedure_code_qualifier": other_procedure_code_qualifier,
133
+ "other_procedure_code": other_procedure_code,
134
+ "other_procedure_date": other_procedure_date,
135
+ "code_list_qualifier": code_list_qualifier,
136
+ "industry_code_1": industry_code_1,
137
+ "industry_code_2": industry_code_2,
138
+ "industry_code_3": industry_code_3,
139
+ "industry_code_4": industry_code_4,
140
+ "date_time_period_format_qualifier": date_time_period_format_qualifier,
141
+ "date_time_period": date_time_period,
142
+ "monetary_amount": monetary_amount,
143
+ "quantity": quantity
144
+ }.reject do |_k, v|
145
+ v == OMIT
146
+ end
147
+ end
148
+
149
+ # Deserialize a JSON object to an instance of OtherProcedureInformationNew
150
+ #
151
+ # @param json_object [String]
152
+ # @return [CandidApiClient::HealthCareCodeInformation::V1::Types::OtherProcedureInformationNew]
153
+ def self.from_json(json_object:)
154
+ struct = JSON.parse(json_object, object_class: OpenStruct)
155
+ parsed_json = JSON.parse(json_object)
156
+ other_procedure_code_qualifier = struct["other_procedure_code_qualifier"]
157
+ other_procedure_code = struct["other_procedure_code"]
158
+ other_procedure_date = unless parsed_json["other_procedure_date"].nil?
159
+ DateTime.parse(parsed_json["other_procedure_date"])
160
+ end
161
+ code_list_qualifier = struct["code_list_qualifier"]
162
+ industry_code_1 = struct["industry_code_1"]
163
+ industry_code_2 = struct["industry_code_2"]
164
+ industry_code_3 = struct["industry_code_3"]
165
+ industry_code_4 = struct["industry_code_4"]
166
+ date_time_period_format_qualifier = struct["date_time_period_format_qualifier"]
167
+ date_time_period = struct["date_time_period"]
168
+ monetary_amount = struct["monetary_amount"]
169
+ quantity = struct["quantity"]
170
+ new(
171
+ other_procedure_code_qualifier: other_procedure_code_qualifier,
172
+ other_procedure_code: other_procedure_code,
173
+ other_procedure_date: other_procedure_date,
174
+ code_list_qualifier: code_list_qualifier,
175
+ industry_code_1: industry_code_1,
176
+ industry_code_2: industry_code_2,
177
+ industry_code_3: industry_code_3,
178
+ industry_code_4: industry_code_4,
179
+ date_time_period_format_qualifier: date_time_period_format_qualifier,
180
+ date_time_period: date_time_period,
181
+ monetary_amount: monetary_amount,
182
+ quantity: quantity,
183
+ additional_properties: struct
184
+ )
185
+ end
186
+
187
+ # Serialize an instance of OtherProcedureInformationNew to a JSON object
188
+ #
189
+ # @return [String]
190
+ def to_json(*_args)
191
+ @_field_set&.to_json
192
+ end
193
+
194
+ # Leveraged for Union-type generation, validate_raw attempts to parse the given
195
+ # hash and check each fields type against the current object's property
196
+ # definitions.
197
+ #
198
+ # @param obj [Object]
199
+ # @return [Void]
200
+ def self.validate_raw(obj:)
201
+ obj.other_procedure_code_qualifier.is_a?(CandidApiClient::HealthCareCodeInformation::V1::Types::OtherProcedureInformationCodeQualifier) != false || raise("Passed value for field obj.other_procedure_code_qualifier is not the expected type, validation failed.")
202
+ obj.other_procedure_code.is_a?(String) != false || raise("Passed value for field obj.other_procedure_code is not the expected type, validation failed.")
203
+ obj.other_procedure_date.is_a?(DateTime) != false || raise("Passed value for field obj.other_procedure_date is not the expected type, validation failed.")
204
+ obj.code_list_qualifier&.is_a?(CandidApiClient::HealthCareCodeInformation::V1::Types::CodeListQualifierCode) != false || raise("Passed value for field obj.code_list_qualifier is not the expected type, validation failed.")
205
+ obj.industry_code_1&.is_a?(String) != false || raise("Passed value for field obj.industry_code_1 is not the expected type, validation failed.")
206
+ obj.industry_code_2&.is_a?(String) != false || raise("Passed value for field obj.industry_code_2 is not the expected type, validation failed.")
207
+ obj.industry_code_3&.is_a?(String) != false || raise("Passed value for field obj.industry_code_3 is not the expected type, validation failed.")
208
+ obj.industry_code_4&.is_a?(String) != false || raise("Passed value for field obj.industry_code_4 is not the expected type, validation failed.")
209
+ obj.date_time_period_format_qualifier&.is_a?(CandidApiClient::HealthCareCodeInformation::V1::Types::DateTimePeriodFormatQualifier) != false || raise("Passed value for field obj.date_time_period_format_qualifier is not the expected type, validation failed.")
210
+ obj.date_time_period&.is_a?(String) != false || raise("Passed value for field obj.date_time_period is not the expected type, validation failed.")
211
+ obj.monetary_amount&.is_a?(String) != false || raise("Passed value for field obj.monetary_amount is not the expected type, validation failed.")
212
+ obj.quantity&.is_a?(String) != false || raise("Passed value for field obj.quantity is not the expected type, validation failed.")
213
+ end
214
+ end
215
+ end
216
+ end
217
+ end
218
+ end
@@ -0,0 +1,206 @@
1
+ # frozen_string_literal: true
2
+
3
+ require_relative "patient_reason_for_visit_code_qualifier"
4
+ require_relative "code_list_qualifier_code"
5
+ require_relative "date_time_period_format_qualifier"
6
+ require "ostruct"
7
+ require "json"
8
+
9
+ module CandidApiClient
10
+ module HealthCareCodeInformation
11
+ module V1
12
+ module Types
13
+ # This corresponds to PR or APR code qualifier values.
14
+ class PatientReasonForVisitNew
15
+ # @return [CandidApiClient::HealthCareCodeInformation::V1::Types::PatientReasonForVisitCodeQualifier]
16
+ attr_reader :patient_reason_for_visit_code_qualifier
17
+ # @return [String]
18
+ attr_reader :patient_reason_for_visit
19
+ # @return [CandidApiClient::HealthCareCodeInformation::V1::Types::CodeListQualifierCode]
20
+ attr_reader :code_list_qualifier
21
+ # @return [String] A code string whose interpretation depends on the code_list_qualifier being set.
22
+ # You do not need to set this field generally, instead it is provided as advisory
23
+ # context on how this HealthCareCodeInformation's data will be available in
24
+ # reporting.
25
+ attr_reader :industry_code_1
26
+ # @return [String] A code string whose interpretation depends on the code_list_qualifier being set.
27
+ # You do not need to set this field generally, instead it is provided as advisory
28
+ # context on how this HealthCareCodeInformation's data will be available in
29
+ # reporting.
30
+ attr_reader :industry_code_2
31
+ # @return [String] A code string whose interpretation depends on the code_list_qualifier being set.
32
+ # You do not need to set this field generally, instead it is provided as advisory
33
+ # context on how this HealthCareCodeInformation's data will be available in
34
+ # reporting.
35
+ attr_reader :industry_code_3
36
+ # @return [String] A code string whose interpretation depends on the code_list_qualifier being set.
37
+ # You do not need to set this field generally, instead it is provided as advisory
38
+ # context on how this HealthCareCodeInformation's data will be available in
39
+ # reporting.
40
+ attr_reader :industry_code_4
41
+ # @return [CandidApiClient::HealthCareCodeInformation::V1::Types::DateTimePeriodFormatQualifier] Controls how the date_time_period field is interpreted and is submitted
42
+ # as part of claim process.
43
+ # You do not need to set this field generally, instead it is provided as advisory
44
+ # context on how this HealthCareCodeInformation's data will be available in
45
+ # reporting.
46
+ attr_reader :date_time_period_format_qualifier
47
+ # @return [String] A string, formatted according to date_time_period_format_qualifier, which
48
+ # ultimately represents the date time period in which an information object
49
+ # is covering.
50
+ # You do not need to set this field generally, instead it is provided as advisory
51
+ # context on how this HealthCareCodeInformation's data will be available in
52
+ # reporting.
53
+ attr_reader :date_time_period
54
+ # @return [String] A decimal used to represent ValueInformation results.
55
+ # You do not need to set this field generally, instead it is provided as advisory
56
+ # context on how this HealthCareCodeInformation's data will be available in
57
+ # reporting.
58
+ attr_reader :monetary_amount
59
+ # @return [String] You do not need to set this field generally, instead it is provided as advisory
60
+ # context on how this HealthCareCodeInformation's data will be available in
61
+ # reporting.
62
+ attr_reader :quantity
63
+ # @return [OpenStruct] Additional properties unmapped to the current class definition
64
+ attr_reader :additional_properties
65
+ # @return [Object]
66
+ attr_reader :_field_set
67
+ protected :_field_set
68
+
69
+ OMIT = Object.new
70
+
71
+ # @param patient_reason_for_visit_code_qualifier [CandidApiClient::HealthCareCodeInformation::V1::Types::PatientReasonForVisitCodeQualifier]
72
+ # @param patient_reason_for_visit [String]
73
+ # @param code_list_qualifier [CandidApiClient::HealthCareCodeInformation::V1::Types::CodeListQualifierCode]
74
+ # @param industry_code_1 [String] A code string whose interpretation depends on the code_list_qualifier being set.
75
+ # You do not need to set this field generally, instead it is provided as advisory
76
+ # context on how this HealthCareCodeInformation's data will be available in
77
+ # reporting.
78
+ # @param industry_code_2 [String] A code string whose interpretation depends on the code_list_qualifier being set.
79
+ # You do not need to set this field generally, instead it is provided as advisory
80
+ # context on how this HealthCareCodeInformation's data will be available in
81
+ # reporting.
82
+ # @param industry_code_3 [String] A code string whose interpretation depends on the code_list_qualifier being set.
83
+ # You do not need to set this field generally, instead it is provided as advisory
84
+ # context on how this HealthCareCodeInformation's data will be available in
85
+ # reporting.
86
+ # @param industry_code_4 [String] A code string whose interpretation depends on the code_list_qualifier being set.
87
+ # You do not need to set this field generally, instead it is provided as advisory
88
+ # context on how this HealthCareCodeInformation's data will be available in
89
+ # reporting.
90
+ # @param date_time_period_format_qualifier [CandidApiClient::HealthCareCodeInformation::V1::Types::DateTimePeriodFormatQualifier] Controls how the date_time_period field is interpreted and is submitted
91
+ # as part of claim process.
92
+ # You do not need to set this field generally, instead it is provided as advisory
93
+ # context on how this HealthCareCodeInformation's data will be available in
94
+ # reporting.
95
+ # @param date_time_period [String] A string, formatted according to date_time_period_format_qualifier, which
96
+ # ultimately represents the date time period in which an information object
97
+ # is covering.
98
+ # You do not need to set this field generally, instead it is provided as advisory
99
+ # context on how this HealthCareCodeInformation's data will be available in
100
+ # reporting.
101
+ # @param monetary_amount [String] A decimal used to represent ValueInformation results.
102
+ # You do not need to set this field generally, instead it is provided as advisory
103
+ # context on how this HealthCareCodeInformation's data will be available in
104
+ # reporting.
105
+ # @param quantity [String] You do not need to set this field generally, instead it is provided as advisory
106
+ # context on how this HealthCareCodeInformation's data will be available in
107
+ # reporting.
108
+ # @param additional_properties [OpenStruct] Additional properties unmapped to the current class definition
109
+ # @return [CandidApiClient::HealthCareCodeInformation::V1::Types::PatientReasonForVisitNew]
110
+ def initialize(patient_reason_for_visit_code_qualifier:, patient_reason_for_visit:,
111
+ code_list_qualifier: OMIT, industry_code_1: OMIT, industry_code_2: OMIT, industry_code_3: OMIT, industry_code_4: OMIT, date_time_period_format_qualifier: OMIT, date_time_period: OMIT, monetary_amount: OMIT, quantity: OMIT, additional_properties: nil)
112
+ @patient_reason_for_visit_code_qualifier = patient_reason_for_visit_code_qualifier
113
+ @patient_reason_for_visit = patient_reason_for_visit
114
+ @code_list_qualifier = code_list_qualifier if code_list_qualifier != OMIT
115
+ @industry_code_1 = industry_code_1 if industry_code_1 != OMIT
116
+ @industry_code_2 = industry_code_2 if industry_code_2 != OMIT
117
+ @industry_code_3 = industry_code_3 if industry_code_3 != OMIT
118
+ @industry_code_4 = industry_code_4 if industry_code_4 != OMIT
119
+ if date_time_period_format_qualifier != OMIT
120
+ @date_time_period_format_qualifier = date_time_period_format_qualifier
121
+ end
122
+ @date_time_period = date_time_period if date_time_period != OMIT
123
+ @monetary_amount = monetary_amount if monetary_amount != OMIT
124
+ @quantity = quantity if quantity != OMIT
125
+ @additional_properties = additional_properties
126
+ @_field_set = {
127
+ "patient_reason_for_visit_code_qualifier": patient_reason_for_visit_code_qualifier,
128
+ "patient_reason_for_visit": patient_reason_for_visit,
129
+ "code_list_qualifier": code_list_qualifier,
130
+ "industry_code_1": industry_code_1,
131
+ "industry_code_2": industry_code_2,
132
+ "industry_code_3": industry_code_3,
133
+ "industry_code_4": industry_code_4,
134
+ "date_time_period_format_qualifier": date_time_period_format_qualifier,
135
+ "date_time_period": date_time_period,
136
+ "monetary_amount": monetary_amount,
137
+ "quantity": quantity
138
+ }.reject do |_k, v|
139
+ v == OMIT
140
+ end
141
+ end
142
+
143
+ # Deserialize a JSON object to an instance of PatientReasonForVisitNew
144
+ #
145
+ # @param json_object [String]
146
+ # @return [CandidApiClient::HealthCareCodeInformation::V1::Types::PatientReasonForVisitNew]
147
+ def self.from_json(json_object:)
148
+ struct = JSON.parse(json_object, object_class: OpenStruct)
149
+ patient_reason_for_visit_code_qualifier = struct["patient_reason_for_visit_code_qualifier"]
150
+ patient_reason_for_visit = struct["patient_reason_for_visit"]
151
+ code_list_qualifier = struct["code_list_qualifier"]
152
+ industry_code_1 = struct["industry_code_1"]
153
+ industry_code_2 = struct["industry_code_2"]
154
+ industry_code_3 = struct["industry_code_3"]
155
+ industry_code_4 = struct["industry_code_4"]
156
+ date_time_period_format_qualifier = struct["date_time_period_format_qualifier"]
157
+ date_time_period = struct["date_time_period"]
158
+ monetary_amount = struct["monetary_amount"]
159
+ quantity = struct["quantity"]
160
+ new(
161
+ patient_reason_for_visit_code_qualifier: patient_reason_for_visit_code_qualifier,
162
+ patient_reason_for_visit: patient_reason_for_visit,
163
+ code_list_qualifier: code_list_qualifier,
164
+ industry_code_1: industry_code_1,
165
+ industry_code_2: industry_code_2,
166
+ industry_code_3: industry_code_3,
167
+ industry_code_4: industry_code_4,
168
+ date_time_period_format_qualifier: date_time_period_format_qualifier,
169
+ date_time_period: date_time_period,
170
+ monetary_amount: monetary_amount,
171
+ quantity: quantity,
172
+ additional_properties: struct
173
+ )
174
+ end
175
+
176
+ # Serialize an instance of PatientReasonForVisitNew to a JSON object
177
+ #
178
+ # @return [String]
179
+ def to_json(*_args)
180
+ @_field_set&.to_json
181
+ end
182
+
183
+ # Leveraged for Union-type generation, validate_raw attempts to parse the given
184
+ # hash and check each fields type against the current object's property
185
+ # definitions.
186
+ #
187
+ # @param obj [Object]
188
+ # @return [Void]
189
+ def self.validate_raw(obj:)
190
+ obj.patient_reason_for_visit_code_qualifier.is_a?(CandidApiClient::HealthCareCodeInformation::V1::Types::PatientReasonForVisitCodeQualifier) != false || raise("Passed value for field obj.patient_reason_for_visit_code_qualifier is not the expected type, validation failed.")
191
+ obj.patient_reason_for_visit.is_a?(String) != false || raise("Passed value for field obj.patient_reason_for_visit is not the expected type, validation failed.")
192
+ obj.code_list_qualifier&.is_a?(CandidApiClient::HealthCareCodeInformation::V1::Types::CodeListQualifierCode) != false || raise("Passed value for field obj.code_list_qualifier is not the expected type, validation failed.")
193
+ obj.industry_code_1&.is_a?(String) != false || raise("Passed value for field obj.industry_code_1 is not the expected type, validation failed.")
194
+ obj.industry_code_2&.is_a?(String) != false || raise("Passed value for field obj.industry_code_2 is not the expected type, validation failed.")
195
+ obj.industry_code_3&.is_a?(String) != false || raise("Passed value for field obj.industry_code_3 is not the expected type, validation failed.")
196
+ obj.industry_code_4&.is_a?(String) != false || raise("Passed value for field obj.industry_code_4 is not the expected type, validation failed.")
197
+ obj.date_time_period_format_qualifier&.is_a?(CandidApiClient::HealthCareCodeInformation::V1::Types::DateTimePeriodFormatQualifier) != false || raise("Passed value for field obj.date_time_period_format_qualifier is not the expected type, validation failed.")
198
+ obj.date_time_period&.is_a?(String) != false || raise("Passed value for field obj.date_time_period is not the expected type, validation failed.")
199
+ obj.monetary_amount&.is_a?(String) != false || raise("Passed value for field obj.monetary_amount is not the expected type, validation failed.")
200
+ obj.quantity&.is_a?(String) != false || raise("Passed value for field obj.quantity is not the expected type, validation failed.")
201
+ end
202
+ end
203
+ end
204
+ end
205
+ end
206
+ end
@@ -0,0 +1,215 @@
1
+ # frozen_string_literal: true
2
+
3
+ require_relative "principal_diagnosis_code_qualifier"
4
+ require_relative "present_on_admission_indicator_code"
5
+ require_relative "code_list_qualifier_code"
6
+ require_relative "date_time_period_format_qualifier"
7
+ require "ostruct"
8
+ require "json"
9
+
10
+ module CandidApiClient
11
+ module HealthCareCodeInformation
12
+ module V1
13
+ module Types
14
+ # This corresponds to BK or ABK code qualifier values.
15
+ class PrincipalDiagnosisNew
16
+ # @return [CandidApiClient::HealthCareCodeInformation::V1::Types::PrincipalDiagnosisCodeQualifier]
17
+ attr_reader :principal_diagnosis_code_qualifier
18
+ # @return [String]
19
+ attr_reader :primary_diagnosis_code
20
+ # @return [CandidApiClient::HealthCareCodeInformation::V1::Types::PresentOnAdmissionIndicatorCode]
21
+ attr_reader :present_on_admission_indicator
22
+ # @return [CandidApiClient::HealthCareCodeInformation::V1::Types::CodeListQualifierCode]
23
+ attr_reader :code_list_qualifier
24
+ # @return [String] A code string whose interpretation depends on the code_list_qualifier being set.
25
+ # You do not need to set this field generally, instead it is provided as advisory
26
+ # context on how this HealthCareCodeInformation's data will be available in
27
+ # reporting.
28
+ attr_reader :industry_code_1
29
+ # @return [String] A code string whose interpretation depends on the code_list_qualifier being set.
30
+ # You do not need to set this field generally, instead it is provided as advisory
31
+ # context on how this HealthCareCodeInformation's data will be available in
32
+ # reporting.
33
+ attr_reader :industry_code_2
34
+ # @return [String] A code string whose interpretation depends on the code_list_qualifier being set.
35
+ # You do not need to set this field generally, instead it is provided as advisory
36
+ # context on how this HealthCareCodeInformation's data will be available in
37
+ # reporting.
38
+ attr_reader :industry_code_3
39
+ # @return [String] A code string whose interpretation depends on the code_list_qualifier being set.
40
+ # You do not need to set this field generally, instead it is provided as advisory
41
+ # context on how this HealthCareCodeInformation's data will be available in
42
+ # reporting.
43
+ attr_reader :industry_code_4
44
+ # @return [CandidApiClient::HealthCareCodeInformation::V1::Types::DateTimePeriodFormatQualifier] Controls how the date_time_period field is interpreted and is submitted
45
+ # as part of claim process.
46
+ # You do not need to set this field generally, instead it is provided as advisory
47
+ # context on how this HealthCareCodeInformation's data will be available in
48
+ # reporting.
49
+ attr_reader :date_time_period_format_qualifier
50
+ # @return [String] A string, formatted according to date_time_period_format_qualifier, which
51
+ # ultimately represents the date time period in which an information object
52
+ # is covering.
53
+ # You do not need to set this field generally, instead it is provided as advisory
54
+ # context on how this HealthCareCodeInformation's data will be available in
55
+ # reporting.
56
+ attr_reader :date_time_period
57
+ # @return [String] A decimal used to represent ValueInformation results.
58
+ # You do not need to set this field generally, instead it is provided as advisory
59
+ # context on how this HealthCareCodeInformation's data will be available in
60
+ # reporting.
61
+ attr_reader :monetary_amount
62
+ # @return [String] You do not need to set this field generally, instead it is provided as advisory
63
+ # context on how this HealthCareCodeInformation's data will be available in
64
+ # reporting.
65
+ attr_reader :quantity
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 principal_diagnosis_code_qualifier [CandidApiClient::HealthCareCodeInformation::V1::Types::PrincipalDiagnosisCodeQualifier]
75
+ # @param primary_diagnosis_code [String]
76
+ # @param present_on_admission_indicator [CandidApiClient::HealthCareCodeInformation::V1::Types::PresentOnAdmissionIndicatorCode]
77
+ # @param code_list_qualifier [CandidApiClient::HealthCareCodeInformation::V1::Types::CodeListQualifierCode]
78
+ # @param industry_code_1 [String] A code string whose interpretation depends on the code_list_qualifier being set.
79
+ # You do not need to set this field generally, instead it is provided as advisory
80
+ # context on how this HealthCareCodeInformation's data will be available in
81
+ # reporting.
82
+ # @param industry_code_2 [String] A code string whose interpretation depends on the code_list_qualifier being set.
83
+ # You do not need to set this field generally, instead it is provided as advisory
84
+ # context on how this HealthCareCodeInformation's data will be available in
85
+ # reporting.
86
+ # @param industry_code_3 [String] A code string whose interpretation depends on the code_list_qualifier being set.
87
+ # You do not need to set this field generally, instead it is provided as advisory
88
+ # context on how this HealthCareCodeInformation's data will be available in
89
+ # reporting.
90
+ # @param industry_code_4 [String] A code string whose interpretation depends on the code_list_qualifier being set.
91
+ # You do not need to set this field generally, instead it is provided as advisory
92
+ # context on how this HealthCareCodeInformation's data will be available in
93
+ # reporting.
94
+ # @param date_time_period_format_qualifier [CandidApiClient::HealthCareCodeInformation::V1::Types::DateTimePeriodFormatQualifier] Controls how the date_time_period field is interpreted and is submitted
95
+ # as part of claim process.
96
+ # You do not need to set this field generally, instead it is provided as advisory
97
+ # context on how this HealthCareCodeInformation's data will be available in
98
+ # reporting.
99
+ # @param date_time_period [String] A string, formatted according to date_time_period_format_qualifier, which
100
+ # ultimately represents the date time period in which an information object
101
+ # is covering.
102
+ # You do not need to set this field generally, instead it is provided as advisory
103
+ # context on how this HealthCareCodeInformation's data will be available in
104
+ # reporting.
105
+ # @param monetary_amount [String] A decimal used to represent ValueInformation results.
106
+ # You do not need to set this field generally, instead it is provided as advisory
107
+ # context on how this HealthCareCodeInformation's data will be available in
108
+ # reporting.
109
+ # @param quantity [String] You do not need to set this field generally, instead it is provided as advisory
110
+ # context on how this HealthCareCodeInformation's data will be available in
111
+ # reporting.
112
+ # @param additional_properties [OpenStruct] Additional properties unmapped to the current class definition
113
+ # @return [CandidApiClient::HealthCareCodeInformation::V1::Types::PrincipalDiagnosisNew]
114
+ def initialize(principal_diagnosis_code_qualifier:, primary_diagnosis_code:,
115
+ present_on_admission_indicator: OMIT, code_list_qualifier: OMIT, industry_code_1: OMIT, industry_code_2: OMIT, industry_code_3: OMIT, industry_code_4: OMIT, date_time_period_format_qualifier: OMIT, date_time_period: OMIT, monetary_amount: OMIT, quantity: OMIT, additional_properties: nil)
116
+ @principal_diagnosis_code_qualifier = principal_diagnosis_code_qualifier
117
+ @primary_diagnosis_code = primary_diagnosis_code
118
+ @present_on_admission_indicator = present_on_admission_indicator if present_on_admission_indicator != OMIT
119
+ @code_list_qualifier = code_list_qualifier if code_list_qualifier != OMIT
120
+ @industry_code_1 = industry_code_1 if industry_code_1 != OMIT
121
+ @industry_code_2 = industry_code_2 if industry_code_2 != OMIT
122
+ @industry_code_3 = industry_code_3 if industry_code_3 != OMIT
123
+ @industry_code_4 = industry_code_4 if industry_code_4 != OMIT
124
+ if date_time_period_format_qualifier != OMIT
125
+ @date_time_period_format_qualifier = date_time_period_format_qualifier
126
+ end
127
+ @date_time_period = date_time_period if date_time_period != OMIT
128
+ @monetary_amount = monetary_amount if monetary_amount != OMIT
129
+ @quantity = quantity if quantity != OMIT
130
+ @additional_properties = additional_properties
131
+ @_field_set = {
132
+ "principal_diagnosis_code_qualifier": principal_diagnosis_code_qualifier,
133
+ "primary_diagnosis_code": primary_diagnosis_code,
134
+ "present_on_admission_indicator": present_on_admission_indicator,
135
+ "code_list_qualifier": code_list_qualifier,
136
+ "industry_code_1": industry_code_1,
137
+ "industry_code_2": industry_code_2,
138
+ "industry_code_3": industry_code_3,
139
+ "industry_code_4": industry_code_4,
140
+ "date_time_period_format_qualifier": date_time_period_format_qualifier,
141
+ "date_time_period": date_time_period,
142
+ "monetary_amount": monetary_amount,
143
+ "quantity": quantity
144
+ }.reject do |_k, v|
145
+ v == OMIT
146
+ end
147
+ end
148
+
149
+ # Deserialize a JSON object to an instance of PrincipalDiagnosisNew
150
+ #
151
+ # @param json_object [String]
152
+ # @return [CandidApiClient::HealthCareCodeInformation::V1::Types::PrincipalDiagnosisNew]
153
+ def self.from_json(json_object:)
154
+ struct = JSON.parse(json_object, object_class: OpenStruct)
155
+ principal_diagnosis_code_qualifier = struct["principal_diagnosis_code_qualifier"]
156
+ primary_diagnosis_code = struct["primary_diagnosis_code"]
157
+ present_on_admission_indicator = struct["present_on_admission_indicator"]
158
+ code_list_qualifier = struct["code_list_qualifier"]
159
+ industry_code_1 = struct["industry_code_1"]
160
+ industry_code_2 = struct["industry_code_2"]
161
+ industry_code_3 = struct["industry_code_3"]
162
+ industry_code_4 = struct["industry_code_4"]
163
+ date_time_period_format_qualifier = struct["date_time_period_format_qualifier"]
164
+ date_time_period = struct["date_time_period"]
165
+ monetary_amount = struct["monetary_amount"]
166
+ quantity = struct["quantity"]
167
+ new(
168
+ principal_diagnosis_code_qualifier: principal_diagnosis_code_qualifier,
169
+ primary_diagnosis_code: primary_diagnosis_code,
170
+ present_on_admission_indicator: present_on_admission_indicator,
171
+ code_list_qualifier: code_list_qualifier,
172
+ industry_code_1: industry_code_1,
173
+ industry_code_2: industry_code_2,
174
+ industry_code_3: industry_code_3,
175
+ industry_code_4: industry_code_4,
176
+ date_time_period_format_qualifier: date_time_period_format_qualifier,
177
+ date_time_period: date_time_period,
178
+ monetary_amount: monetary_amount,
179
+ quantity: quantity,
180
+ additional_properties: struct
181
+ )
182
+ end
183
+
184
+ # Serialize an instance of PrincipalDiagnosisNew to a JSON object
185
+ #
186
+ # @return [String]
187
+ def to_json(*_args)
188
+ @_field_set&.to_json
189
+ end
190
+
191
+ # Leveraged for Union-type generation, validate_raw attempts to parse the given
192
+ # hash and check each fields type against the current object's property
193
+ # definitions.
194
+ #
195
+ # @param obj [Object]
196
+ # @return [Void]
197
+ def self.validate_raw(obj:)
198
+ obj.principal_diagnosis_code_qualifier.is_a?(CandidApiClient::HealthCareCodeInformation::V1::Types::PrincipalDiagnosisCodeQualifier) != false || raise("Passed value for field obj.principal_diagnosis_code_qualifier is not the expected type, validation failed.")
199
+ obj.primary_diagnosis_code.is_a?(String) != false || raise("Passed value for field obj.primary_diagnosis_code is not the expected type, validation failed.")
200
+ obj.present_on_admission_indicator&.is_a?(CandidApiClient::HealthCareCodeInformation::V1::Types::PresentOnAdmissionIndicatorCode) != false || raise("Passed value for field obj.present_on_admission_indicator is not the expected type, validation failed.")
201
+ obj.code_list_qualifier&.is_a?(CandidApiClient::HealthCareCodeInformation::V1::Types::CodeListQualifierCode) != false || raise("Passed value for field obj.code_list_qualifier is not the expected type, validation failed.")
202
+ obj.industry_code_1&.is_a?(String) != false || raise("Passed value for field obj.industry_code_1 is not the expected type, validation failed.")
203
+ obj.industry_code_2&.is_a?(String) != false || raise("Passed value for field obj.industry_code_2 is not the expected type, validation failed.")
204
+ obj.industry_code_3&.is_a?(String) != false || raise("Passed value for field obj.industry_code_3 is not the expected type, validation failed.")
205
+ obj.industry_code_4&.is_a?(String) != false || raise("Passed value for field obj.industry_code_4 is not the expected type, validation failed.")
206
+ obj.date_time_period_format_qualifier&.is_a?(CandidApiClient::HealthCareCodeInformation::V1::Types::DateTimePeriodFormatQualifier) != false || raise("Passed value for field obj.date_time_period_format_qualifier is not the expected type, validation failed.")
207
+ obj.date_time_period&.is_a?(String) != false || raise("Passed value for field obj.date_time_period is not the expected type, validation failed.")
208
+ obj.monetary_amount&.is_a?(String) != false || raise("Passed value for field obj.monetary_amount is not the expected type, validation failed.")
209
+ obj.quantity&.is_a?(String) != false || raise("Passed value for field obj.quantity is not the expected type, validation failed.")
210
+ end
211
+ end
212
+ end
213
+ end
214
+ end
215
+ end