candidhealth 1.6.0 → 1.7.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (78) hide show
  1. checksums.yaml +4 -4
  2. data/lib/candidhealth/auth/default/client.rb +46 -0
  3. data/lib/candidhealth/credentialing/v_2/client.rb +342 -8
  4. data/lib/candidhealth/credentialing/v_2/types/base_credentialing_span.rb +143 -0
  5. data/lib/candidhealth/credentialing/v_2/types/facility_credentialing_span.rb +165 -0
  6. data/lib/candidhealth/credentialing/v_2/types/facility_credentialing_span_page.rb +88 -0
  7. data/lib/candidhealth/credentialing/v_2/types/provider_credentialing_span.rb +34 -34
  8. data/lib/candidhealth/health_care_code_information/client.rb +30 -0
  9. data/lib/candidhealth/health_care_code_information/v_1/client.rb +268 -0
  10. data/lib/candidhealth/health_care_code_information/v_1/types/admitting_diagnosis.rb +236 -0
  11. data/lib/candidhealth/health_care_code_information/v_1/types/admitting_diagnosis_code_qualifier.rb +14 -0
  12. data/lib/candidhealth/health_care_code_information/v_1/types/code_list_qualifier_code.rb +1068 -0
  13. data/lib/candidhealth/health_care_code_information/v_1/types/condition_code.rb +71 -0
  14. data/lib/candidhealth/health_care_code_information/v_1/types/condition_information.rb +237 -0
  15. data/lib/candidhealth/health_care_code_information/v_1/types/condition_information_code_qualifier.rb +13 -0
  16. data/lib/candidhealth/health_care_code_information/v_1/types/date_time_period_format_qualifier.rb +54 -0
  17. data/lib/candidhealth/health_care_code_information/v_1/types/diagnosis_related_group.rb +236 -0
  18. data/lib/candidhealth/health_care_code_information/v_1/types/diagnosis_related_group_code_qualifier.rb +13 -0
  19. data/lib/candidhealth/health_care_code_information/v_1/types/external_cause_of_injury.rb +245 -0
  20. data/lib/candidhealth/health_care_code_information/v_1/types/external_cause_of_injury_code_qualifier.rb +14 -0
  21. data/lib/candidhealth/health_care_code_information/v_1/types/health_care_code_information.rb +218 -0
  22. data/lib/candidhealth/health_care_code_information/v_1/types/health_care_code_information_get_all_response.rb +227 -0
  23. data/lib/candidhealth/health_care_code_information/v_1/types/health_care_code_information_new.rb +188 -0
  24. data/lib/candidhealth/health_care_code_information/v_1/types/health_care_code_information_update.rb +225 -0
  25. data/lib/candidhealth/health_care_code_information/v_1/types/occurrence_code.rb +71 -0
  26. data/lib/candidhealth/health_care_code_information/v_1/types/occurrence_information.rb +249 -0
  27. data/lib/candidhealth/health_care_code_information/v_1/types/occurrence_information_code_qualifier.rb +13 -0
  28. data/lib/candidhealth/health_care_code_information/v_1/types/occurrence_span_code.rb +25 -0
  29. data/lib/candidhealth/health_care_code_information/v_1/types/occurrence_span_code_qualifier.rb +13 -0
  30. data/lib/candidhealth/health_care_code_information/v_1/types/occurrence_span_information.rb +252 -0
  31. data/lib/candidhealth/health_care_code_information/v_1/types/other_diagnosis_information.rb +245 -0
  32. data/lib/candidhealth/health_care_code_information/v_1/types/other_diagnosis_information_code_qualifier.rb +14 -0
  33. data/lib/candidhealth/health_care_code_information/v_1/types/other_procedure_information.rb +248 -0
  34. data/lib/candidhealth/health_care_code_information/v_1/types/other_procedure_information_code_qualifier.rb +14 -0
  35. data/lib/candidhealth/health_care_code_information/v_1/types/patient_reason_for_visit.rb +236 -0
  36. data/lib/candidhealth/health_care_code_information/v_1/types/patient_reason_for_visit_code_qualifier.rb +14 -0
  37. data/lib/candidhealth/health_care_code_information/v_1/types/present_on_admission_indicator_code.rb +17 -0
  38. data/lib/candidhealth/health_care_code_information/v_1/types/principal_diagnosis.rb +245 -0
  39. data/lib/candidhealth/health_care_code_information/v_1/types/principal_diagnosis_code_qualifier.rb +14 -0
  40. data/lib/candidhealth/health_care_code_information/v_1/types/principal_procedure_information.rb +246 -0
  41. data/lib/candidhealth/health_care_code_information/v_1/types/principal_procedure_information_code_qualifier.rb +15 -0
  42. data/lib/candidhealth/health_care_code_information/v_1/types/rd_8_date.rb +72 -0
  43. data/lib/candidhealth/health_care_code_information/v_1/types/set_or_clear_admitting_diagnosis.rb +69 -0
  44. data/lib/candidhealth/health_care_code_information/v_1/types/set_or_clear_diagnosis_related_group.rb +69 -0
  45. data/lib/candidhealth/health_care_code_information/v_1/types/set_or_clear_principal_diagnosis.rb +69 -0
  46. data/lib/candidhealth/health_care_code_information/v_1/types/set_or_clear_principal_procedure_information.rb +71 -0
  47. data/lib/candidhealth/health_care_code_information/v_1/types/treatment_code_information.rb +236 -0
  48. data/lib/candidhealth/health_care_code_information/v_1/types/treatment_code_qualifier.rb +13 -0
  49. data/lib/candidhealth/health_care_code_information/v_1/types/value_code.rb +119 -0
  50. data/lib/candidhealth/health_care_code_information/v_1/types/value_code_qualifier.rb +13 -0
  51. data/lib/candidhealth/health_care_code_information/v_1/types/value_information.rb +245 -0
  52. data/lib/candidhealth/patient_ar/client.rb +30 -0
  53. data/lib/candidhealth/patient_ar/v_1/client.rb +161 -0
  54. data/lib/candidhealth/patient_ar/v_1/types/insurance_adjustment_info.rb +60 -0
  55. data/lib/candidhealth/patient_ar/v_1/types/insurance_payment_info.rb +60 -0
  56. data/lib/candidhealth/patient_ar/v_1/types/invalid_filters_error_type.rb +60 -0
  57. data/lib/candidhealth/patient_ar/v_1/types/inventory_record.rb +101 -0
  58. data/lib/candidhealth/patient_ar/v_1/types/invoice_itemization_response.rb +103 -0
  59. data/lib/candidhealth/patient_ar/v_1/types/list_inventory_paged_response.rb +77 -0
  60. data/lib/candidhealth/patient_ar/v_1/types/non_insurance_adjustment_info.rb +60 -0
  61. data/lib/candidhealth/patient_ar/v_1/types/non_insurance_payment_info.rb +60 -0
  62. data/lib/candidhealth/patient_ar/v_1/types/patient_adjustment_info.rb +60 -0
  63. data/lib/candidhealth/patient_ar/v_1/types/patient_ar_status.rb +14 -0
  64. data/lib/candidhealth/patient_ar/v_1/types/patient_payment_allocation.rb +76 -0
  65. data/lib/candidhealth/patient_ar/v_1/types/patient_payment_info.rb +75 -0
  66. data/lib/candidhealth/patient_ar/v_1/types/service_line_itemization.rb +210 -0
  67. data/lib/candidhealth/pre_encounter/patients/v_1/client.rb +132 -0
  68. data/lib/candidhealth/pre_encounter/patients/v_1/types/mutable_patient.rb +16 -2
  69. data/lib/candidhealth/pre_encounter/patients/v_1/types/mutable_patient_with_mrn.rb +16 -2
  70. data/lib/candidhealth/pre_encounter/patients/v_1/types/origination_detail.rb +104 -0
  71. data/lib/candidhealth/pre_encounter/patients/v_1/types/patient.rb +16 -2
  72. data/lib/candidhealth/pre_encounter/patients/v_1/types/referral_source.rb +18 -0
  73. data/lib/candidhealth/pre_encounter/patients/v_1/types/referral_type.rb +16 -0
  74. data/lib/candidhealth/pre_encounter/patients/v_1/types/specialization_category.rb +42 -0
  75. data/lib/candidhealth.rb +21 -7
  76. data/lib/requests.rb +2 -2
  77. data/lib/types_export.rb +72 -9
  78. metadata +68 -2
@@ -0,0 +1,71 @@
1
+ # frozen_string_literal: true
2
+
3
+ module CandidApiClient
4
+ module HealthCareCodeInformation
5
+ module V1
6
+ module Types
7
+ class OccurrenceCode
8
+ C_01 = "01"
9
+ C_02 = "02"
10
+ C_03 = "03"
11
+ C_04 = "04"
12
+ C_05 = "05"
13
+ C_06 = "06"
14
+ C_09 = "09"
15
+ C_10 = "10"
16
+ C_11 = "11"
17
+ C_12 = "12"
18
+ C_16 = "16"
19
+ C_17 = "17"
20
+ C_18 = "18"
21
+ C_19 = "19"
22
+ C_20 = "20"
23
+ C_21 = "21"
24
+ C_22 = "22"
25
+ C_24 = "24"
26
+ C_25 = "25"
27
+ C_26 = "26"
28
+ C_27 = "27"
29
+ C_28 = "28"
30
+ C_29 = "29"
31
+ C_30 = "30"
32
+ C_31 = "31"
33
+ C_32 = "32"
34
+ C_33 = "33"
35
+ C_34 = "34"
36
+ C_35 = "35"
37
+ C_36 = "36"
38
+ C_37 = "37"
39
+ C_38 = "38"
40
+ C_39 = "39"
41
+ C_40 = "40"
42
+ C_41 = "41"
43
+ C_42 = "42"
44
+ C_43 = "43"
45
+ C_44 = "44"
46
+ C_45 = "45"
47
+ C_46 = "46"
48
+ C_47 = "47"
49
+ C_50 = "50"
50
+ C_51 = "51"
51
+ C_52 = "52"
52
+ C_54 = "54"
53
+ C_55 = "55"
54
+ C_56 = "56"
55
+ C_61 = "61"
56
+ C_62 = "62"
57
+ CA_1 = "A1"
58
+ CA_2 = "A2"
59
+ CA_3 = "A3"
60
+ CA_4 = "A4"
61
+ CB_1 = "B1"
62
+ CB_2 = "B2"
63
+ CB_3 = "B3"
64
+ CC_1 = "C1"
65
+ CC_2 = "C2"
66
+ CC_3 = "C3"
67
+ end
68
+ end
69
+ end
70
+ end
71
+ end
@@ -0,0 +1,249 @@
1
+ # frozen_string_literal: true
2
+
3
+ require_relative "occurrence_information_code_qualifier"
4
+ require_relative "occurrence_code"
5
+ require "date"
6
+ require_relative "code_list_qualifier_code"
7
+ require_relative "date_time_period_format_qualifier"
8
+ require "ostruct"
9
+ require "json"
10
+
11
+ module CandidApiClient
12
+ module HealthCareCodeInformation
13
+ module V1
14
+ module Types
15
+ # This corresponds to the BH code qualifier value.
16
+ class OccurrenceInformation
17
+ # @return [CandidApiClient::HealthCareCodeInformation::V1::Types::OccurrenceInformationCodeQualifier]
18
+ attr_reader :occurrence_code_qualifier
19
+ # @return [CandidApiClient::HealthCareCodeInformation::V1::Types::OccurrenceCode]
20
+ attr_reader :occurrence_code
21
+ # @return [DateTime]
22
+ attr_reader :occurrence_date
23
+ # @return [String] The id of this health care code information if it is already stored.
24
+ # If this is not set, this is referring to a new health care code information to
25
+ # be added
26
+ # to the encounter. If it is set, this refers to an update of an existing health
27
+ # care code
28
+ # information object on the encounter.
29
+ attr_reader :id
30
+ # @return [String] The encounter_id of this health care code information if it is already stored.
31
+ # This will be set by the server in responses, but clients are not expected to set
32
+ # it.
33
+ attr_reader :encounter_id
34
+ # @return [CandidApiClient::HealthCareCodeInformation::V1::Types::CodeListQualifierCode]
35
+ attr_reader :code_list_qualifier
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_1
41
+ # @return [String] A code string whose interpretation depends on the code_list_qualifier being set.
42
+ # You do not need to set this field generally, instead it is provided as advisory
43
+ # context on how this HealthCareCodeInformation's data will be available in
44
+ # reporting.
45
+ attr_reader :industry_code_2
46
+ # @return [String] A code string whose interpretation depends on the code_list_qualifier being set.
47
+ # You do not need to set this field generally, instead it is provided as advisory
48
+ # context on how this HealthCareCodeInformation's data will be available in
49
+ # reporting.
50
+ attr_reader :industry_code_3
51
+ # @return [String] A code string whose interpretation depends on the code_list_qualifier being set.
52
+ # You do not need to set this field generally, instead it is provided as advisory
53
+ # context on how this HealthCareCodeInformation's data will be available in
54
+ # reporting.
55
+ attr_reader :industry_code_4
56
+ # @return [CandidApiClient::HealthCareCodeInformation::V1::Types::DateTimePeriodFormatQualifier] Controls how the date_time_period field is interpreted and is submitted
57
+ # as part of claim process.
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 :date_time_period_format_qualifier
62
+ # @return [String] A string, formatted according to date_time_period_format_qualifier, which
63
+ # ultimately represents the date time period in which an information object
64
+ # is covering.
65
+ # You do not need to set this field generally, instead it is provided as advisory
66
+ # context on how this HealthCareCodeInformation's data will be available in
67
+ # reporting.
68
+ attr_reader :date_time_period
69
+ # @return [String] A decimal used to represent ValueInformation results.
70
+ # You do not need to set this field generally, instead it is provided as advisory
71
+ # context on how this HealthCareCodeInformation's data will be available in
72
+ # reporting.
73
+ attr_reader :monetary_amount
74
+ # @return [String] You do not need to set this field generally, instead it is provided as advisory
75
+ # context on how this HealthCareCodeInformation's data will be available in
76
+ # reporting.
77
+ attr_reader :quantity
78
+ # @return [OpenStruct] Additional properties unmapped to the current class definition
79
+ attr_reader :additional_properties
80
+ # @return [Object]
81
+ attr_reader :_field_set
82
+ protected :_field_set
83
+
84
+ OMIT = Object.new
85
+
86
+ # @param occurrence_code_qualifier [CandidApiClient::HealthCareCodeInformation::V1::Types::OccurrenceInformationCodeQualifier]
87
+ # @param occurrence_code [CandidApiClient::HealthCareCodeInformation::V1::Types::OccurrenceCode]
88
+ # @param occurrence_date [DateTime]
89
+ # @param id [String] The id of this health care code information if it is already stored.
90
+ # If this is not set, this is referring to a new health care code information to
91
+ # be added
92
+ # to the encounter. If it is set, this refers to an update of an existing health
93
+ # care code
94
+ # information object on the encounter.
95
+ # @param encounter_id [String] The encounter_id of this health care code information if it is already stored.
96
+ # This will be set by the server in responses, but clients are not expected to set
97
+ # it.
98
+ # @param code_list_qualifier [CandidApiClient::HealthCareCodeInformation::V1::Types::CodeListQualifierCode]
99
+ # @param industry_code_1 [String] A code string whose interpretation depends on the code_list_qualifier being set.
100
+ # You do not need to set this field generally, instead it is provided as advisory
101
+ # context on how this HealthCareCodeInformation's data will be available in
102
+ # reporting.
103
+ # @param industry_code_2 [String] A code string whose interpretation depends on the code_list_qualifier being set.
104
+ # You do not need to set this field generally, instead it is provided as advisory
105
+ # context on how this HealthCareCodeInformation's data will be available in
106
+ # reporting.
107
+ # @param industry_code_3 [String] A code string whose interpretation depends on the code_list_qualifier being set.
108
+ # You do not need to set this field generally, instead it is provided as advisory
109
+ # context on how this HealthCareCodeInformation's data will be available in
110
+ # reporting.
111
+ # @param industry_code_4 [String] A code string whose interpretation depends on the code_list_qualifier being set.
112
+ # You do not need to set this field generally, instead it is provided as advisory
113
+ # context on how this HealthCareCodeInformation's data will be available in
114
+ # reporting.
115
+ # @param date_time_period_format_qualifier [CandidApiClient::HealthCareCodeInformation::V1::Types::DateTimePeriodFormatQualifier] Controls how the date_time_period field is interpreted and is submitted
116
+ # as part of claim process.
117
+ # You do not need to set this field generally, instead it is provided as advisory
118
+ # context on how this HealthCareCodeInformation's data will be available in
119
+ # reporting.
120
+ # @param date_time_period [String] A string, formatted according to date_time_period_format_qualifier, which
121
+ # ultimately represents the date time period in which an information object
122
+ # is covering.
123
+ # You do not need to set this field generally, instead it is provided as advisory
124
+ # context on how this HealthCareCodeInformation's data will be available in
125
+ # reporting.
126
+ # @param monetary_amount [String] A decimal used to represent ValueInformation results.
127
+ # You do not need to set this field generally, instead it is provided as advisory
128
+ # context on how this HealthCareCodeInformation's data will be available in
129
+ # reporting.
130
+ # @param quantity [String] You do not need to set this field generally, instead it is provided as advisory
131
+ # context on how this HealthCareCodeInformation's data will be available in
132
+ # reporting.
133
+ # @param additional_properties [OpenStruct] Additional properties unmapped to the current class definition
134
+ # @return [CandidApiClient::HealthCareCodeInformation::V1::Types::OccurrenceInformation]
135
+ def initialize(occurrence_code_qualifier:, occurrence_code:, occurrence_date:, id: OMIT, encounter_id: OMIT,
136
+ 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)
137
+ @occurrence_code_qualifier = occurrence_code_qualifier
138
+ @occurrence_code = occurrence_code
139
+ @occurrence_date = occurrence_date
140
+ @id = id if id != OMIT
141
+ @encounter_id = encounter_id if encounter_id != OMIT
142
+ @code_list_qualifier = code_list_qualifier if code_list_qualifier != OMIT
143
+ @industry_code_1 = industry_code_1 if industry_code_1 != OMIT
144
+ @industry_code_2 = industry_code_2 if industry_code_2 != OMIT
145
+ @industry_code_3 = industry_code_3 if industry_code_3 != OMIT
146
+ @industry_code_4 = industry_code_4 if industry_code_4 != OMIT
147
+ if date_time_period_format_qualifier != OMIT
148
+ @date_time_period_format_qualifier = date_time_period_format_qualifier
149
+ end
150
+ @date_time_period = date_time_period if date_time_period != OMIT
151
+ @monetary_amount = monetary_amount if monetary_amount != OMIT
152
+ @quantity = quantity if quantity != OMIT
153
+ @additional_properties = additional_properties
154
+ @_field_set = {
155
+ "occurrence_code_qualifier": occurrence_code_qualifier,
156
+ "occurrence_code": occurrence_code,
157
+ "occurrence_date": occurrence_date,
158
+ "id": id,
159
+ "encounter_id": encounter_id,
160
+ "code_list_qualifier": code_list_qualifier,
161
+ "industry_code_1": industry_code_1,
162
+ "industry_code_2": industry_code_2,
163
+ "industry_code_3": industry_code_3,
164
+ "industry_code_4": industry_code_4,
165
+ "date_time_period_format_qualifier": date_time_period_format_qualifier,
166
+ "date_time_period": date_time_period,
167
+ "monetary_amount": monetary_amount,
168
+ "quantity": quantity
169
+ }.reject do |_k, v|
170
+ v == OMIT
171
+ end
172
+ end
173
+
174
+ # Deserialize a JSON object to an instance of OccurrenceInformation
175
+ #
176
+ # @param json_object [String]
177
+ # @return [CandidApiClient::HealthCareCodeInformation::V1::Types::OccurrenceInformation]
178
+ def self.from_json(json_object:)
179
+ struct = JSON.parse(json_object, object_class: OpenStruct)
180
+ parsed_json = JSON.parse(json_object)
181
+ occurrence_code_qualifier = struct["occurrence_code_qualifier"]
182
+ occurrence_code = struct["occurrence_code"]
183
+ occurrence_date = unless parsed_json["occurrence_date"].nil?
184
+ DateTime.parse(parsed_json["occurrence_date"])
185
+ end
186
+ id = struct["id"]
187
+ encounter_id = struct["encounter_id"]
188
+ code_list_qualifier = struct["code_list_qualifier"]
189
+ industry_code_1 = struct["industry_code_1"]
190
+ industry_code_2 = struct["industry_code_2"]
191
+ industry_code_3 = struct["industry_code_3"]
192
+ industry_code_4 = struct["industry_code_4"]
193
+ date_time_period_format_qualifier = struct["date_time_period_format_qualifier"]
194
+ date_time_period = struct["date_time_period"]
195
+ monetary_amount = struct["monetary_amount"]
196
+ quantity = struct["quantity"]
197
+ new(
198
+ occurrence_code_qualifier: occurrence_code_qualifier,
199
+ occurrence_code: occurrence_code,
200
+ occurrence_date: occurrence_date,
201
+ id: id,
202
+ encounter_id: encounter_id,
203
+ code_list_qualifier: code_list_qualifier,
204
+ industry_code_1: industry_code_1,
205
+ industry_code_2: industry_code_2,
206
+ industry_code_3: industry_code_3,
207
+ industry_code_4: industry_code_4,
208
+ date_time_period_format_qualifier: date_time_period_format_qualifier,
209
+ date_time_period: date_time_period,
210
+ monetary_amount: monetary_amount,
211
+ quantity: quantity,
212
+ additional_properties: struct
213
+ )
214
+ end
215
+
216
+ # Serialize an instance of OccurrenceInformation to a JSON object
217
+ #
218
+ # @return [String]
219
+ def to_json(*_args)
220
+ @_field_set&.to_json
221
+ end
222
+
223
+ # Leveraged for Union-type generation, validate_raw attempts to parse the given
224
+ # hash and check each fields type against the current object's property
225
+ # definitions.
226
+ #
227
+ # @param obj [Object]
228
+ # @return [Void]
229
+ def self.validate_raw(obj:)
230
+ obj.occurrence_code_qualifier.is_a?(CandidApiClient::HealthCareCodeInformation::V1::Types::OccurrenceInformationCodeQualifier) != false || raise("Passed value for field obj.occurrence_code_qualifier is not the expected type, validation failed.")
231
+ obj.occurrence_code.is_a?(CandidApiClient::HealthCareCodeInformation::V1::Types::OccurrenceCode) != false || raise("Passed value for field obj.occurrence_code is not the expected type, validation failed.")
232
+ obj.occurrence_date.is_a?(DateTime) != false || raise("Passed value for field obj.occurrence_date is not the expected type, validation failed.")
233
+ obj.id&.is_a?(String) != false || raise("Passed value for field obj.id is not the expected type, validation failed.")
234
+ obj.encounter_id&.is_a?(String) != false || raise("Passed value for field obj.encounter_id is not the expected type, validation failed.")
235
+ 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.")
236
+ obj.industry_code_1&.is_a?(String) != false || raise("Passed value for field obj.industry_code_1 is not the expected type, validation failed.")
237
+ obj.industry_code_2&.is_a?(String) != false || raise("Passed value for field obj.industry_code_2 is not the expected type, validation failed.")
238
+ obj.industry_code_3&.is_a?(String) != false || raise("Passed value for field obj.industry_code_3 is not the expected type, validation failed.")
239
+ obj.industry_code_4&.is_a?(String) != false || raise("Passed value for field obj.industry_code_4 is not the expected type, validation failed.")
240
+ 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.")
241
+ obj.date_time_period&.is_a?(String) != false || raise("Passed value for field obj.date_time_period is not the expected type, validation failed.")
242
+ obj.monetary_amount&.is_a?(String) != false || raise("Passed value for field obj.monetary_amount is not the expected type, validation failed.")
243
+ obj.quantity&.is_a?(String) != false || raise("Passed value for field obj.quantity is not the expected type, validation failed.")
244
+ end
245
+ end
246
+ end
247
+ end
248
+ end
249
+ end
@@ -0,0 +1,13 @@
1
+ # frozen_string_literal: true
2
+
3
+ module CandidApiClient
4
+ module HealthCareCodeInformation
5
+ module V1
6
+ module Types
7
+ class OccurrenceInformationCodeQualifier
8
+ CBH = "BH"
9
+ end
10
+ end
11
+ end
12
+ end
13
+ end
@@ -0,0 +1,25 @@
1
+ # frozen_string_literal: true
2
+
3
+ module CandidApiClient
4
+ module HealthCareCodeInformation
5
+ module V1
6
+ module Types
7
+ class OccurrenceSpanCode
8
+ C_70 = "70"
9
+ C_71 = "71"
10
+ C_72 = "72"
11
+ C_73 = "73"
12
+ C_74 = "74"
13
+ C_75 = "75"
14
+ C_76 = "76"
15
+ C_77 = "77"
16
+ C_78 = "78"
17
+ C_79 = "79"
18
+ C_80 = "80"
19
+ C_81 = "81"
20
+ C_82 = "82"
21
+ end
22
+ end
23
+ end
24
+ end
25
+ end
@@ -0,0 +1,13 @@
1
+ # frozen_string_literal: true
2
+
3
+ module CandidApiClient
4
+ module HealthCareCodeInformation
5
+ module V1
6
+ module Types
7
+ class OccurrenceSpanCodeQualifier
8
+ CBI = "BI"
9
+ end
10
+ end
11
+ end
12
+ end
13
+ end
@@ -0,0 +1,252 @@
1
+ # frozen_string_literal: true
2
+
3
+ require_relative "occurrence_span_code_qualifier"
4
+ require_relative "occurrence_span_code"
5
+ require_relative "rd_8_date"
6
+ require_relative "code_list_qualifier_code"
7
+ require_relative "date_time_period_format_qualifier"
8
+ require "ostruct"
9
+ require "json"
10
+
11
+ module CandidApiClient
12
+ module HealthCareCodeInformation
13
+ module V1
14
+ module Types
15
+ # This corresponds to the BI code qualifier value.
16
+ class OccurrenceSpanInformation
17
+ # @return [CandidApiClient::HealthCareCodeInformation::V1::Types::OccurrenceSpanCodeQualifier]
18
+ attr_reader :occurrence_span_code_qualifier
19
+ # @return [CandidApiClient::HealthCareCodeInformation::V1::Types::OccurrenceSpanCode]
20
+ attr_reader :occurrence_span_code
21
+ # @return [CandidApiClient::HealthCareCodeInformation::V1::Types::Rd8Date]
22
+ attr_reader :occurrence_span_date
23
+ # @return [String] The id of this health care code information if it is already stored.
24
+ # If this is not set, this is referring to a new health care code information to
25
+ # be added
26
+ # to the encounter. If it is set, this refers to an update of an existing health
27
+ # care code
28
+ # information object on the encounter.
29
+ attr_reader :id
30
+ # @return [String] The encounter_id of this health care code information if it is already stored.
31
+ # This will be set by the server in responses, but clients are not expected to set
32
+ # it.
33
+ attr_reader :encounter_id
34
+ # @return [CandidApiClient::HealthCareCodeInformation::V1::Types::CodeListQualifierCode]
35
+ attr_reader :code_list_qualifier
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_1
41
+ # @return [String] A code string whose interpretation depends on the code_list_qualifier being set.
42
+ # You do not need to set this field generally, instead it is provided as advisory
43
+ # context on how this HealthCareCodeInformation's data will be available in
44
+ # reporting.
45
+ attr_reader :industry_code_2
46
+ # @return [String] A code string whose interpretation depends on the code_list_qualifier being set.
47
+ # You do not need to set this field generally, instead it is provided as advisory
48
+ # context on how this HealthCareCodeInformation's data will be available in
49
+ # reporting.
50
+ attr_reader :industry_code_3
51
+ # @return [String] A code string whose interpretation depends on the code_list_qualifier being set.
52
+ # You do not need to set this field generally, instead it is provided as advisory
53
+ # context on how this HealthCareCodeInformation's data will be available in
54
+ # reporting.
55
+ attr_reader :industry_code_4
56
+ # @return [CandidApiClient::HealthCareCodeInformation::V1::Types::DateTimePeriodFormatQualifier] Controls how the date_time_period field is interpreted and is submitted
57
+ # as part of claim process.
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 :date_time_period_format_qualifier
62
+ # @return [String] A string, formatted according to date_time_period_format_qualifier, which
63
+ # ultimately represents the date time period in which an information object
64
+ # is covering.
65
+ # You do not need to set this field generally, instead it is provided as advisory
66
+ # context on how this HealthCareCodeInformation's data will be available in
67
+ # reporting.
68
+ attr_reader :date_time_period
69
+ # @return [String] A decimal used to represent ValueInformation results.
70
+ # You do not need to set this field generally, instead it is provided as advisory
71
+ # context on how this HealthCareCodeInformation's data will be available in
72
+ # reporting.
73
+ attr_reader :monetary_amount
74
+ # @return [String] You do not need to set this field generally, instead it is provided as advisory
75
+ # context on how this HealthCareCodeInformation's data will be available in
76
+ # reporting.
77
+ attr_reader :quantity
78
+ # @return [OpenStruct] Additional properties unmapped to the current class definition
79
+ attr_reader :additional_properties
80
+ # @return [Object]
81
+ attr_reader :_field_set
82
+ protected :_field_set
83
+
84
+ OMIT = Object.new
85
+
86
+ # @param occurrence_span_code_qualifier [CandidApiClient::HealthCareCodeInformation::V1::Types::OccurrenceSpanCodeQualifier]
87
+ # @param occurrence_span_code [CandidApiClient::HealthCareCodeInformation::V1::Types::OccurrenceSpanCode]
88
+ # @param occurrence_span_date [CandidApiClient::HealthCareCodeInformation::V1::Types::Rd8Date]
89
+ # @param id [String] The id of this health care code information if it is already stored.
90
+ # If this is not set, this is referring to a new health care code information to
91
+ # be added
92
+ # to the encounter. If it is set, this refers to an update of an existing health
93
+ # care code
94
+ # information object on the encounter.
95
+ # @param encounter_id [String] The encounter_id of this health care code information if it is already stored.
96
+ # This will be set by the server in responses, but clients are not expected to set
97
+ # it.
98
+ # @param code_list_qualifier [CandidApiClient::HealthCareCodeInformation::V1::Types::CodeListQualifierCode]
99
+ # @param industry_code_1 [String] A code string whose interpretation depends on the code_list_qualifier being set.
100
+ # You do not need to set this field generally, instead it is provided as advisory
101
+ # context on how this HealthCareCodeInformation's data will be available in
102
+ # reporting.
103
+ # @param industry_code_2 [String] A code string whose interpretation depends on the code_list_qualifier being set.
104
+ # You do not need to set this field generally, instead it is provided as advisory
105
+ # context on how this HealthCareCodeInformation's data will be available in
106
+ # reporting.
107
+ # @param industry_code_3 [String] A code string whose interpretation depends on the code_list_qualifier being set.
108
+ # You do not need to set this field generally, instead it is provided as advisory
109
+ # context on how this HealthCareCodeInformation's data will be available in
110
+ # reporting.
111
+ # @param industry_code_4 [String] A code string whose interpretation depends on the code_list_qualifier being set.
112
+ # You do not need to set this field generally, instead it is provided as advisory
113
+ # context on how this HealthCareCodeInformation's data will be available in
114
+ # reporting.
115
+ # @param date_time_period_format_qualifier [CandidApiClient::HealthCareCodeInformation::V1::Types::DateTimePeriodFormatQualifier] Controls how the date_time_period field is interpreted and is submitted
116
+ # as part of claim process.
117
+ # You do not need to set this field generally, instead it is provided as advisory
118
+ # context on how this HealthCareCodeInformation's data will be available in
119
+ # reporting.
120
+ # @param date_time_period [String] A string, formatted according to date_time_period_format_qualifier, which
121
+ # ultimately represents the date time period in which an information object
122
+ # is covering.
123
+ # You do not need to set this field generally, instead it is provided as advisory
124
+ # context on how this HealthCareCodeInformation's data will be available in
125
+ # reporting.
126
+ # @param monetary_amount [String] A decimal used to represent ValueInformation results.
127
+ # You do not need to set this field generally, instead it is provided as advisory
128
+ # context on how this HealthCareCodeInformation's data will be available in
129
+ # reporting.
130
+ # @param quantity [String] You do not need to set this field generally, instead it is provided as advisory
131
+ # context on how this HealthCareCodeInformation's data will be available in
132
+ # reporting.
133
+ # @param additional_properties [OpenStruct] Additional properties unmapped to the current class definition
134
+ # @return [CandidApiClient::HealthCareCodeInformation::V1::Types::OccurrenceSpanInformation]
135
+ def initialize(occurrence_span_code_qualifier:, occurrence_span_code:, occurrence_span_date:, id: OMIT,
136
+ encounter_id: 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)
137
+ @occurrence_span_code_qualifier = occurrence_span_code_qualifier
138
+ @occurrence_span_code = occurrence_span_code
139
+ @occurrence_span_date = occurrence_span_date
140
+ @id = id if id != OMIT
141
+ @encounter_id = encounter_id if encounter_id != OMIT
142
+ @code_list_qualifier = code_list_qualifier if code_list_qualifier != OMIT
143
+ @industry_code_1 = industry_code_1 if industry_code_1 != OMIT
144
+ @industry_code_2 = industry_code_2 if industry_code_2 != OMIT
145
+ @industry_code_3 = industry_code_3 if industry_code_3 != OMIT
146
+ @industry_code_4 = industry_code_4 if industry_code_4 != OMIT
147
+ if date_time_period_format_qualifier != OMIT
148
+ @date_time_period_format_qualifier = date_time_period_format_qualifier
149
+ end
150
+ @date_time_period = date_time_period if date_time_period != OMIT
151
+ @monetary_amount = monetary_amount if monetary_amount != OMIT
152
+ @quantity = quantity if quantity != OMIT
153
+ @additional_properties = additional_properties
154
+ @_field_set = {
155
+ "occurrence_span_code_qualifier": occurrence_span_code_qualifier,
156
+ "occurrence_span_code": occurrence_span_code,
157
+ "occurrence_span_date": occurrence_span_date,
158
+ "id": id,
159
+ "encounter_id": encounter_id,
160
+ "code_list_qualifier": code_list_qualifier,
161
+ "industry_code_1": industry_code_1,
162
+ "industry_code_2": industry_code_2,
163
+ "industry_code_3": industry_code_3,
164
+ "industry_code_4": industry_code_4,
165
+ "date_time_period_format_qualifier": date_time_period_format_qualifier,
166
+ "date_time_period": date_time_period,
167
+ "monetary_amount": monetary_amount,
168
+ "quantity": quantity
169
+ }.reject do |_k, v|
170
+ v == OMIT
171
+ end
172
+ end
173
+
174
+ # Deserialize a JSON object to an instance of OccurrenceSpanInformation
175
+ #
176
+ # @param json_object [String]
177
+ # @return [CandidApiClient::HealthCareCodeInformation::V1::Types::OccurrenceSpanInformation]
178
+ def self.from_json(json_object:)
179
+ struct = JSON.parse(json_object, object_class: OpenStruct)
180
+ parsed_json = JSON.parse(json_object)
181
+ occurrence_span_code_qualifier = struct["occurrence_span_code_qualifier"]
182
+ occurrence_span_code = struct["occurrence_span_code"]
183
+ if parsed_json["occurrence_span_date"].nil?
184
+ occurrence_span_date = nil
185
+ else
186
+ occurrence_span_date = parsed_json["occurrence_span_date"].to_json
187
+ occurrence_span_date = CandidApiClient::HealthCareCodeInformation::V1::Types::Rd8Date.from_json(json_object: occurrence_span_date)
188
+ end
189
+ id = struct["id"]
190
+ encounter_id = struct["encounter_id"]
191
+ code_list_qualifier = struct["code_list_qualifier"]
192
+ industry_code_1 = struct["industry_code_1"]
193
+ industry_code_2 = struct["industry_code_2"]
194
+ industry_code_3 = struct["industry_code_3"]
195
+ industry_code_4 = struct["industry_code_4"]
196
+ date_time_period_format_qualifier = struct["date_time_period_format_qualifier"]
197
+ date_time_period = struct["date_time_period"]
198
+ monetary_amount = struct["monetary_amount"]
199
+ quantity = struct["quantity"]
200
+ new(
201
+ occurrence_span_code_qualifier: occurrence_span_code_qualifier,
202
+ occurrence_span_code: occurrence_span_code,
203
+ occurrence_span_date: occurrence_span_date,
204
+ id: id,
205
+ encounter_id: encounter_id,
206
+ code_list_qualifier: code_list_qualifier,
207
+ industry_code_1: industry_code_1,
208
+ industry_code_2: industry_code_2,
209
+ industry_code_3: industry_code_3,
210
+ industry_code_4: industry_code_4,
211
+ date_time_period_format_qualifier: date_time_period_format_qualifier,
212
+ date_time_period: date_time_period,
213
+ monetary_amount: monetary_amount,
214
+ quantity: quantity,
215
+ additional_properties: struct
216
+ )
217
+ end
218
+
219
+ # Serialize an instance of OccurrenceSpanInformation to a JSON object
220
+ #
221
+ # @return [String]
222
+ def to_json(*_args)
223
+ @_field_set&.to_json
224
+ end
225
+
226
+ # Leveraged for Union-type generation, validate_raw attempts to parse the given
227
+ # hash and check each fields type against the current object's property
228
+ # definitions.
229
+ #
230
+ # @param obj [Object]
231
+ # @return [Void]
232
+ def self.validate_raw(obj:)
233
+ obj.occurrence_span_code_qualifier.is_a?(CandidApiClient::HealthCareCodeInformation::V1::Types::OccurrenceSpanCodeQualifier) != false || raise("Passed value for field obj.occurrence_span_code_qualifier is not the expected type, validation failed.")
234
+ obj.occurrence_span_code.is_a?(CandidApiClient::HealthCareCodeInformation::V1::Types::OccurrenceSpanCode) != false || raise("Passed value for field obj.occurrence_span_code is not the expected type, validation failed.")
235
+ CandidApiClient::HealthCareCodeInformation::V1::Types::Rd8Date.validate_raw(obj: obj.occurrence_span_date)
236
+ obj.id&.is_a?(String) != false || raise("Passed value for field obj.id is not the expected type, validation failed.")
237
+ obj.encounter_id&.is_a?(String) != false || raise("Passed value for field obj.encounter_id is not the expected type, validation failed.")
238
+ 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.")
239
+ obj.industry_code_1&.is_a?(String) != false || raise("Passed value for field obj.industry_code_1 is not the expected type, validation failed.")
240
+ obj.industry_code_2&.is_a?(String) != false || raise("Passed value for field obj.industry_code_2 is not the expected type, validation failed.")
241
+ obj.industry_code_3&.is_a?(String) != false || raise("Passed value for field obj.industry_code_3 is not the expected type, validation failed.")
242
+ obj.industry_code_4&.is_a?(String) != false || raise("Passed value for field obj.industry_code_4 is not the expected type, validation failed.")
243
+ 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.")
244
+ obj.date_time_period&.is_a?(String) != false || raise("Passed value for field obj.date_time_period is not the expected type, validation failed.")
245
+ obj.monetary_amount&.is_a?(String) != false || raise("Passed value for field obj.monetary_amount is not the expected type, validation failed.")
246
+ obj.quantity&.is_a?(String) != false || raise("Passed value for field obj.quantity is not the expected type, validation failed.")
247
+ end
248
+ end
249
+ end
250
+ end
251
+ end
252
+ end