candidhealth 1.6.0 → 1.8.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (151) hide show
  1. checksums.yaml +4 -4
  2. data/lib/candidhealth/auth/default/client.rb +74 -0
  3. data/lib/candidhealth/charge_capture/v_1/client.rb +48 -48
  4. data/lib/candidhealth/charge_capture/v_1/types/charge_capture_data.rb +70 -56
  5. data/lib/candidhealth/commons/types/clearinghouse.rb +18 -0
  6. data/lib/candidhealth/commons/types/procedure_modifier.rb +11 -0
  7. data/lib/candidhealth/credentialing/v_2/client.rb +342 -8
  8. data/lib/candidhealth/credentialing/v_2/types/base_credentialing_span.rb +143 -0
  9. data/lib/candidhealth/credentialing/v_2/types/facility_credentialing_span.rb +165 -0
  10. data/lib/candidhealth/credentialing/v_2/types/facility_credentialing_span_page.rb +88 -0
  11. data/lib/candidhealth/credentialing/v_2/types/provider_credentialing_span.rb +34 -34
  12. data/lib/candidhealth/encounter_providers/v_2/types/billing_provider.rb +1 -1
  13. data/lib/candidhealth/encounter_providers/v_2/types/billing_provider_update.rb +1 -1
  14. data/lib/candidhealth/encounter_providers/v_2/types/billing_provider_update_with_optional_address.rb +1 -1
  15. data/lib/candidhealth/encounters/v_4/client.rb +3253 -2040
  16. data/lib/candidhealth/encounters/v_4/types/encounter.rb +111 -86
  17. data/lib/candidhealth/encounters/v_4/types/encounter_base.rb +39 -33
  18. data/lib/candidhealth/encounters/v_4/types/encounter_create.rb +796 -0
  19. data/lib/candidhealth/encounters/v_4/types/encounter_create_from_pre_encounter.rb +131 -117
  20. data/lib/candidhealth/encounters/v_4/types/encounter_deep_optional.rb +70 -56
  21. data/lib/candidhealth/encounters/v_4/types/encounter_optional.rb +29 -39
  22. data/lib/candidhealth/encounters/v_4/types/encounter_rendering_or_attending_provider_required_error.rb +55 -0
  23. data/lib/candidhealth/encounters/v_4/types/encounter_update.rb +736 -0
  24. data/lib/candidhealth/encounters_universal/types/universal_encounter_create.rb +944 -0
  25. data/lib/candidhealth/encounters_universal/types/universal_encounter_create_base.rb +691 -0
  26. data/lib/candidhealth/encounters_universal/types/universal_encounter_create_from_pre_encounter.rb +791 -0
  27. data/lib/candidhealth/encounters_universal/types/universal_encounter_create_from_pre_encounter_base.rb +572 -0
  28. data/lib/candidhealth/encounters_universal/types/universal_encounter_update.rb +872 -0
  29. data/lib/candidhealth/encounters_universal/types/universal_encounter_update_base.rb +700 -0
  30. data/lib/candidhealth/fee_schedules/v_3/client.rb +57 -0
  31. data/lib/candidhealth/fee_schedules/v_3/types/validation_error.rb +12 -0
  32. data/lib/candidhealth/financials/types/patient_transaction_source.rb +1 -0
  33. data/lib/candidhealth/health_care_code_information/client.rb +30 -0
  34. data/lib/candidhealth/health_care_code_information/v_1/client.rb +268 -0
  35. data/lib/candidhealth/health_care_code_information/v_1/types/admitting_diagnosis.rb +236 -0
  36. data/lib/candidhealth/health_care_code_information/v_1/types/admitting_diagnosis_code_qualifier.rb +14 -0
  37. data/lib/candidhealth/health_care_code_information/v_1/types/admitting_diagnosis_new.rb +206 -0
  38. data/lib/candidhealth/health_care_code_information/v_1/types/code_list_qualifier_code.rb +1068 -0
  39. data/lib/candidhealth/health_care_code_information/v_1/types/condition_code.rb +71 -0
  40. data/lib/candidhealth/health_care_code_information/v_1/types/condition_information.rb +237 -0
  41. data/lib/candidhealth/health_care_code_information/v_1/types/condition_information_code_qualifier.rb +13 -0
  42. data/lib/candidhealth/health_care_code_information/v_1/types/condition_information_new.rb +207 -0
  43. data/lib/candidhealth/health_care_code_information/v_1/types/date_time_period_format_qualifier.rb +54 -0
  44. data/lib/candidhealth/health_care_code_information/v_1/types/diagnosis_related_group.rb +236 -0
  45. data/lib/candidhealth/health_care_code_information/v_1/types/diagnosis_related_group_code_qualifier.rb +13 -0
  46. data/lib/candidhealth/health_care_code_information/v_1/types/diagnosis_related_group_new.rb +206 -0
  47. data/lib/candidhealth/health_care_code_information/v_1/types/external_cause_of_injury.rb +245 -0
  48. data/lib/candidhealth/health_care_code_information/v_1/types/external_cause_of_injury_code_qualifier.rb +14 -0
  49. data/lib/candidhealth/health_care_code_information/v_1/types/external_cause_of_injury_new.rb +245 -0
  50. data/lib/candidhealth/health_care_code_information/v_1/types/health_care_code_information.rb +218 -0
  51. data/lib/candidhealth/health_care_code_information/v_1/types/health_care_code_information_create.rb +225 -0
  52. data/lib/candidhealth/health_care_code_information/v_1/types/health_care_code_information_get_all_response.rb +227 -0
  53. data/lib/candidhealth/health_care_code_information/v_1/types/health_care_code_information_new.rb +188 -0
  54. data/lib/candidhealth/health_care_code_information/v_1/types/health_care_code_information_update.rb +225 -0
  55. data/lib/candidhealth/health_care_code_information/v_1/types/occurrence_code.rb +71 -0
  56. data/lib/candidhealth/health_care_code_information/v_1/types/occurrence_information.rb +249 -0
  57. data/lib/candidhealth/health_care_code_information/v_1/types/occurrence_information_code_qualifier.rb +13 -0
  58. data/lib/candidhealth/health_care_code_information/v_1/types/occurrence_information_new.rb +219 -0
  59. data/lib/candidhealth/health_care_code_information/v_1/types/occurrence_span_code.rb +25 -0
  60. data/lib/candidhealth/health_care_code_information/v_1/types/occurrence_span_code_qualifier.rb +13 -0
  61. data/lib/candidhealth/health_care_code_information/v_1/types/occurrence_span_information.rb +252 -0
  62. data/lib/candidhealth/health_care_code_information/v_1/types/occurrence_span_information_new.rb +222 -0
  63. data/lib/candidhealth/health_care_code_information/v_1/types/other_diagnosis_information.rb +245 -0
  64. data/lib/candidhealth/health_care_code_information/v_1/types/other_diagnosis_information_code_qualifier.rb +14 -0
  65. data/lib/candidhealth/health_care_code_information/v_1/types/other_diagnosis_information_new.rb +215 -0
  66. data/lib/candidhealth/health_care_code_information/v_1/types/other_procedure_information.rb +248 -0
  67. data/lib/candidhealth/health_care_code_information/v_1/types/other_procedure_information_code_qualifier.rb +14 -0
  68. data/lib/candidhealth/health_care_code_information/v_1/types/other_procedure_information_new.rb +218 -0
  69. data/lib/candidhealth/health_care_code_information/v_1/types/patient_reason_for_visit.rb +236 -0
  70. data/lib/candidhealth/health_care_code_information/v_1/types/patient_reason_for_visit_code_qualifier.rb +14 -0
  71. data/lib/candidhealth/health_care_code_information/v_1/types/patient_reason_for_visit_new.rb +206 -0
  72. data/lib/candidhealth/health_care_code_information/v_1/types/present_on_admission_indicator_code.rb +17 -0
  73. data/lib/candidhealth/health_care_code_information/v_1/types/principal_diagnosis.rb +245 -0
  74. data/lib/candidhealth/health_care_code_information/v_1/types/principal_diagnosis_code_qualifier.rb +14 -0
  75. data/lib/candidhealth/health_care_code_information/v_1/types/principal_diagnosis_new.rb +215 -0
  76. data/lib/candidhealth/health_care_code_information/v_1/types/principal_procedure_information.rb +246 -0
  77. data/lib/candidhealth/health_care_code_information/v_1/types/principal_procedure_information_code_qualifier.rb +15 -0
  78. data/lib/candidhealth/health_care_code_information/v_1/types/principal_procedure_information_new.rb +216 -0
  79. data/lib/candidhealth/health_care_code_information/v_1/types/rd_8_date.rb +72 -0
  80. data/lib/candidhealth/health_care_code_information/v_1/types/set_or_clear_admitting_diagnosis.rb +69 -0
  81. data/lib/candidhealth/health_care_code_information/v_1/types/set_or_clear_diagnosis_related_group.rb +69 -0
  82. data/lib/candidhealth/health_care_code_information/v_1/types/set_or_clear_principal_diagnosis.rb +69 -0
  83. data/lib/candidhealth/health_care_code_information/v_1/types/set_or_clear_principal_procedure_information.rb +71 -0
  84. data/lib/candidhealth/health_care_code_information/v_1/types/treatment_code_information.rb +236 -0
  85. data/lib/candidhealth/health_care_code_information/v_1/types/treatment_code_information_new.rb +206 -0
  86. data/lib/candidhealth/health_care_code_information/v_1/types/treatment_code_qualifier.rb +13 -0
  87. data/lib/candidhealth/health_care_code_information/v_1/types/value_code.rb +119 -0
  88. data/lib/candidhealth/health_care_code_information/v_1/types/value_code_qualifier.rb +13 -0
  89. data/lib/candidhealth/health_care_code_information/v_1/types/value_information.rb +245 -0
  90. data/lib/candidhealth/health_care_code_information/v_1/types/value_information_new.rb +215 -0
  91. data/lib/candidhealth/individual/types/patient.rb +6 -6
  92. data/lib/candidhealth/individual/types/patient_base.rb +6 -6
  93. data/lib/candidhealth/individual/types/patient_create.rb +6 -6
  94. data/lib/candidhealth/individual/types/patient_update.rb +6 -6
  95. data/lib/candidhealth/individual/types/patient_update_with_optional_address.rb +6 -6
  96. data/lib/candidhealth/organization_providers/v_2/types/license_type.rb +2 -0
  97. data/lib/candidhealth/patient_ar/client.rb +30 -0
  98. data/lib/candidhealth/patient_ar/v_1/client.rb +161 -0
  99. data/lib/candidhealth/patient_ar/v_1/types/insurance_adjustment_info.rb +60 -0
  100. data/lib/candidhealth/patient_ar/v_1/types/insurance_payment_info.rb +60 -0
  101. data/lib/candidhealth/patient_ar/v_1/types/invalid_filters_error_type.rb +60 -0
  102. data/lib/candidhealth/patient_ar/v_1/types/inventory_record.rb +101 -0
  103. data/lib/candidhealth/patient_ar/v_1/types/invoice_itemization_response.rb +103 -0
  104. data/lib/candidhealth/patient_ar/v_1/types/list_inventory_paged_response.rb +77 -0
  105. data/lib/candidhealth/patient_ar/v_1/types/non_insurance_adjustment_info.rb +60 -0
  106. data/lib/candidhealth/patient_ar/v_1/types/non_insurance_payment_info.rb +60 -0
  107. data/lib/candidhealth/patient_ar/v_1/types/patient_adjustment_info.rb +60 -0
  108. data/lib/candidhealth/patient_ar/v_1/types/patient_ar_status.rb +14 -0
  109. data/lib/candidhealth/patient_ar/v_1/types/patient_payment_allocation.rb +76 -0
  110. data/lib/candidhealth/patient_ar/v_1/types/patient_payment_info.rb +75 -0
  111. data/lib/candidhealth/patient_ar/v_1/types/service_line_itemization.rb +210 -0
  112. data/lib/candidhealth/payers/client.rb +7 -0
  113. data/lib/candidhealth/payers/v_4/client.rb +137 -0
  114. data/lib/candidhealth/payers/v_4/types/clearinghouse_payer_info.rb +93 -0
  115. data/lib/candidhealth/payers/v_4/types/payer.rb +116 -0
  116. data/lib/candidhealth/payers/v_4/types/payer_ids.rb +107 -0
  117. data/lib/candidhealth/payers/v_4/types/payer_page.rb +88 -0
  118. data/lib/candidhealth/payers/v_4/types/support_state.rb +15 -0
  119. data/lib/candidhealth/pre_encounter/coverages/v_1/client.rb +4 -4
  120. data/lib/candidhealth/pre_encounter/coverages/v_1/types/subscriber.rb +3 -3
  121. data/lib/candidhealth/pre_encounter/patients/v_1/client.rb +204 -6
  122. data/lib/candidhealth/pre_encounter/patients/v_1/types/guarantor.rb +3 -3
  123. data/lib/candidhealth/pre_encounter/patients/v_1/types/inferred_patient_metadata.rb +80 -0
  124. data/lib/candidhealth/pre_encounter/patients/v_1/types/mutable_patient.rb +33 -5
  125. data/lib/candidhealth/pre_encounter/patients/v_1/types/mutable_patient_with_mrn.rb +33 -5
  126. data/lib/candidhealth/pre_encounter/patients/v_1/types/origination_detail.rb +104 -0
  127. data/lib/candidhealth/pre_encounter/patients/v_1/types/patient.rb +32 -4
  128. data/lib/candidhealth/pre_encounter/patients/v_1/types/referral_source.rb +18 -0
  129. data/lib/candidhealth/pre_encounter/patients/v_1/types/referral_type.rb +17 -0
  130. data/lib/candidhealth/pre_encounter/patients/v_1/types/specialization_category.rb +42 -0
  131. data/lib/candidhealth/service_lines/v_2/client.rb +252 -10
  132. data/lib/candidhealth/service_lines/v_2/types/service_line.rb +28 -10
  133. data/lib/candidhealth/service_lines/v_2/types/service_line_create.rb +52 -40
  134. data/lib/candidhealth/service_lines/v_2/types/service_line_create_base.rb +251 -0
  135. data/lib/candidhealth/service_lines/v_2/types/service_line_create_base_base.rb +243 -0
  136. data/lib/candidhealth/service_lines/v_2/types/service_line_create_optional.rb +48 -24
  137. data/lib/candidhealth/service_lines/v_2/types/service_line_create_standalone.rb +58 -46
  138. data/lib/candidhealth/service_lines/v_2/types/service_line_create_standalone_base.rb +273 -0
  139. data/lib/candidhealth/service_lines/v_2/types/service_line_create_standalone_base_base.rb +265 -0
  140. data/lib/candidhealth/service_lines/v_2/types/service_line_update.rb +64 -54
  141. data/lib/candidhealth/service_lines/v_2/types/service_line_update_base.rb +263 -0
  142. data/lib/candidhealth/service_lines/v_2/types/universal_service_line_create.rb +271 -0
  143. data/lib/candidhealth/service_lines/v_2/types/universal_service_line_create_standalone.rb +317 -0
  144. data/lib/candidhealth/service_lines/v_2/types/universal_service_line_update.rb +307 -0
  145. data/lib/candidhealth/x_12/v_1/types/type_of_bill_composite.rb +2 -2
  146. data/lib/candidhealth/x_12/v_1/types/type_of_bill_composite_base.rb +90 -0
  147. data/lib/candidhealth/x_12/v_1/types/type_of_bill_composite_update.rb +112 -0
  148. data/lib/candidhealth.rb +21 -7
  149. data/lib/requests.rb +2 -2
  150. data/lib/types_export.rb +116 -13
  151. metadata +109 -2
@@ -0,0 +1,218 @@
1
+ # frozen_string_literal: true
2
+
3
+ require_relative "code_list_qualifier_code"
4
+ require_relative "date_time_period_format_qualifier"
5
+ require "ostruct"
6
+ require "json"
7
+
8
+ module CandidApiClient
9
+ module HealthCareCodeInformation
10
+ module V1
11
+ module Types
12
+ class HealthCareCodeInformation
13
+ # @return [String] The id of this health care code information if it is already stored.
14
+ # If this is not set, this is referring to a new health care code information to
15
+ # be added
16
+ # to the encounter. If it is set, this refers to an update of an existing health
17
+ # care code
18
+ # information object on the encounter.
19
+ attr_reader :id
20
+ # @return [String] The encounter_id of this health care code information if it is already stored.
21
+ # This will be set by the server in responses, but clients are not expected to set
22
+ # it.
23
+ attr_reader :encounter_id
24
+ # @return [CandidApiClient::HealthCareCodeInformation::V1::Types::CodeListQualifierCode]
25
+ attr_reader :code_list_qualifier
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_1
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_2
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_3
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_4
46
+ # @return [CandidApiClient::HealthCareCodeInformation::V1::Types::DateTimePeriodFormatQualifier] Controls how the date_time_period field is interpreted and is submitted
47
+ # as part of claim process.
48
+ # You do not need to set this field generally, instead it is provided as advisory
49
+ # context on how this HealthCareCodeInformation's data will be available in
50
+ # reporting.
51
+ attr_reader :date_time_period_format_qualifier
52
+ # @return [String] A string, formatted according to date_time_period_format_qualifier, which
53
+ # ultimately represents the date time period in which an information object
54
+ # is covering.
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 :date_time_period
59
+ # @return [String] A decimal used to represent ValueInformation results.
60
+ # You do not need to set this field generally, instead it is provided as advisory
61
+ # context on how this HealthCareCodeInformation's data will be available in
62
+ # reporting.
63
+ attr_reader :monetary_amount
64
+ # @return [String] You do not need to set this field generally, instead it is provided as advisory
65
+ # context on how this HealthCareCodeInformation's data will be available in
66
+ # reporting.
67
+ attr_reader :quantity
68
+ # @return [OpenStruct] Additional properties unmapped to the current class definition
69
+ attr_reader :additional_properties
70
+ # @return [Object]
71
+ attr_reader :_field_set
72
+ protected :_field_set
73
+
74
+ OMIT = Object.new
75
+
76
+ # @param id [String] The id of this health care code information if it is already stored.
77
+ # If this is not set, this is referring to a new health care code information to
78
+ # be added
79
+ # to the encounter. If it is set, this refers to an update of an existing health
80
+ # care code
81
+ # information object on the encounter.
82
+ # @param encounter_id [String] The encounter_id of this health care code information if it is already stored.
83
+ # This will be set by the server in responses, but clients are not expected to set
84
+ # it.
85
+ # @param code_list_qualifier [CandidApiClient::HealthCareCodeInformation::V1::Types::CodeListQualifierCode]
86
+ # @param industry_code_1 [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_2 [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 industry_code_3 [String] A code string whose interpretation depends on the code_list_qualifier being set.
95
+ # You do not need to set this field generally, instead it is provided as advisory
96
+ # context on how this HealthCareCodeInformation's data will be available in
97
+ # reporting.
98
+ # @param industry_code_4 [String] A code string whose interpretation depends on the code_list_qualifier being set.
99
+ # You do not need to set this field generally, instead it is provided as advisory
100
+ # context on how this HealthCareCodeInformation's data will be available in
101
+ # reporting.
102
+ # @param date_time_period_format_qualifier [CandidApiClient::HealthCareCodeInformation::V1::Types::DateTimePeriodFormatQualifier] Controls how the date_time_period field is interpreted and is submitted
103
+ # as part of claim process.
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 date_time_period [String] A string, formatted according to date_time_period_format_qualifier, which
108
+ # ultimately represents the date time period in which an information object
109
+ # is covering.
110
+ # 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 monetary_amount [String] A decimal used to represent ValueInformation results.
114
+ # You do not need to set this field generally, instead it is provided as advisory
115
+ # context on how this HealthCareCodeInformation's data will be available in
116
+ # reporting.
117
+ # @param quantity [String] 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 additional_properties [OpenStruct] Additional properties unmapped to the current class definition
121
+ # @return [CandidApiClient::HealthCareCodeInformation::V1::Types::HealthCareCodeInformation]
122
+ def initialize(id: OMIT, encounter_id: OMIT, code_list_qualifier: OMIT, industry_code_1: OMIT,
123
+ 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)
124
+ @id = id if id != OMIT
125
+ @encounter_id = encounter_id if encounter_id != OMIT
126
+ @code_list_qualifier = code_list_qualifier if code_list_qualifier != OMIT
127
+ @industry_code_1 = industry_code_1 if industry_code_1 != OMIT
128
+ @industry_code_2 = industry_code_2 if industry_code_2 != OMIT
129
+ @industry_code_3 = industry_code_3 if industry_code_3 != OMIT
130
+ @industry_code_4 = industry_code_4 if industry_code_4 != OMIT
131
+ if date_time_period_format_qualifier != OMIT
132
+ @date_time_period_format_qualifier = date_time_period_format_qualifier
133
+ end
134
+ @date_time_period = date_time_period if date_time_period != OMIT
135
+ @monetary_amount = monetary_amount if monetary_amount != OMIT
136
+ @quantity = quantity if quantity != OMIT
137
+ @additional_properties = additional_properties
138
+ @_field_set = {
139
+ "id": id,
140
+ "encounter_id": encounter_id,
141
+ "code_list_qualifier": code_list_qualifier,
142
+ "industry_code_1": industry_code_1,
143
+ "industry_code_2": industry_code_2,
144
+ "industry_code_3": industry_code_3,
145
+ "industry_code_4": industry_code_4,
146
+ "date_time_period_format_qualifier": date_time_period_format_qualifier,
147
+ "date_time_period": date_time_period,
148
+ "monetary_amount": monetary_amount,
149
+ "quantity": quantity
150
+ }.reject do |_k, v|
151
+ v == OMIT
152
+ end
153
+ end
154
+
155
+ # Deserialize a JSON object to an instance of HealthCareCodeInformation
156
+ #
157
+ # @param json_object [String]
158
+ # @return [CandidApiClient::HealthCareCodeInformation::V1::Types::HealthCareCodeInformation]
159
+ def self.from_json(json_object:)
160
+ struct = JSON.parse(json_object, object_class: OpenStruct)
161
+ id = struct["id"]
162
+ encounter_id = struct["encounter_id"]
163
+ code_list_qualifier = struct["code_list_qualifier"]
164
+ industry_code_1 = struct["industry_code_1"]
165
+ industry_code_2 = struct["industry_code_2"]
166
+ industry_code_3 = struct["industry_code_3"]
167
+ industry_code_4 = struct["industry_code_4"]
168
+ date_time_period_format_qualifier = struct["date_time_period_format_qualifier"]
169
+ date_time_period = struct["date_time_period"]
170
+ monetary_amount = struct["monetary_amount"]
171
+ quantity = struct["quantity"]
172
+ new(
173
+ id: id,
174
+ encounter_id: encounter_id,
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 HealthCareCodeInformation 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.id&.is_a?(String) != false || raise("Passed value for field obj.id is not the expected type, validation failed.")
203
+ obj.encounter_id&.is_a?(String) != false || raise("Passed value for field obj.encounter_id 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,225 @@
1
+ # frozen_string_literal: true
2
+
3
+ require_relative "principal_diagnosis_new"
4
+ require_relative "admitting_diagnosis_new"
5
+ require_relative "patient_reason_for_visit_new"
6
+ require_relative "external_cause_of_injury_new"
7
+ require_relative "diagnosis_related_group_new"
8
+ require_relative "other_diagnosis_information_new"
9
+ require_relative "principal_procedure_information_new"
10
+ require_relative "other_procedure_information_new"
11
+ require_relative "occurrence_span_information_new"
12
+ require_relative "occurrence_information_new"
13
+ require_relative "treatment_code_information_new"
14
+ require_relative "value_information_new"
15
+ require_relative "condition_information_new"
16
+ require "ostruct"
17
+ require "json"
18
+
19
+ module CandidApiClient
20
+ module HealthCareCodeInformation
21
+ module V1
22
+ module Types
23
+ class HealthCareCodeInformationCreate
24
+ # @return [CandidApiClient::HealthCareCodeInformation::V1::Types::PrincipalDiagnosisNew]
25
+ attr_reader :principal_diagnosis
26
+ # @return [CandidApiClient::HealthCareCodeInformation::V1::Types::AdmittingDiagnosisNew]
27
+ attr_reader :admitting_diagnosis
28
+ # @return [Array<CandidApiClient::HealthCareCodeInformation::V1::Types::PatientReasonForVisitNew>]
29
+ attr_reader :patient_reasons_for_visit
30
+ # @return [Array<CandidApiClient::HealthCareCodeInformation::V1::Types::ExternalCauseOfInjuryNew>]
31
+ attr_reader :external_causes_of_injury
32
+ # @return [CandidApiClient::HealthCareCodeInformation::V1::Types::DiagnosisRelatedGroupNew]
33
+ attr_reader :diagnosis_related_groups
34
+ # @return [Array<CandidApiClient::HealthCareCodeInformation::V1::Types::OtherDiagnosisInformationNew>]
35
+ attr_reader :other_diagnosis_information
36
+ # @return [CandidApiClient::HealthCareCodeInformation::V1::Types::PrincipalProcedureInformationNew]
37
+ attr_reader :principal_procedure
38
+ # @return [Array<CandidApiClient::HealthCareCodeInformation::V1::Types::OtherProcedureInformationNew>]
39
+ attr_reader :other_procedure_information
40
+ # @return [Array<CandidApiClient::HealthCareCodeInformation::V1::Types::OccurrenceSpanInformationNew>]
41
+ attr_reader :occurrence_span_information
42
+ # @return [Array<CandidApiClient::HealthCareCodeInformation::V1::Types::OccurrenceInformationNew>]
43
+ attr_reader :occurrence_information
44
+ # @return [Array<CandidApiClient::HealthCareCodeInformation::V1::Types::TreatmentCodeInformationNew>]
45
+ attr_reader :treatment_code_information
46
+ # @return [Array<CandidApiClient::HealthCareCodeInformation::V1::Types::ValueInformationNew>]
47
+ attr_reader :value_information
48
+ # @return [Array<CandidApiClient::HealthCareCodeInformation::V1::Types::ConditionInformationNew>]
49
+ attr_reader :condition_information
50
+ # @return [OpenStruct] Additional properties unmapped to the current class definition
51
+ attr_reader :additional_properties
52
+ # @return [Object]
53
+ attr_reader :_field_set
54
+ protected :_field_set
55
+
56
+ OMIT = Object.new
57
+
58
+ # @param principal_diagnosis [CandidApiClient::HealthCareCodeInformation::V1::Types::PrincipalDiagnosisNew]
59
+ # @param admitting_diagnosis [CandidApiClient::HealthCareCodeInformation::V1::Types::AdmittingDiagnosisNew]
60
+ # @param patient_reasons_for_visit [Array<CandidApiClient::HealthCareCodeInformation::V1::Types::PatientReasonForVisitNew>]
61
+ # @param external_causes_of_injury [Array<CandidApiClient::HealthCareCodeInformation::V1::Types::ExternalCauseOfInjuryNew>]
62
+ # @param diagnosis_related_groups [CandidApiClient::HealthCareCodeInformation::V1::Types::DiagnosisRelatedGroupNew]
63
+ # @param other_diagnosis_information [Array<CandidApiClient::HealthCareCodeInformation::V1::Types::OtherDiagnosisInformationNew>]
64
+ # @param principal_procedure [CandidApiClient::HealthCareCodeInformation::V1::Types::PrincipalProcedureInformationNew]
65
+ # @param other_procedure_information [Array<CandidApiClient::HealthCareCodeInformation::V1::Types::OtherProcedureInformationNew>]
66
+ # @param occurrence_span_information [Array<CandidApiClient::HealthCareCodeInformation::V1::Types::OccurrenceSpanInformationNew>]
67
+ # @param occurrence_information [Array<CandidApiClient::HealthCareCodeInformation::V1::Types::OccurrenceInformationNew>]
68
+ # @param treatment_code_information [Array<CandidApiClient::HealthCareCodeInformation::V1::Types::TreatmentCodeInformationNew>]
69
+ # @param value_information [Array<CandidApiClient::HealthCareCodeInformation::V1::Types::ValueInformationNew>]
70
+ # @param condition_information [Array<CandidApiClient::HealthCareCodeInformation::V1::Types::ConditionInformationNew>]
71
+ # @param additional_properties [OpenStruct] Additional properties unmapped to the current class definition
72
+ # @return [CandidApiClient::HealthCareCodeInformation::V1::Types::HealthCareCodeInformationCreate]
73
+ def initialize(principal_diagnosis: OMIT, admitting_diagnosis: OMIT, patient_reasons_for_visit: OMIT,
74
+ external_causes_of_injury: OMIT, diagnosis_related_groups: OMIT, other_diagnosis_information: OMIT, principal_procedure: OMIT, other_procedure_information: OMIT, occurrence_span_information: OMIT, occurrence_information: OMIT, treatment_code_information: OMIT, value_information: OMIT, condition_information: OMIT, additional_properties: nil)
75
+ @principal_diagnosis = principal_diagnosis if principal_diagnosis != OMIT
76
+ @admitting_diagnosis = admitting_diagnosis if admitting_diagnosis != OMIT
77
+ @patient_reasons_for_visit = patient_reasons_for_visit if patient_reasons_for_visit != OMIT
78
+ @external_causes_of_injury = external_causes_of_injury if external_causes_of_injury != OMIT
79
+ @diagnosis_related_groups = diagnosis_related_groups if diagnosis_related_groups != OMIT
80
+ @other_diagnosis_information = other_diagnosis_information if other_diagnosis_information != OMIT
81
+ @principal_procedure = principal_procedure if principal_procedure != OMIT
82
+ @other_procedure_information = other_procedure_information if other_procedure_information != OMIT
83
+ @occurrence_span_information = occurrence_span_information if occurrence_span_information != OMIT
84
+ @occurrence_information = occurrence_information if occurrence_information != OMIT
85
+ @treatment_code_information = treatment_code_information if treatment_code_information != OMIT
86
+ @value_information = value_information if value_information != OMIT
87
+ @condition_information = condition_information if condition_information != OMIT
88
+ @additional_properties = additional_properties
89
+ @_field_set = {
90
+ "principal_diagnosis": principal_diagnosis,
91
+ "admitting_diagnosis": admitting_diagnosis,
92
+ "patient_reasons_for_visit": patient_reasons_for_visit,
93
+ "external_causes_of_injury": external_causes_of_injury,
94
+ "diagnosis_related_groups": diagnosis_related_groups,
95
+ "other_diagnosis_information": other_diagnosis_information,
96
+ "principal_procedure": principal_procedure,
97
+ "other_procedure_information": other_procedure_information,
98
+ "occurrence_span_information": occurrence_span_information,
99
+ "occurrence_information": occurrence_information,
100
+ "treatment_code_information": treatment_code_information,
101
+ "value_information": value_information,
102
+ "condition_information": condition_information
103
+ }.reject do |_k, v|
104
+ v == OMIT
105
+ end
106
+ end
107
+
108
+ # Deserialize a JSON object to an instance of HealthCareCodeInformationCreate
109
+ #
110
+ # @param json_object [String]
111
+ # @return [CandidApiClient::HealthCareCodeInformation::V1::Types::HealthCareCodeInformationCreate]
112
+ def self.from_json(json_object:)
113
+ struct = JSON.parse(json_object, object_class: OpenStruct)
114
+ parsed_json = JSON.parse(json_object)
115
+ if parsed_json["principal_diagnosis"].nil?
116
+ principal_diagnosis = nil
117
+ else
118
+ principal_diagnosis = parsed_json["principal_diagnosis"].to_json
119
+ principal_diagnosis = CandidApiClient::HealthCareCodeInformation::V1::Types::PrincipalDiagnosisNew.from_json(json_object: principal_diagnosis)
120
+ end
121
+ if parsed_json["admitting_diagnosis"].nil?
122
+ admitting_diagnosis = nil
123
+ else
124
+ admitting_diagnosis = parsed_json["admitting_diagnosis"].to_json
125
+ admitting_diagnosis = CandidApiClient::HealthCareCodeInformation::V1::Types::AdmittingDiagnosisNew.from_json(json_object: admitting_diagnosis)
126
+ end
127
+ patient_reasons_for_visit = parsed_json["patient_reasons_for_visit"]&.map do |item|
128
+ item = item.to_json
129
+ CandidApiClient::HealthCareCodeInformation::V1::Types::PatientReasonForVisitNew.from_json(json_object: item)
130
+ end
131
+ external_causes_of_injury = parsed_json["external_causes_of_injury"]&.map do |item|
132
+ item = item.to_json
133
+ CandidApiClient::HealthCareCodeInformation::V1::Types::ExternalCauseOfInjuryNew.from_json(json_object: item)
134
+ end
135
+ if parsed_json["diagnosis_related_groups"].nil?
136
+ diagnosis_related_groups = nil
137
+ else
138
+ diagnosis_related_groups = parsed_json["diagnosis_related_groups"].to_json
139
+ diagnosis_related_groups = CandidApiClient::HealthCareCodeInformation::V1::Types::DiagnosisRelatedGroupNew.from_json(json_object: diagnosis_related_groups)
140
+ end
141
+ other_diagnosis_information = parsed_json["other_diagnosis_information"]&.map do |item|
142
+ item = item.to_json
143
+ CandidApiClient::HealthCareCodeInformation::V1::Types::OtherDiagnosisInformationNew.from_json(json_object: item)
144
+ end
145
+ if parsed_json["principal_procedure"].nil?
146
+ principal_procedure = nil
147
+ else
148
+ principal_procedure = parsed_json["principal_procedure"].to_json
149
+ principal_procedure = CandidApiClient::HealthCareCodeInformation::V1::Types::PrincipalProcedureInformationNew.from_json(json_object: principal_procedure)
150
+ end
151
+ other_procedure_information = parsed_json["other_procedure_information"]&.map do |item|
152
+ item = item.to_json
153
+ CandidApiClient::HealthCareCodeInformation::V1::Types::OtherProcedureInformationNew.from_json(json_object: item)
154
+ end
155
+ occurrence_span_information = parsed_json["occurrence_span_information"]&.map do |item|
156
+ item = item.to_json
157
+ CandidApiClient::HealthCareCodeInformation::V1::Types::OccurrenceSpanInformationNew.from_json(json_object: item)
158
+ end
159
+ occurrence_information = parsed_json["occurrence_information"]&.map do |item|
160
+ item = item.to_json
161
+ CandidApiClient::HealthCareCodeInformation::V1::Types::OccurrenceInformationNew.from_json(json_object: item)
162
+ end
163
+ treatment_code_information = parsed_json["treatment_code_information"]&.map do |item|
164
+ item = item.to_json
165
+ CandidApiClient::HealthCareCodeInformation::V1::Types::TreatmentCodeInformationNew.from_json(json_object: item)
166
+ end
167
+ value_information = parsed_json["value_information"]&.map do |item|
168
+ item = item.to_json
169
+ CandidApiClient::HealthCareCodeInformation::V1::Types::ValueInformationNew.from_json(json_object: item)
170
+ end
171
+ condition_information = parsed_json["condition_information"]&.map do |item|
172
+ item = item.to_json
173
+ CandidApiClient::HealthCareCodeInformation::V1::Types::ConditionInformationNew.from_json(json_object: item)
174
+ end
175
+ new(
176
+ principal_diagnosis: principal_diagnosis,
177
+ admitting_diagnosis: admitting_diagnosis,
178
+ patient_reasons_for_visit: patient_reasons_for_visit,
179
+ external_causes_of_injury: external_causes_of_injury,
180
+ diagnosis_related_groups: diagnosis_related_groups,
181
+ other_diagnosis_information: other_diagnosis_information,
182
+ principal_procedure: principal_procedure,
183
+ other_procedure_information: other_procedure_information,
184
+ occurrence_span_information: occurrence_span_information,
185
+ occurrence_information: occurrence_information,
186
+ treatment_code_information: treatment_code_information,
187
+ value_information: value_information,
188
+ condition_information: condition_information,
189
+ additional_properties: struct
190
+ )
191
+ end
192
+
193
+ # Serialize an instance of HealthCareCodeInformationCreate to a JSON object
194
+ #
195
+ # @return [String]
196
+ def to_json(*_args)
197
+ @_field_set&.to_json
198
+ end
199
+
200
+ # Leveraged for Union-type generation, validate_raw attempts to parse the given
201
+ # hash and check each fields type against the current object's property
202
+ # definitions.
203
+ #
204
+ # @param obj [Object]
205
+ # @return [Void]
206
+ def self.validate_raw(obj:)
207
+ obj.principal_diagnosis.nil? || CandidApiClient::HealthCareCodeInformation::V1::Types::PrincipalDiagnosisNew.validate_raw(obj: obj.principal_diagnosis)
208
+ obj.admitting_diagnosis.nil? || CandidApiClient::HealthCareCodeInformation::V1::Types::AdmittingDiagnosisNew.validate_raw(obj: obj.admitting_diagnosis)
209
+ obj.patient_reasons_for_visit&.is_a?(Array) != false || raise("Passed value for field obj.patient_reasons_for_visit is not the expected type, validation failed.")
210
+ obj.external_causes_of_injury&.is_a?(Array) != false || raise("Passed value for field obj.external_causes_of_injury is not the expected type, validation failed.")
211
+ obj.diagnosis_related_groups.nil? || CandidApiClient::HealthCareCodeInformation::V1::Types::DiagnosisRelatedGroupNew.validate_raw(obj: obj.diagnosis_related_groups)
212
+ obj.other_diagnosis_information&.is_a?(Array) != false || raise("Passed value for field obj.other_diagnosis_information is not the expected type, validation failed.")
213
+ obj.principal_procedure.nil? || CandidApiClient::HealthCareCodeInformation::V1::Types::PrincipalProcedureInformationNew.validate_raw(obj: obj.principal_procedure)
214
+ obj.other_procedure_information&.is_a?(Array) != false || raise("Passed value for field obj.other_procedure_information is not the expected type, validation failed.")
215
+ obj.occurrence_span_information&.is_a?(Array) != false || raise("Passed value for field obj.occurrence_span_information is not the expected type, validation failed.")
216
+ obj.occurrence_information&.is_a?(Array) != false || raise("Passed value for field obj.occurrence_information is not the expected type, validation failed.")
217
+ obj.treatment_code_information&.is_a?(Array) != false || raise("Passed value for field obj.treatment_code_information is not the expected type, validation failed.")
218
+ obj.value_information&.is_a?(Array) != false || raise("Passed value for field obj.value_information is not the expected type, validation failed.")
219
+ obj.condition_information&.is_a?(Array) != false || raise("Passed value for field obj.condition_information is not the expected type, validation failed.")
220
+ end
221
+ end
222
+ end
223
+ end
224
+ end
225
+ end