candidhealth 0.34.3 → 0.34.4
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.
- checksums.yaml +4 -4
- data/lib/candidhealth/encounters/v_4/client.rb +4 -0
- data/lib/candidhealth/service_lines/v_2/client.rb +2 -0
- data/lib/candidhealth/service_lines/v_2/types/service_line.rb +16 -2
- data/lib/candidhealth/service_lines/v_2/types/service_line_create.rb +16 -2
- data/lib/candidhealth/service_lines/v_2/types/service_line_update.rb +16 -2
- data/lib/candidhealth/service_lines/v_2/types/test_result.rb +95 -0
- data/lib/requests.rb +2 -2
- data/lib/types_export.rb +1 -0
- metadata +2 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: a40f15e4d1b63a6fe635e7e729fc20b8b1ddafea02f8933fe84f995b5e5b159d
|
4
|
+
data.tar.gz: bc3a37039038ef460ea141ee3009b9c0232ea984b5c1d029a448bfa9d464133b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b5dda877603cc5abb8096fe465f845e8af9750e5f91121cce75b878c9e90ee70d5fe7411104ba7ffb27705d84417a598a7891ebc5accd1018313289c04411eb7
|
7
|
+
data.tar.gz: '00981270a53061428af7ec2bed30246b03a307adbc7197a7b02d11be0eb855634ed121dee1eba34275521d9182fc2e0defbedff0ae77b1336a29314be641239c'
|
@@ -497,6 +497,7 @@ module CandidApiClient
|
|
497
497
|
# * :first_name (String)
|
498
498
|
# * :last_name (String)
|
499
499
|
# * :organization_name (String)
|
500
|
+
# * :test_result (Hash)
|
500
501
|
# @param guarantor [Hash] Personal and contact info for the guarantor of the patient responsibility.Request of type CandidApiClient::Guarantor::V1::Types::GuarantorCreate, as a Hash
|
501
502
|
# * :phone_numbers (Array<CandidApiClient::Commons::Types::PhoneNumber>)
|
502
503
|
# * :phone_consent (Boolean)
|
@@ -885,6 +886,7 @@ module CandidApiClient
|
|
885
886
|
# * :first_name (String)
|
886
887
|
# * :last_name (String)
|
887
888
|
# * :organization_name (String)
|
889
|
+
# * :test_result (Hash)
|
888
890
|
# @param external_claim_submission [Hash] ***This field is in beta.***
|
889
891
|
# To be included for claims that have been submitted outside of Candid.
|
890
892
|
# Candid supports posting remits and payments to these claims and working them
|
@@ -1820,6 +1822,7 @@ module CandidApiClient
|
|
1820
1822
|
# * :first_name (String)
|
1821
1823
|
# * :last_name (String)
|
1822
1824
|
# * :organization_name (String)
|
1825
|
+
# * :test_result (Hash)
|
1823
1826
|
# @param guarantor [Hash] Personal and contact info for the guarantor of the patient responsibility.Request of type CandidApiClient::Guarantor::V1::Types::GuarantorCreate, as a Hash
|
1824
1827
|
# * :phone_numbers (Array<CandidApiClient::Commons::Types::PhoneNumber>)
|
1825
1828
|
# * :phone_consent (Boolean)
|
@@ -2210,6 +2213,7 @@ module CandidApiClient
|
|
2210
2213
|
# * :first_name (String)
|
2211
2214
|
# * :last_name (String)
|
2212
2215
|
# * :organization_name (String)
|
2216
|
+
# * :test_result (Hash)
|
2213
2217
|
# @param external_claim_submission [Hash] ***This field is in beta.***
|
2214
2218
|
# To be included for claims that have been submitted outside of Candid.
|
2215
2219
|
# Candid supports posting remits and payments to these claims and working them
|
@@ -83,6 +83,7 @@ module CandidApiClient
|
|
83
83
|
# * :description (String)
|
84
84
|
# * :date_of_service (Date)
|
85
85
|
# * :end_date_of_service (Date)
|
86
|
+
# * :test_result (Hash)
|
86
87
|
# @param request_options [CandidApiClient::RequestOptions]
|
87
88
|
# @return [CandidApiClient::ServiceLines::V2::Types::ServiceLine]
|
88
89
|
# @example
|
@@ -201,6 +202,7 @@ module CandidApiClient
|
|
201
202
|
# * :description (String)
|
202
203
|
# * :date_of_service (Date)
|
203
204
|
# * :end_date_of_service (Date)
|
205
|
+
# * :test_result (Hash)
|
204
206
|
# @param request_options [CandidApiClient::RequestOptions]
|
205
207
|
# @return [CandidApiClient::ServiceLines::V2::Types::ServiceLine]
|
206
208
|
# @example
|
@@ -12,6 +12,7 @@ require_relative "../../../encounter_providers/v_2/types/encounter_provider"
|
|
12
12
|
require_relative "../../../commons/types/service_line_units"
|
13
13
|
require_relative "../../../commons/types/date_range_optional_end"
|
14
14
|
require "date"
|
15
|
+
require_relative "test_result"
|
15
16
|
require "ostruct"
|
16
17
|
require "json"
|
17
18
|
|
@@ -89,6 +90,8 @@ module CandidApiClient
|
|
89
90
|
attr_reader :date_of_service
|
90
91
|
# @return [Date]
|
91
92
|
attr_reader :end_date_of_service
|
93
|
+
# @return [CandidApiClient::ServiceLines::V2::Types::TestResult] Contains a single test result value. Maps to MEA-02 on the 837-P.
|
94
|
+
attr_reader :test_result
|
92
95
|
# @return [OpenStruct] Additional properties unmapped to the current class definition
|
93
96
|
attr_reader :additional_properties
|
94
97
|
# @return [Object]
|
@@ -134,10 +137,11 @@ module CandidApiClient
|
|
134
137
|
# Maps to SV1-01, C003-07 on the 837-P.
|
135
138
|
# @param date_of_service [Date]
|
136
139
|
# @param end_date_of_service [Date]
|
140
|
+
# @param test_result [CandidApiClient::ServiceLines::V2::Types::TestResult] Contains a single test result value. Maps to MEA-02 on the 837-P.
|
137
141
|
# @param additional_properties [OpenStruct] Additional properties unmapped to the current class definition
|
138
142
|
# @return [CandidApiClient::ServiceLines::V2::Types::ServiceLine]
|
139
143
|
def initialize(service_line_id:, procedure_code:, quantity:, units:, claim_id:, date_of_service_range:, date_of_service:, modifiers: OMIT, charge_amount_cents: OMIT, allowed_amount_cents: OMIT,
|
140
|
-
insurance_balance_cents: OMIT, patient_balance_cents: OMIT, paid_amount_cents: OMIT, primary_paid_amount_cents: OMIT, secondary_paid_amount_cents: OMIT, tertiary_paid_amount_cents: OMIT, patient_responsibility_cents: OMIT, diagnosis_id_zero: OMIT, diagnosis_id_one: OMIT, diagnosis_id_two: OMIT, diagnosis_id_three: OMIT, drug_identification: OMIT, service_line_era_data: OMIT, service_line_manual_adjustments: OMIT, related_invoices: OMIT, related_invoice_info: OMIT, denial_reason: OMIT, place_of_service_code: OMIT, place_of_service_code_as_submitted: OMIT, ordering_provider: OMIT, description: OMIT, end_date_of_service: OMIT, additional_properties: nil)
|
144
|
+
insurance_balance_cents: OMIT, patient_balance_cents: OMIT, paid_amount_cents: OMIT, primary_paid_amount_cents: OMIT, secondary_paid_amount_cents: OMIT, tertiary_paid_amount_cents: OMIT, patient_responsibility_cents: OMIT, diagnosis_id_zero: OMIT, diagnosis_id_one: OMIT, diagnosis_id_two: OMIT, diagnosis_id_three: OMIT, drug_identification: OMIT, service_line_era_data: OMIT, service_line_manual_adjustments: OMIT, related_invoices: OMIT, related_invoice_info: OMIT, denial_reason: OMIT, place_of_service_code: OMIT, place_of_service_code_as_submitted: OMIT, ordering_provider: OMIT, description: OMIT, end_date_of_service: OMIT, test_result: OMIT, additional_properties: nil)
|
141
145
|
@modifiers = modifiers if modifiers != OMIT
|
142
146
|
@charge_amount_cents = charge_amount_cents if charge_amount_cents != OMIT
|
143
147
|
@allowed_amount_cents = allowed_amount_cents if allowed_amount_cents != OMIT
|
@@ -174,6 +178,7 @@ module CandidApiClient
|
|
174
178
|
@description = description if description != OMIT
|
175
179
|
@date_of_service = date_of_service
|
176
180
|
@end_date_of_service = end_date_of_service if end_date_of_service != OMIT
|
181
|
+
@test_result = test_result if test_result != OMIT
|
177
182
|
@additional_properties = additional_properties
|
178
183
|
@_field_set = {
|
179
184
|
"modifiers": modifiers,
|
@@ -207,7 +212,8 @@ module CandidApiClient
|
|
207
212
|
"date_of_service_range": date_of_service_range,
|
208
213
|
"description": description,
|
209
214
|
"date_of_service": date_of_service,
|
210
|
-
"end_date_of_service": end_date_of_service
|
215
|
+
"end_date_of_service": end_date_of_service,
|
216
|
+
"test_result": test_result
|
211
217
|
}.reject do |_k, v|
|
212
218
|
v == OMIT
|
213
219
|
end
|
@@ -288,6 +294,12 @@ module CandidApiClient
|
|
288
294
|
end_date_of_service = unless parsed_json["end_date_of_service"].nil?
|
289
295
|
Date.parse(parsed_json["end_date_of_service"])
|
290
296
|
end
|
297
|
+
if parsed_json["test_result"].nil?
|
298
|
+
test_result = nil
|
299
|
+
else
|
300
|
+
test_result = parsed_json["test_result"].to_json
|
301
|
+
test_result = CandidApiClient::ServiceLines::V2::Types::TestResult.from_json(json_object: test_result)
|
302
|
+
end
|
291
303
|
new(
|
292
304
|
modifiers: modifiers,
|
293
305
|
charge_amount_cents: charge_amount_cents,
|
@@ -321,6 +333,7 @@ module CandidApiClient
|
|
321
333
|
description: description,
|
322
334
|
date_of_service: date_of_service,
|
323
335
|
end_date_of_service: end_date_of_service,
|
336
|
+
test_result: test_result,
|
324
337
|
additional_properties: struct
|
325
338
|
)
|
326
339
|
end
|
@@ -371,6 +384,7 @@ module CandidApiClient
|
|
371
384
|
obj.description&.is_a?(String) != false || raise("Passed value for field obj.description is not the expected type, validation failed.")
|
372
385
|
obj.date_of_service.is_a?(Date) != false || raise("Passed value for field obj.date_of_service is not the expected type, validation failed.")
|
373
386
|
obj.end_date_of_service&.is_a?(Date) != false || raise("Passed value for field obj.end_date_of_service is not the expected type, validation failed.")
|
387
|
+
obj.test_result.nil? || CandidApiClient::ServiceLines::V2::Types::TestResult.validate_raw(obj: obj.test_result)
|
374
388
|
end
|
375
389
|
end
|
376
390
|
end
|
@@ -6,6 +6,7 @@ require_relative "drug_identification"
|
|
6
6
|
require_relative "../../../commons/types/facility_type_code"
|
7
7
|
require "date"
|
8
8
|
require_relative "../../../encounter_providers/v_2/types/ordering_provider"
|
9
|
+
require_relative "test_result"
|
9
10
|
require "ostruct"
|
10
11
|
require "json"
|
11
12
|
|
@@ -47,6 +48,8 @@ module CandidApiClient
|
|
47
48
|
# than the rendering provider for this service line.
|
48
49
|
# If not required by this implementation guide, do not send.
|
49
50
|
attr_reader :ordering_provider
|
51
|
+
# @return [CandidApiClient::ServiceLines::V2::Types::TestResult] Contains a single test result value. Maps to MEA-02 on the 837-P.
|
52
|
+
attr_reader :test_result
|
50
53
|
# @return [OpenStruct] Additional properties unmapped to the current class definition
|
51
54
|
attr_reader :additional_properties
|
52
55
|
# @return [Object]
|
@@ -76,10 +79,11 @@ module CandidApiClient
|
|
76
79
|
# @param ordering_provider [CandidApiClient::EncounterProviders::V2::Types::OrderingProvider] Required when the service or supply was ordered by a provider who is different
|
77
80
|
# than the rendering provider for this service line.
|
78
81
|
# If not required by this implementation guide, do not send.
|
82
|
+
# @param test_result [CandidApiClient::ServiceLines::V2::Types::TestResult] Contains a single test result value. Maps to MEA-02 on the 837-P.
|
79
83
|
# @param additional_properties [OpenStruct] Additional properties unmapped to the current class definition
|
80
84
|
# @return [CandidApiClient::ServiceLines::V2::Types::ServiceLineCreate]
|
81
85
|
def initialize(procedure_code:, quantity:, units:, diagnosis_pointers:, modifiers: OMIT,
|
82
|
-
charge_amount_cents: OMIT, drug_identification: OMIT, place_of_service_code: OMIT, description: OMIT, date_of_service: OMIT, end_date_of_service: OMIT, ordering_provider: OMIT, additional_properties: nil)
|
86
|
+
charge_amount_cents: OMIT, drug_identification: OMIT, place_of_service_code: OMIT, description: OMIT, date_of_service: OMIT, end_date_of_service: OMIT, ordering_provider: OMIT, test_result: OMIT, additional_properties: nil)
|
83
87
|
@modifiers = modifiers if modifiers != OMIT
|
84
88
|
@procedure_code = procedure_code
|
85
89
|
@quantity = quantity
|
@@ -92,6 +96,7 @@ module CandidApiClient
|
|
92
96
|
@date_of_service = date_of_service if date_of_service != OMIT
|
93
97
|
@end_date_of_service = end_date_of_service if end_date_of_service != OMIT
|
94
98
|
@ordering_provider = ordering_provider if ordering_provider != OMIT
|
99
|
+
@test_result = test_result if test_result != OMIT
|
95
100
|
@additional_properties = additional_properties
|
96
101
|
@_field_set = {
|
97
102
|
"modifiers": modifiers,
|
@@ -105,7 +110,8 @@ module CandidApiClient
|
|
105
110
|
"description": description,
|
106
111
|
"date_of_service": date_of_service,
|
107
112
|
"end_date_of_service": end_date_of_service,
|
108
|
-
"ordering_provider": ordering_provider
|
113
|
+
"ordering_provider": ordering_provider,
|
114
|
+
"test_result": test_result
|
109
115
|
}.reject do |_k, v|
|
110
116
|
v == OMIT
|
111
117
|
end
|
@@ -142,6 +148,12 @@ module CandidApiClient
|
|
142
148
|
ordering_provider = parsed_json["ordering_provider"].to_json
|
143
149
|
ordering_provider = CandidApiClient::EncounterProviders::V2::Types::OrderingProvider.from_json(json_object: ordering_provider)
|
144
150
|
end
|
151
|
+
if parsed_json["test_result"].nil?
|
152
|
+
test_result = nil
|
153
|
+
else
|
154
|
+
test_result = parsed_json["test_result"].to_json
|
155
|
+
test_result = CandidApiClient::ServiceLines::V2::Types::TestResult.from_json(json_object: test_result)
|
156
|
+
end
|
145
157
|
new(
|
146
158
|
modifiers: modifiers,
|
147
159
|
procedure_code: procedure_code,
|
@@ -155,6 +167,7 @@ module CandidApiClient
|
|
155
167
|
date_of_service: date_of_service,
|
156
168
|
end_date_of_service: end_date_of_service,
|
157
169
|
ordering_provider: ordering_provider,
|
170
|
+
test_result: test_result,
|
158
171
|
additional_properties: struct
|
159
172
|
)
|
160
173
|
end
|
@@ -185,6 +198,7 @@ module CandidApiClient
|
|
185
198
|
obj.date_of_service&.is_a?(Date) != false || raise("Passed value for field obj.date_of_service is not the expected type, validation failed.")
|
186
199
|
obj.end_date_of_service&.is_a?(Date) != false || raise("Passed value for field obj.end_date_of_service is not the expected type, validation failed.")
|
187
200
|
obj.ordering_provider.nil? || CandidApiClient::EncounterProviders::V2::Types::OrderingProvider.validate_raw(obj: obj.ordering_provider)
|
201
|
+
obj.test_result.nil? || CandidApiClient::ServiceLines::V2::Types::TestResult.validate_raw(obj: obj.test_result)
|
188
202
|
end
|
189
203
|
end
|
190
204
|
end
|
@@ -6,6 +6,7 @@ require_relative "service_line_denial_reason"
|
|
6
6
|
require_relative "../../../commons/types/facility_type_code"
|
7
7
|
require_relative "../../../commons/types/service_line_units"
|
8
8
|
require "date"
|
9
|
+
require_relative "test_result"
|
9
10
|
require "ostruct"
|
10
11
|
require "json"
|
11
12
|
|
@@ -50,6 +51,8 @@ module CandidApiClient
|
|
50
51
|
attr_reader :date_of_service
|
51
52
|
# @return [Date]
|
52
53
|
attr_reader :end_date_of_service
|
54
|
+
# @return [CandidApiClient::ServiceLines::V2::Types::TestResult] Contains a single test result value. Maps to MEA-02 on the 837-P.
|
55
|
+
attr_reader :test_result
|
53
56
|
# @return [OpenStruct] Additional properties unmapped to the current class definition
|
54
57
|
attr_reader :additional_properties
|
55
58
|
# @return [Object]
|
@@ -78,10 +81,11 @@ module CandidApiClient
|
|
78
81
|
# @param date_of_service [Date] date_of_service must be defined on either the encounter or the service lines but
|
79
82
|
# not both.
|
80
83
|
# @param end_date_of_service [Date]
|
84
|
+
# @param test_result [CandidApiClient::ServiceLines::V2::Types::TestResult] Contains a single test result value. Maps to MEA-02 on the 837-P.
|
81
85
|
# @param additional_properties [OpenStruct] Additional properties unmapped to the current class definition
|
82
86
|
# @return [CandidApiClient::ServiceLines::V2::Types::ServiceLineUpdate]
|
83
87
|
def initialize(edit_reason: OMIT, modifiers: OMIT, charge_amount_cents: OMIT, diagnosis_id_zero: OMIT,
|
84
|
-
diagnosis_id_one: OMIT, diagnosis_id_two: OMIT, diagnosis_id_three: OMIT, drug_identification: OMIT, denial_reason: OMIT, place_of_service_code: OMIT, units: OMIT, procedure_code: OMIT, quantity: OMIT, description: OMIT, date_of_service: OMIT, end_date_of_service: OMIT, additional_properties: nil)
|
88
|
+
diagnosis_id_one: OMIT, diagnosis_id_two: OMIT, diagnosis_id_three: OMIT, drug_identification: OMIT, denial_reason: OMIT, place_of_service_code: OMIT, units: OMIT, procedure_code: OMIT, quantity: OMIT, description: OMIT, date_of_service: OMIT, end_date_of_service: OMIT, test_result: OMIT, additional_properties: nil)
|
85
89
|
@edit_reason = edit_reason if edit_reason != OMIT
|
86
90
|
@modifiers = modifiers if modifiers != OMIT
|
87
91
|
@charge_amount_cents = charge_amount_cents if charge_amount_cents != OMIT
|
@@ -98,6 +102,7 @@ module CandidApiClient
|
|
98
102
|
@description = description if description != OMIT
|
99
103
|
@date_of_service = date_of_service if date_of_service != OMIT
|
100
104
|
@end_date_of_service = end_date_of_service if end_date_of_service != OMIT
|
105
|
+
@test_result = test_result if test_result != OMIT
|
101
106
|
@additional_properties = additional_properties
|
102
107
|
@_field_set = {
|
103
108
|
"edit_reason": edit_reason,
|
@@ -115,7 +120,8 @@ module CandidApiClient
|
|
115
120
|
"quantity": quantity,
|
116
121
|
"description": description,
|
117
122
|
"date_of_service": date_of_service,
|
118
|
-
"end_date_of_service": end_date_of_service
|
123
|
+
"end_date_of_service": end_date_of_service,
|
124
|
+
"test_result": test_result
|
119
125
|
}.reject do |_k, v|
|
120
126
|
v == OMIT
|
121
127
|
end
|
@@ -156,6 +162,12 @@ module CandidApiClient
|
|
156
162
|
end_date_of_service = unless parsed_json["end_date_of_service"].nil?
|
157
163
|
Date.parse(parsed_json["end_date_of_service"])
|
158
164
|
end
|
165
|
+
if parsed_json["test_result"].nil?
|
166
|
+
test_result = nil
|
167
|
+
else
|
168
|
+
test_result = parsed_json["test_result"].to_json
|
169
|
+
test_result = CandidApiClient::ServiceLines::V2::Types::TestResult.from_json(json_object: test_result)
|
170
|
+
end
|
159
171
|
new(
|
160
172
|
edit_reason: edit_reason,
|
161
173
|
modifiers: modifiers,
|
@@ -173,6 +185,7 @@ module CandidApiClient
|
|
173
185
|
description: description,
|
174
186
|
date_of_service: date_of_service,
|
175
187
|
end_date_of_service: end_date_of_service,
|
188
|
+
test_result: test_result,
|
176
189
|
additional_properties: struct
|
177
190
|
)
|
178
191
|
end
|
@@ -207,6 +220,7 @@ module CandidApiClient
|
|
207
220
|
obj.description&.is_a?(String) != false || raise("Passed value for field obj.description is not the expected type, validation failed.")
|
208
221
|
obj.date_of_service&.is_a?(Date) != false || raise("Passed value for field obj.date_of_service is not the expected type, validation failed.")
|
209
222
|
obj.end_date_of_service&.is_a?(Date) != false || raise("Passed value for field obj.end_date_of_service is not the expected type, validation failed.")
|
223
|
+
obj.test_result.nil? || CandidApiClient::ServiceLines::V2::Types::TestResult.validate_raw(obj: obj.test_result)
|
210
224
|
end
|
211
225
|
end
|
212
226
|
end
|
@@ -0,0 +1,95 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require "json"
|
4
|
+
|
5
|
+
module CandidApiClient
|
6
|
+
module ServiceLines
|
7
|
+
module V2
|
8
|
+
module Types
|
9
|
+
class TestResult
|
10
|
+
# @return [Object]
|
11
|
+
attr_reader :member
|
12
|
+
# @return [String]
|
13
|
+
attr_reader :discriminant
|
14
|
+
|
15
|
+
private_class_method :new
|
16
|
+
alias kind_of? is_a?
|
17
|
+
|
18
|
+
# @param member [Object]
|
19
|
+
# @param discriminant [String]
|
20
|
+
# @return [CandidApiClient::ServiceLines::V2::Types::TestResult]
|
21
|
+
def initialize(member:, discriminant:)
|
22
|
+
@member = member
|
23
|
+
@discriminant = discriminant
|
24
|
+
end
|
25
|
+
|
26
|
+
# Deserialize a JSON object to an instance of TestResult
|
27
|
+
#
|
28
|
+
# @param json_object [String]
|
29
|
+
# @return [CandidApiClient::ServiceLines::V2::Types::TestResult]
|
30
|
+
def self.from_json(json_object:)
|
31
|
+
struct = JSON.parse(json_object, object_class: OpenStruct)
|
32
|
+
member = case struct.type
|
33
|
+
when "hematocrit"
|
34
|
+
json_object.value
|
35
|
+
when "hemoglobin"
|
36
|
+
json_object.value
|
37
|
+
else
|
38
|
+
json_object
|
39
|
+
end
|
40
|
+
new(member: member, discriminant: struct.type)
|
41
|
+
end
|
42
|
+
|
43
|
+
# For Union Types, to_json functionality is delegated to the wrapped member.
|
44
|
+
#
|
45
|
+
# @return [String]
|
46
|
+
def to_json(*_args)
|
47
|
+
case @discriminant
|
48
|
+
when "hematocrit"
|
49
|
+
when "hemoglobin"
|
50
|
+
end
|
51
|
+
{ "type": @discriminant, "value": @member }.to_json
|
52
|
+
@member.to_json
|
53
|
+
end
|
54
|
+
|
55
|
+
# Leveraged for Union-type generation, validate_raw attempts to parse the given
|
56
|
+
# hash and check each fields type against the current object's property
|
57
|
+
# definitions.
|
58
|
+
#
|
59
|
+
# @param obj [Object]
|
60
|
+
# @return [Void]
|
61
|
+
def self.validate_raw(obj:)
|
62
|
+
case obj.type
|
63
|
+
when "hematocrit"
|
64
|
+
obj.is_a?(Float) != false || raise("Passed value for field obj is not the expected type, validation failed.")
|
65
|
+
when "hemoglobin"
|
66
|
+
obj.is_a?(Float) != false || raise("Passed value for field obj is not the expected type, validation failed.")
|
67
|
+
else
|
68
|
+
raise("Passed value matched no type within the union, validation failed.")
|
69
|
+
end
|
70
|
+
end
|
71
|
+
|
72
|
+
# For Union Types, is_a? functionality is delegated to the wrapped member.
|
73
|
+
#
|
74
|
+
# @param obj [Object]
|
75
|
+
# @return [Boolean]
|
76
|
+
def is_a?(obj)
|
77
|
+
@member.is_a?(obj)
|
78
|
+
end
|
79
|
+
|
80
|
+
# @param member [Float]
|
81
|
+
# @return [CandidApiClient::ServiceLines::V2::Types::TestResult]
|
82
|
+
def self.hematocrit(member:)
|
83
|
+
new(member: member, discriminant: "hematocrit")
|
84
|
+
end
|
85
|
+
|
86
|
+
# @param member [Float]
|
87
|
+
# @return [CandidApiClient::ServiceLines::V2::Types::TestResult]
|
88
|
+
def self.hemoglobin(member:)
|
89
|
+
new(member: member, discriminant: "hemoglobin")
|
90
|
+
end
|
91
|
+
end
|
92
|
+
end
|
93
|
+
end
|
94
|
+
end
|
95
|
+
end
|
data/lib/requests.rb
CHANGED
@@ -43,7 +43,7 @@ module CandidApiClient
|
|
43
43
|
|
44
44
|
# @return [Hash{String => String}]
|
45
45
|
def get_headers
|
46
|
-
headers = { "X-Fern-Language": "Ruby", "X-Fern-SDK-Name": "candidhealth", "X-Fern-SDK-Version": "0.34.
|
46
|
+
headers = { "X-Fern-Language": "Ruby", "X-Fern-SDK-Name": "candidhealth", "X-Fern-SDK-Version": "0.34.4" }
|
47
47
|
headers["Authorization"] = ((@token.is_a? Method) ? @token.call : @token) unless token.nil?
|
48
48
|
headers
|
49
49
|
end
|
@@ -87,7 +87,7 @@ module CandidApiClient
|
|
87
87
|
|
88
88
|
# @return [Hash{String => String}]
|
89
89
|
def get_headers
|
90
|
-
headers = { "X-Fern-Language": "Ruby", "X-Fern-SDK-Name": "candidhealth", "X-Fern-SDK-Version": "0.34.
|
90
|
+
headers = { "X-Fern-Language": "Ruby", "X-Fern-SDK-Name": "candidhealth", "X-Fern-SDK-Version": "0.34.4" }
|
91
91
|
headers["Authorization"] = ((@token.is_a? Method) ? @token.call : @token) unless token.nil?
|
92
92
|
headers
|
93
93
|
end
|
data/lib/types_export.rb
CHANGED
@@ -231,6 +231,7 @@ require_relative "candidhealth/service_lines/v_2/types/service_line_adjustment"
|
|
231
231
|
require_relative "candidhealth/service_lines/v_2/types/service_line_denial_reason"
|
232
232
|
require_relative "candidhealth/service_lines/v_2/types/denial_reason_content"
|
233
233
|
require_relative "candidhealth/service_lines/v_2/types/drug_identification"
|
234
|
+
require_relative "candidhealth/service_lines/v_2/types/test_result"
|
234
235
|
require_relative "candidhealth/service_lines/v_2/types/service_id_qualifier"
|
235
236
|
require_relative "candidhealth/service_lines/v_2/types/measurement_unit_code"
|
236
237
|
require_relative "candidhealth/tasks/v_3/types/task"
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: candidhealth
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.34.
|
4
|
+
version: 0.34.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- ''
|
@@ -548,6 +548,7 @@ files:
|
|
548
548
|
- lib/candidhealth/service_lines/v_2/types/service_line_denial_reason.rb
|
549
549
|
- lib/candidhealth/service_lines/v_2/types/service_line_era_data.rb
|
550
550
|
- lib/candidhealth/service_lines/v_2/types/service_line_update.rb
|
551
|
+
- lib/candidhealth/service_lines/v_2/types/test_result.rb
|
551
552
|
- lib/candidhealth/tags/types/tag.rb
|
552
553
|
- lib/candidhealth/tags/types/tag_color_enum.rb
|
553
554
|
- lib/candidhealth/tags/types/tag_create.rb
|