candidhealth 1.8.1 → 1.9.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 (68) hide show
  1. checksums.yaml +4 -4
  2. data/lib/candidhealth/auth/default/client.rb +0 -74
  3. data/lib/candidhealth/diagnoses/client.rb +2 -2
  4. data/lib/candidhealth/encounters/v_4/client.rb +479 -2522
  5. data/lib/candidhealth/encounters/v_4/types/encounter_submission_expectation.rb +3 -6
  6. data/lib/candidhealth/guarantor/v_1/types/guarantor.rb +4 -4
  7. data/lib/candidhealth/health_care_code_information/v_1/client.rb +2 -74
  8. data/lib/candidhealth/health_care_code_information/v_1/types/admitting_diagnosis.rb +2 -130
  9. data/lib/candidhealth/health_care_code_information/v_1/types/condition_code.rb +100 -1
  10. data/lib/candidhealth/health_care_code_information/v_1/types/condition_information.rb +2 -130
  11. data/lib/candidhealth/health_care_code_information/v_1/types/diagnosis_related_group.rb +2 -130
  12. data/lib/candidhealth/health_care_code_information/v_1/types/external_cause_of_injury.rb +2 -130
  13. data/lib/candidhealth/health_care_code_information/v_1/types/health_care_code_information.rb +2 -134
  14. data/lib/candidhealth/health_care_code_information/v_1/types/health_care_code_information_get_all_response.rb +34 -34
  15. data/lib/candidhealth/health_care_code_information/v_1/types/health_care_code_information_new.rb +4 -139
  16. data/lib/candidhealth/health_care_code_information/v_1/types/health_care_code_information_update.rb +138 -38
  17. data/lib/candidhealth/health_care_code_information/v_1/types/occurrence_code.rb +1 -0
  18. data/lib/candidhealth/health_care_code_information/v_1/types/occurrence_information.rb +10 -132
  19. data/lib/candidhealth/health_care_code_information/v_1/types/occurrence_span_code.rb +6 -1
  20. data/lib/candidhealth/health_care_code_information/v_1/types/occurrence_span_information.rb +2 -130
  21. data/lib/candidhealth/health_care_code_information/v_1/types/other_diagnosis_information.rb +2 -130
  22. data/lib/candidhealth/health_care_code_information/v_1/types/other_procedure_information.rb +10 -132
  23. data/lib/candidhealth/health_care_code_information/v_1/types/patient_reason_for_visit.rb +2 -130
  24. data/lib/candidhealth/health_care_code_information/v_1/types/principal_diagnosis.rb +2 -130
  25. data/lib/candidhealth/health_care_code_information/v_1/types/principal_procedure_information.rb +10 -132
  26. data/lib/candidhealth/health_care_code_information/v_1/types/rd_8_date.rb +16 -4
  27. data/lib/candidhealth/health_care_code_information/v_1/types/treatment_code_information.rb +2 -130
  28. data/lib/candidhealth/health_care_code_information/v_1/types/value_information.rb +2 -130
  29. data/lib/candidhealth/individual/types/patient.rb +4 -4
  30. data/lib/candidhealth/organization_providers/v_2/types/license_type.rb +2 -0
  31. data/lib/candidhealth/organization_service_facilities/v_2/client.rb +77 -4
  32. data/lib/candidhealth/organization_service_facilities/v_2/types/organization_service_facility.rb +21 -2
  33. data/lib/candidhealth/organization_service_facilities/v_2/types/organization_service_facility_create.rb +21 -2
  34. data/lib/candidhealth/organization_service_facilities/v_2/types/organization_service_facility_update.rb +21 -2
  35. data/lib/candidhealth/payers/v_4/types/payer.rb +10 -2
  36. data/lib/candidhealth/pre_encounter/patients/v_1/client.rb +8 -2
  37. data/lib/candidhealth/pre_encounter/patients/v_1/types/mutable_patient.rb +13 -1
  38. data/lib/candidhealth/pre_encounter/patients/v_1/types/mutable_patient_with_mrn.rb +13 -1
  39. data/lib/candidhealth/pre_encounter/patients/v_1/types/patient.rb +13 -1
  40. data/lib/candidhealth/pre_encounter/patients/v_1/types/patient_service_facility.rb +63 -0
  41. data/lib/candidhealth/service_lines/v_2/client.rb +2 -2
  42. data/lib/candidhealth/service_lines/v_2/types/service_line_create.rb +8 -8
  43. data/lib/candidhealth/service_lines/v_2/types/service_line_create_base.rb +8 -8
  44. data/lib/candidhealth/service_lines/v_2/types/service_line_create_base_base.rb +8 -8
  45. data/lib/requests.rb +2 -2
  46. data/lib/types_export.rb +1 -21
  47. metadata +3 -23
  48. data/lib/candidhealth/encounters_universal/types/universal_encounter_create.rb +0 -944
  49. data/lib/candidhealth/encounters_universal/types/universal_encounter_create_from_pre_encounter.rb +0 -791
  50. data/lib/candidhealth/encounters_universal/types/universal_encounter_update.rb +0 -872
  51. data/lib/candidhealth/health_care_code_information/v_1/types/admitting_diagnosis_new.rb +0 -206
  52. data/lib/candidhealth/health_care_code_information/v_1/types/code_list_qualifier_code.rb +0 -1068
  53. data/lib/candidhealth/health_care_code_information/v_1/types/condition_information_new.rb +0 -207
  54. data/lib/candidhealth/health_care_code_information/v_1/types/date_time_period_format_qualifier.rb +0 -54
  55. data/lib/candidhealth/health_care_code_information/v_1/types/diagnosis_related_group_new.rb +0 -206
  56. data/lib/candidhealth/health_care_code_information/v_1/types/external_cause_of_injury_new.rb +0 -245
  57. data/lib/candidhealth/health_care_code_information/v_1/types/health_care_code_information_create.rb +0 -225
  58. data/lib/candidhealth/health_care_code_information/v_1/types/occurrence_information_new.rb +0 -219
  59. data/lib/candidhealth/health_care_code_information/v_1/types/occurrence_span_information_new.rb +0 -222
  60. data/lib/candidhealth/health_care_code_information/v_1/types/other_diagnosis_information_new.rb +0 -215
  61. data/lib/candidhealth/health_care_code_information/v_1/types/other_procedure_information_new.rb +0 -218
  62. data/lib/candidhealth/health_care_code_information/v_1/types/patient_reason_for_visit_new.rb +0 -206
  63. data/lib/candidhealth/health_care_code_information/v_1/types/principal_diagnosis_new.rb +0 -215
  64. data/lib/candidhealth/health_care_code_information/v_1/types/principal_procedure_information_new.rb +0 -216
  65. data/lib/candidhealth/health_care_code_information/v_1/types/treatment_code_information_new.rb +0 -206
  66. data/lib/candidhealth/health_care_code_information/v_1/types/value_information_new.rb +0 -215
  67. data/lib/candidhealth/service_lines/v_2/types/universal_service_line_create.rb +0 -271
  68. data/lib/candidhealth/x_12/v_1/types/type_of_bill_composite_update.rb +0 -112
@@ -1,219 +0,0 @@
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 OccurrenceInformationNew
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 [CandidApiClient::HealthCareCodeInformation::V1::Types::CodeListQualifierCode]
24
- attr_reader :code_list_qualifier
25
- # @return [String] A code string whose interpretation depends on the code_list_qualifier being set.
26
- # You do not need to set this field generally, instead it is provided as advisory
27
- # context on how this HealthCareCodeInformation's data will be available in
28
- # reporting.
29
- attr_reader :industry_code_1
30
- # @return [String] A code string whose interpretation depends on the code_list_qualifier being set.
31
- # You do not need to set this field generally, instead it is provided as advisory
32
- # context on how this HealthCareCodeInformation's data will be available in
33
- # reporting.
34
- attr_reader :industry_code_2
35
- # @return [String] A code string whose interpretation depends on the code_list_qualifier being set.
36
- # You do not need to set this field generally, instead it is provided as advisory
37
- # context on how this HealthCareCodeInformation's data will be available in
38
- # reporting.
39
- attr_reader :industry_code_3
40
- # @return [String] A code string whose interpretation depends on the code_list_qualifier being set.
41
- # You do not need to set this field generally, instead it is provided as advisory
42
- # context on how this HealthCareCodeInformation's data will be available in
43
- # reporting.
44
- attr_reader :industry_code_4
45
- # @return [CandidApiClient::HealthCareCodeInformation::V1::Types::DateTimePeriodFormatQualifier] Controls how the date_time_period field is interpreted and is submitted
46
- # as part of claim process.
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 :date_time_period_format_qualifier
51
- # @return [String] A string, formatted according to date_time_period_format_qualifier, which
52
- # ultimately represents the date time period in which an information object
53
- # is covering.
54
- # You do not need to set this field generally, instead it is provided as advisory
55
- # context on how this HealthCareCodeInformation's data will be available in
56
- # reporting.
57
- attr_reader :date_time_period
58
- # @return [String] A decimal used to represent ValueInformation results.
59
- # 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 :monetary_amount
63
- # @return [String] You do not need to set this field generally, instead it is provided as advisory
64
- # context on how this HealthCareCodeInformation's data will be available in
65
- # reporting.
66
- attr_reader :quantity
67
- # @return [OpenStruct] Additional properties unmapped to the current class definition
68
- attr_reader :additional_properties
69
- # @return [Object]
70
- attr_reader :_field_set
71
- protected :_field_set
72
-
73
- OMIT = Object.new
74
-
75
- # @param occurrence_code_qualifier [CandidApiClient::HealthCareCodeInformation::V1::Types::OccurrenceInformationCodeQualifier]
76
- # @param occurrence_code [CandidApiClient::HealthCareCodeInformation::V1::Types::OccurrenceCode]
77
- # @param occurrence_date [DateTime]
78
- # @param code_list_qualifier [CandidApiClient::HealthCareCodeInformation::V1::Types::CodeListQualifierCode]
79
- # @param industry_code_1 [String] A code string whose interpretation depends on the code_list_qualifier being set.
80
- # You do not need to set this field generally, instead it is provided as advisory
81
- # context on how this HealthCareCodeInformation's data will be available in
82
- # reporting.
83
- # @param industry_code_2 [String] A code string whose interpretation depends on the code_list_qualifier being set.
84
- # You do not need to set this field generally, instead it is provided as advisory
85
- # context on how this HealthCareCodeInformation's data will be available in
86
- # reporting.
87
- # @param industry_code_3 [String] A code string whose interpretation depends on the code_list_qualifier being set.
88
- # You do not need to set this field generally, instead it is provided as advisory
89
- # context on how this HealthCareCodeInformation's data will be available in
90
- # reporting.
91
- # @param industry_code_4 [String] A code string whose interpretation depends on the code_list_qualifier being set.
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_format_qualifier [CandidApiClient::HealthCareCodeInformation::V1::Types::DateTimePeriodFormatQualifier] Controls how the date_time_period field is interpreted and is submitted
96
- # as part of claim process.
97
- # You do not need to set this field generally, instead it is provided as advisory
98
- # context on how this HealthCareCodeInformation's data will be available in
99
- # reporting.
100
- # @param date_time_period [String] A string, formatted according to date_time_period_format_qualifier, which
101
- # ultimately represents the date time period in which an information object
102
- # is covering.
103
- # You do not need to set this field generally, instead it is provided as advisory
104
- # context on how this HealthCareCodeInformation's data will be available in
105
- # reporting.
106
- # @param monetary_amount [String] A decimal used to represent ValueInformation results.
107
- # You do not need to set this field generally, instead it is provided as advisory
108
- # context on how this HealthCareCodeInformation's data will be available in
109
- # reporting.
110
- # @param quantity [String] You do not need to set this field generally, instead it is provided as advisory
111
- # context on how this HealthCareCodeInformation's data will be available in
112
- # reporting.
113
- # @param additional_properties [OpenStruct] Additional properties unmapped to the current class definition
114
- # @return [CandidApiClient::HealthCareCodeInformation::V1::Types::OccurrenceInformationNew]
115
- def initialize(occurrence_code_qualifier:, occurrence_code:, occurrence_date:, code_list_qualifier: OMIT,
116
- 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)
117
- @occurrence_code_qualifier = occurrence_code_qualifier
118
- @occurrence_code = occurrence_code
119
- @occurrence_date = occurrence_date
120
- @code_list_qualifier = code_list_qualifier if code_list_qualifier != OMIT
121
- @industry_code_1 = industry_code_1 if industry_code_1 != OMIT
122
- @industry_code_2 = industry_code_2 if industry_code_2 != OMIT
123
- @industry_code_3 = industry_code_3 if industry_code_3 != OMIT
124
- @industry_code_4 = industry_code_4 if industry_code_4 != OMIT
125
- if date_time_period_format_qualifier != OMIT
126
- @date_time_period_format_qualifier = date_time_period_format_qualifier
127
- end
128
- @date_time_period = date_time_period if date_time_period != OMIT
129
- @monetary_amount = monetary_amount if monetary_amount != OMIT
130
- @quantity = quantity if quantity != OMIT
131
- @additional_properties = additional_properties
132
- @_field_set = {
133
- "occurrence_code_qualifier": occurrence_code_qualifier,
134
- "occurrence_code": occurrence_code,
135
- "occurrence_date": occurrence_date,
136
- "code_list_qualifier": code_list_qualifier,
137
- "industry_code_1": industry_code_1,
138
- "industry_code_2": industry_code_2,
139
- "industry_code_3": industry_code_3,
140
- "industry_code_4": industry_code_4,
141
- "date_time_period_format_qualifier": date_time_period_format_qualifier,
142
- "date_time_period": date_time_period,
143
- "monetary_amount": monetary_amount,
144
- "quantity": quantity
145
- }.reject do |_k, v|
146
- v == OMIT
147
- end
148
- end
149
-
150
- # Deserialize a JSON object to an instance of OccurrenceInformationNew
151
- #
152
- # @param json_object [String]
153
- # @return [CandidApiClient::HealthCareCodeInformation::V1::Types::OccurrenceInformationNew]
154
- def self.from_json(json_object:)
155
- struct = JSON.parse(json_object, object_class: OpenStruct)
156
- parsed_json = JSON.parse(json_object)
157
- occurrence_code_qualifier = struct["occurrence_code_qualifier"]
158
- occurrence_code = struct["occurrence_code"]
159
- occurrence_date = unless parsed_json["occurrence_date"].nil?
160
- DateTime.parse(parsed_json["occurrence_date"])
161
- end
162
- code_list_qualifier = struct["code_list_qualifier"]
163
- industry_code_1 = struct["industry_code_1"]
164
- industry_code_2 = struct["industry_code_2"]
165
- industry_code_3 = struct["industry_code_3"]
166
- industry_code_4 = struct["industry_code_4"]
167
- date_time_period_format_qualifier = struct["date_time_period_format_qualifier"]
168
- date_time_period = struct["date_time_period"]
169
- monetary_amount = struct["monetary_amount"]
170
- quantity = struct["quantity"]
171
- new(
172
- occurrence_code_qualifier: occurrence_code_qualifier,
173
- occurrence_code: occurrence_code,
174
- occurrence_date: occurrence_date,
175
- code_list_qualifier: code_list_qualifier,
176
- industry_code_1: industry_code_1,
177
- industry_code_2: industry_code_2,
178
- industry_code_3: industry_code_3,
179
- industry_code_4: industry_code_4,
180
- date_time_period_format_qualifier: date_time_period_format_qualifier,
181
- date_time_period: date_time_period,
182
- monetary_amount: monetary_amount,
183
- quantity: quantity,
184
- additional_properties: struct
185
- )
186
- end
187
-
188
- # Serialize an instance of OccurrenceInformationNew to a JSON object
189
- #
190
- # @return [String]
191
- def to_json(*_args)
192
- @_field_set&.to_json
193
- end
194
-
195
- # Leveraged for Union-type generation, validate_raw attempts to parse the given
196
- # hash and check each fields type against the current object's property
197
- # definitions.
198
- #
199
- # @param obj [Object]
200
- # @return [Void]
201
- def self.validate_raw(obj:)
202
- 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.")
203
- 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.")
204
- obj.occurrence_date.is_a?(DateTime) != false || raise("Passed value for field obj.occurrence_date is not the expected type, validation failed.")
205
- 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.")
206
- obj.industry_code_1&.is_a?(String) != false || raise("Passed value for field obj.industry_code_1 is not the expected type, validation failed.")
207
- obj.industry_code_2&.is_a?(String) != false || raise("Passed value for field obj.industry_code_2 is not the expected type, validation failed.")
208
- obj.industry_code_3&.is_a?(String) != false || raise("Passed value for field obj.industry_code_3 is not the expected type, validation failed.")
209
- obj.industry_code_4&.is_a?(String) != false || raise("Passed value for field obj.industry_code_4 is not the expected type, validation failed.")
210
- 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.")
211
- obj.date_time_period&.is_a?(String) != false || raise("Passed value for field obj.date_time_period is not the expected type, validation failed.")
212
- obj.monetary_amount&.is_a?(String) != false || raise("Passed value for field obj.monetary_amount is not the expected type, validation failed.")
213
- obj.quantity&.is_a?(String) != false || raise("Passed value for field obj.quantity is not the expected type, validation failed.")
214
- end
215
- end
216
- end
217
- end
218
- end
219
- end
@@ -1,222 +0,0 @@
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 OccurrenceSpanInformationNew
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 [CandidApiClient::HealthCareCodeInformation::V1::Types::CodeListQualifierCode]
24
- attr_reader :code_list_qualifier
25
- # @return [String] A code string whose interpretation depends on the code_list_qualifier being set.
26
- # You do not need to set this field generally, instead it is provided as advisory
27
- # context on how this HealthCareCodeInformation's data will be available in
28
- # reporting.
29
- attr_reader :industry_code_1
30
- # @return [String] A code string whose interpretation depends on the code_list_qualifier being set.
31
- # You do not need to set this field generally, instead it is provided as advisory
32
- # context on how this HealthCareCodeInformation's data will be available in
33
- # reporting.
34
- attr_reader :industry_code_2
35
- # @return [String] A code string whose interpretation depends on the code_list_qualifier being set.
36
- # You do not need to set this field generally, instead it is provided as advisory
37
- # context on how this HealthCareCodeInformation's data will be available in
38
- # reporting.
39
- attr_reader :industry_code_3
40
- # @return [String] A code string whose interpretation depends on the code_list_qualifier being set.
41
- # You do not need to set this field generally, instead it is provided as advisory
42
- # context on how this HealthCareCodeInformation's data will be available in
43
- # reporting.
44
- attr_reader :industry_code_4
45
- # @return [CandidApiClient::HealthCareCodeInformation::V1::Types::DateTimePeriodFormatQualifier] Controls how the date_time_period field is interpreted and is submitted
46
- # as part of claim process.
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 :date_time_period_format_qualifier
51
- # @return [String] A string, formatted according to date_time_period_format_qualifier, which
52
- # ultimately represents the date time period in which an information object
53
- # is covering.
54
- # You do not need to set this field generally, instead it is provided as advisory
55
- # context on how this HealthCareCodeInformation's data will be available in
56
- # reporting.
57
- attr_reader :date_time_period
58
- # @return [String] A decimal used to represent ValueInformation results.
59
- # 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 :monetary_amount
63
- # @return [String] You do not need to set this field generally, instead it is provided as advisory
64
- # context on how this HealthCareCodeInformation's data will be available in
65
- # reporting.
66
- attr_reader :quantity
67
- # @return [OpenStruct] Additional properties unmapped to the current class definition
68
- attr_reader :additional_properties
69
- # @return [Object]
70
- attr_reader :_field_set
71
- protected :_field_set
72
-
73
- OMIT = Object.new
74
-
75
- # @param occurrence_span_code_qualifier [CandidApiClient::HealthCareCodeInformation::V1::Types::OccurrenceSpanCodeQualifier]
76
- # @param occurrence_span_code [CandidApiClient::HealthCareCodeInformation::V1::Types::OccurrenceSpanCode]
77
- # @param occurrence_span_date [CandidApiClient::HealthCareCodeInformation::V1::Types::Rd8Date]
78
- # @param code_list_qualifier [CandidApiClient::HealthCareCodeInformation::V1::Types::CodeListQualifierCode]
79
- # @param industry_code_1 [String] A code string whose interpretation depends on the code_list_qualifier being set.
80
- # You do not need to set this field generally, instead it is provided as advisory
81
- # context on how this HealthCareCodeInformation's data will be available in
82
- # reporting.
83
- # @param industry_code_2 [String] A code string whose interpretation depends on the code_list_qualifier being set.
84
- # You do not need to set this field generally, instead it is provided as advisory
85
- # context on how this HealthCareCodeInformation's data will be available in
86
- # reporting.
87
- # @param industry_code_3 [String] A code string whose interpretation depends on the code_list_qualifier being set.
88
- # You do not need to set this field generally, instead it is provided as advisory
89
- # context on how this HealthCareCodeInformation's data will be available in
90
- # reporting.
91
- # @param industry_code_4 [String] A code string whose interpretation depends on the code_list_qualifier being set.
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_format_qualifier [CandidApiClient::HealthCareCodeInformation::V1::Types::DateTimePeriodFormatQualifier] Controls how the date_time_period field is interpreted and is submitted
96
- # as part of claim process.
97
- # You do not need to set this field generally, instead it is provided as advisory
98
- # context on how this HealthCareCodeInformation's data will be available in
99
- # reporting.
100
- # @param date_time_period [String] A string, formatted according to date_time_period_format_qualifier, which
101
- # ultimately represents the date time period in which an information object
102
- # is covering.
103
- # You do not need to set this field generally, instead it is provided as advisory
104
- # context on how this HealthCareCodeInformation's data will be available in
105
- # reporting.
106
- # @param monetary_amount [String] A decimal used to represent ValueInformation results.
107
- # You do not need to set this field generally, instead it is provided as advisory
108
- # context on how this HealthCareCodeInformation's data will be available in
109
- # reporting.
110
- # @param quantity [String] You do not need to set this field generally, instead it is provided as advisory
111
- # context on how this HealthCareCodeInformation's data will be available in
112
- # reporting.
113
- # @param additional_properties [OpenStruct] Additional properties unmapped to the current class definition
114
- # @return [CandidApiClient::HealthCareCodeInformation::V1::Types::OccurrenceSpanInformationNew]
115
- def initialize(occurrence_span_code_qualifier:, occurrence_span_code:, occurrence_span_date:,
116
- 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)
117
- @occurrence_span_code_qualifier = occurrence_span_code_qualifier
118
- @occurrence_span_code = occurrence_span_code
119
- @occurrence_span_date = occurrence_span_date
120
- @code_list_qualifier = code_list_qualifier if code_list_qualifier != OMIT
121
- @industry_code_1 = industry_code_1 if industry_code_1 != OMIT
122
- @industry_code_2 = industry_code_2 if industry_code_2 != OMIT
123
- @industry_code_3 = industry_code_3 if industry_code_3 != OMIT
124
- @industry_code_4 = industry_code_4 if industry_code_4 != OMIT
125
- if date_time_period_format_qualifier != OMIT
126
- @date_time_period_format_qualifier = date_time_period_format_qualifier
127
- end
128
- @date_time_period = date_time_period if date_time_period != OMIT
129
- @monetary_amount = monetary_amount if monetary_amount != OMIT
130
- @quantity = quantity if quantity != OMIT
131
- @additional_properties = additional_properties
132
- @_field_set = {
133
- "occurrence_span_code_qualifier": occurrence_span_code_qualifier,
134
- "occurrence_span_code": occurrence_span_code,
135
- "occurrence_span_date": occurrence_span_date,
136
- "code_list_qualifier": code_list_qualifier,
137
- "industry_code_1": industry_code_1,
138
- "industry_code_2": industry_code_2,
139
- "industry_code_3": industry_code_3,
140
- "industry_code_4": industry_code_4,
141
- "date_time_period_format_qualifier": date_time_period_format_qualifier,
142
- "date_time_period": date_time_period,
143
- "monetary_amount": monetary_amount,
144
- "quantity": quantity
145
- }.reject do |_k, v|
146
- v == OMIT
147
- end
148
- end
149
-
150
- # Deserialize a JSON object to an instance of OccurrenceSpanInformationNew
151
- #
152
- # @param json_object [String]
153
- # @return [CandidApiClient::HealthCareCodeInformation::V1::Types::OccurrenceSpanInformationNew]
154
- def self.from_json(json_object:)
155
- struct = JSON.parse(json_object, object_class: OpenStruct)
156
- parsed_json = JSON.parse(json_object)
157
- occurrence_span_code_qualifier = struct["occurrence_span_code_qualifier"]
158
- occurrence_span_code = struct["occurrence_span_code"]
159
- if parsed_json["occurrence_span_date"].nil?
160
- occurrence_span_date = nil
161
- else
162
- occurrence_span_date = parsed_json["occurrence_span_date"].to_json
163
- occurrence_span_date = CandidApiClient::HealthCareCodeInformation::V1::Types::Rd8Date.from_json(json_object: occurrence_span_date)
164
- end
165
- code_list_qualifier = struct["code_list_qualifier"]
166
- industry_code_1 = struct["industry_code_1"]
167
- industry_code_2 = struct["industry_code_2"]
168
- industry_code_3 = struct["industry_code_3"]
169
- industry_code_4 = struct["industry_code_4"]
170
- date_time_period_format_qualifier = struct["date_time_period_format_qualifier"]
171
- date_time_period = struct["date_time_period"]
172
- monetary_amount = struct["monetary_amount"]
173
- quantity = struct["quantity"]
174
- new(
175
- occurrence_span_code_qualifier: occurrence_span_code_qualifier,
176
- occurrence_span_code: occurrence_span_code,
177
- occurrence_span_date: occurrence_span_date,
178
- code_list_qualifier: code_list_qualifier,
179
- industry_code_1: industry_code_1,
180
- industry_code_2: industry_code_2,
181
- industry_code_3: industry_code_3,
182
- industry_code_4: industry_code_4,
183
- date_time_period_format_qualifier: date_time_period_format_qualifier,
184
- date_time_period: date_time_period,
185
- monetary_amount: monetary_amount,
186
- quantity: quantity,
187
- additional_properties: struct
188
- )
189
- end
190
-
191
- # Serialize an instance of OccurrenceSpanInformationNew to a JSON object
192
- #
193
- # @return [String]
194
- def to_json(*_args)
195
- @_field_set&.to_json
196
- end
197
-
198
- # Leveraged for Union-type generation, validate_raw attempts to parse the given
199
- # hash and check each fields type against the current object's property
200
- # definitions.
201
- #
202
- # @param obj [Object]
203
- # @return [Void]
204
- def self.validate_raw(obj:)
205
- 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.")
206
- 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.")
207
- CandidApiClient::HealthCareCodeInformation::V1::Types::Rd8Date.validate_raw(obj: obj.occurrence_span_date)
208
- 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.")
209
- obj.industry_code_1&.is_a?(String) != false || raise("Passed value for field obj.industry_code_1 is not the expected type, validation failed.")
210
- obj.industry_code_2&.is_a?(String) != false || raise("Passed value for field obj.industry_code_2 is not the expected type, validation failed.")
211
- obj.industry_code_3&.is_a?(String) != false || raise("Passed value for field obj.industry_code_3 is not the expected type, validation failed.")
212
- obj.industry_code_4&.is_a?(String) != false || raise("Passed value for field obj.industry_code_4 is not the expected type, validation failed.")
213
- 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.")
214
- obj.date_time_period&.is_a?(String) != false || raise("Passed value for field obj.date_time_period is not the expected type, validation failed.")
215
- obj.monetary_amount&.is_a?(String) != false || raise("Passed value for field obj.monetary_amount is not the expected type, validation failed.")
216
- obj.quantity&.is_a?(String) != false || raise("Passed value for field obj.quantity is not the expected type, validation failed.")
217
- end
218
- end
219
- end
220
- end
221
- end
222
- end