candidhealth 0.34.2 → 0.34.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/candidhealth/encounters/v_4/client.rb +12 -8
- data/lib/candidhealth/pre_encounter/appointments/v_1/client.rb +61 -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 +3 -2
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)
|
@@ -740,7 +741,7 @@ module CandidApiClient
|
|
740
741
|
# @param additional_properties [OpenStruct] Additional properties unmapped to the current class definition
|
741
742
|
# @param _field_set [Object]
|
742
743
|
# @param pre_encounter_patient_id [String]
|
743
|
-
# @param
|
744
|
+
# @param pre_encounter_appointment_ids [Array<String>]
|
744
745
|
# @param billing_provider [Hash] The billing provider is the provider or business entity submitting the claim.
|
745
746
|
# Billing provider may be, but is not necessarily, the same person/NPI as the
|
746
747
|
# rendering provider. From a payer's perspective, this represents the person or
|
@@ -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
|
@@ -904,7 +906,7 @@ module CandidApiClient
|
|
904
906
|
# api = CandidApiClient::Client.new(base_url: "https://api.example.com", environment: CandidApiClient::Environment::PRODUCTION)
|
905
907
|
# api.encounters.v_4.create_from_pre_encounter_patient(
|
906
908
|
# pre_encounter_patient_id: "d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32",
|
907
|
-
#
|
909
|
+
# pre_encounter_appointment_ids: ["d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32"],
|
908
910
|
# billing_provider: { address: { address_1: "123 Main St", address_2: "Apt 1", city: "New York", state: NY, zip_code: "10001", zip_plus_four_code: "1234" }, tax_id: "string", npi: "string", taxonomy_code: "string", first_name: "string", last_name: "string", organization_name: "string" },
|
909
911
|
# rendering_provider: { npi: "string", taxonomy_code: "string", address: { address_1: "123 Main St", address_2: "Apt 1", city: "New York", state: NY, zip_code: "10001", zip_plus_four_code: "1234" }, first_name: "string", last_name: "string", organization_name: "string" },
|
910
912
|
# initial_referring_provider: { npi: "string", taxonomy_code: "string", address: { address_1: "123 Main St", address_2: "Apt 1", city: "New York", state: NY, zip_code: "10001", zip_plus_four_code: "1234" }, qualifier: DQ, first_name: "string", last_name: "string", organization_name: "string" },
|
@@ -921,7 +923,7 @@ module CandidApiClient
|
|
921
923
|
# schema_instances: [{ schema_id: "ec096b13-f80a-471d-aaeb-54b021c9d582", content: { "provider_category": "internist", "is_urgent_care": true, "bmi": 24.2, "age": 38 } }]
|
922
924
|
# )
|
923
925
|
def create_from_pre_encounter_patient(external_id:, patient_authorized_release:,
|
924
|
-
benefits_assigned_to_provider:, provider_accepts_assignment:, billable_status:, pre_encounter_patient_id:,
|
926
|
+
benefits_assigned_to_provider:, provider_accepts_assignment:, billable_status:, pre_encounter_patient_id:, pre_encounter_appointment_ids:, billing_provider:, rendering_provider:, diagnoses:, place_of_service_code:, date_of_service: nil, end_date_of_service: nil, appointment_type: nil, existing_medications: nil, vitals: nil, interventions: nil, pay_to_address: nil, synchronicity: nil, additional_information: nil, service_authorization_exception_code: nil, admission_date: nil, discharge_date: nil, onset_of_current_illness_or_symptom_date: nil, last_menstrual_period_date: nil, delay_reason_code: nil, additional_properties: nil, _field_set: nil, initial_referring_provider: nil, supervising_provider: nil, service_facility: nil, clinical_notes: nil, billing_notes: nil, patient_histories: nil, service_lines: nil, external_claim_submission: nil, tag_ids: nil, schema_instances: nil, request_options: nil)
|
925
927
|
response = @request_client.conn.post do |req|
|
926
928
|
req.options.timeout = request_options.timeout_in_seconds unless request_options&.timeout_in_seconds.nil?
|
927
929
|
req.headers["Authorization"] = request_options.token unless request_options&.token.nil?
|
@@ -955,7 +957,7 @@ module CandidApiClient
|
|
955
957
|
additional_properties: additional_properties,
|
956
958
|
_field_set: _field_set,
|
957
959
|
pre_encounter_patient_id: pre_encounter_patient_id,
|
958
|
-
|
960
|
+
pre_encounter_appointment_ids: pre_encounter_appointment_ids,
|
959
961
|
billing_provider: billing_provider,
|
960
962
|
rendering_provider: rendering_provider,
|
961
963
|
initial_referring_provider: initial_referring_provider,
|
@@ -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)
|
@@ -2065,7 +2068,7 @@ module CandidApiClient
|
|
2065
2068
|
# @param additional_properties [OpenStruct] Additional properties unmapped to the current class definition
|
2066
2069
|
# @param _field_set [Object]
|
2067
2070
|
# @param pre_encounter_patient_id [String]
|
2068
|
-
# @param
|
2071
|
+
# @param pre_encounter_appointment_ids [Array<String>]
|
2069
2072
|
# @param billing_provider [Hash] The billing provider is the provider or business entity submitting the claim.
|
2070
2073
|
# Billing provider may be, but is not necessarily, the same person/NPI as the
|
2071
2074
|
# rendering provider. From a payer's perspective, this represents the person or
|
@@ -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
|
@@ -2229,7 +2233,7 @@ module CandidApiClient
|
|
2229
2233
|
# api = CandidApiClient::Client.new(base_url: "https://api.example.com", environment: CandidApiClient::Environment::PRODUCTION)
|
2230
2234
|
# api.encounters.v_4.create_from_pre_encounter_patient(
|
2231
2235
|
# pre_encounter_patient_id: "d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32",
|
2232
|
-
#
|
2236
|
+
# pre_encounter_appointment_ids: ["d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32"],
|
2233
2237
|
# billing_provider: { address: { address_1: "123 Main St", address_2: "Apt 1", city: "New York", state: NY, zip_code: "10001", zip_plus_four_code: "1234" }, tax_id: "string", npi: "string", taxonomy_code: "string", first_name: "string", last_name: "string", organization_name: "string" },
|
2234
2238
|
# rendering_provider: { npi: "string", taxonomy_code: "string", address: { address_1: "123 Main St", address_2: "Apt 1", city: "New York", state: NY, zip_code: "10001", zip_plus_four_code: "1234" }, first_name: "string", last_name: "string", organization_name: "string" },
|
2235
2239
|
# initial_referring_provider: { npi: "string", taxonomy_code: "string", address: { address_1: "123 Main St", address_2: "Apt 1", city: "New York", state: NY, zip_code: "10001", zip_plus_four_code: "1234" }, qualifier: DQ, first_name: "string", last_name: "string", organization_name: "string" },
|
@@ -2246,7 +2250,7 @@ module CandidApiClient
|
|
2246
2250
|
# schema_instances: [{ schema_id: "ec096b13-f80a-471d-aaeb-54b021c9d582", content: { "provider_category": "internist", "is_urgent_care": true, "bmi": 24.2, "age": 38 } }]
|
2247
2251
|
# )
|
2248
2252
|
def create_from_pre_encounter_patient(external_id:, patient_authorized_release:,
|
2249
|
-
benefits_assigned_to_provider:, provider_accepts_assignment:, billable_status:, pre_encounter_patient_id:,
|
2253
|
+
benefits_assigned_to_provider:, provider_accepts_assignment:, billable_status:, pre_encounter_patient_id:, pre_encounter_appointment_ids:, billing_provider:, rendering_provider:, diagnoses:, place_of_service_code:, date_of_service: nil, end_date_of_service: nil, appointment_type: nil, existing_medications: nil, vitals: nil, interventions: nil, pay_to_address: nil, synchronicity: nil, additional_information: nil, service_authorization_exception_code: nil, admission_date: nil, discharge_date: nil, onset_of_current_illness_or_symptom_date: nil, last_menstrual_period_date: nil, delay_reason_code: nil, additional_properties: nil, _field_set: nil, initial_referring_provider: nil, supervising_provider: nil, service_facility: nil, clinical_notes: nil, billing_notes: nil, patient_histories: nil, service_lines: nil, external_claim_submission: nil, tag_ids: nil, schema_instances: nil, request_options: nil)
|
2250
2254
|
Async do
|
2251
2255
|
response = @request_client.conn.post do |req|
|
2252
2256
|
req.options.timeout = request_options.timeout_in_seconds unless request_options&.timeout_in_seconds.nil?
|
@@ -2281,7 +2285,7 @@ module CandidApiClient
|
|
2281
2285
|
additional_properties: additional_properties,
|
2282
2286
|
_field_set: _field_set,
|
2283
2287
|
pre_encounter_patient_id: pre_encounter_patient_id,
|
2284
|
-
|
2288
|
+
pre_encounter_appointment_ids: pre_encounter_appointment_ids,
|
2285
2289
|
billing_provider: billing_provider,
|
2286
2290
|
rendering_provider: rendering_provider,
|
2287
2291
|
initial_referring_provider: initial_referring_provider,
|
@@ -4,6 +4,7 @@ require_relative "../../../../requests"
|
|
4
4
|
require_relative "types/mutable_appointment"
|
5
5
|
require_relative "types/appointment"
|
6
6
|
require "json"
|
7
|
+
require "date"
|
7
8
|
require "async"
|
8
9
|
|
9
10
|
module CandidApiClient
|
@@ -187,6 +188,35 @@ module CandidApiClient
|
|
187
188
|
CandidApiClient::PreEncounter::Appointments::V1::Types::Appointment.from_json(json_object: response.body)
|
188
189
|
end
|
189
190
|
|
191
|
+
# Scans up to 100 appointment updates. The since query parameter is inclusive, and
|
192
|
+
# the result list is ordered by updatedAt ascending.
|
193
|
+
#
|
194
|
+
# @param since [DateTime]
|
195
|
+
# @param request_options [CandidApiClient::RequestOptions]
|
196
|
+
# @return [Array<CandidApiClient::PreEncounter::Appointments::V1::Types::Appointment>]
|
197
|
+
# @example
|
198
|
+
# api = CandidApiClient::Client.new(base_url: "https://api.example.com", environment: CandidApiClient::Environment::PRODUCTION)
|
199
|
+
# api.pre_encounter.appointments.v_1.scan(since: DateTime.parse(2024-01-15T09:30:00.000Z))
|
200
|
+
def scan(since:, request_options: nil)
|
201
|
+
response = @request_client.conn.get do |req|
|
202
|
+
req.options.timeout = request_options.timeout_in_seconds unless request_options&.timeout_in_seconds.nil?
|
203
|
+
req.headers["Authorization"] = request_options.token unless request_options&.token.nil?
|
204
|
+
req.headers = {
|
205
|
+
**(req.headers || {}),
|
206
|
+
**@request_client.get_headers,
|
207
|
+
**(request_options&.additional_headers || {})
|
208
|
+
}.compact
|
209
|
+
req.params = { **(request_options&.additional_query_parameters || {}), "since": since }.compact
|
210
|
+
req.url "#{@request_client.get_url(environment: PreEncounter,
|
211
|
+
request_options: request_options)}/appointments/v1/updates/scan"
|
212
|
+
end
|
213
|
+
parsed_json = JSON.parse(response.body)
|
214
|
+
parsed_json&.map do |item|
|
215
|
+
item = item.to_json
|
216
|
+
CandidApiClient::PreEncounter::Appointments::V1::Types::Appointment.from_json(json_object: item)
|
217
|
+
end
|
218
|
+
end
|
219
|
+
|
190
220
|
# Sets an appointment as deactivated. The path must contain the most recent
|
191
221
|
# version to prevent race conditions. Deactivating historic versions is not
|
192
222
|
# supported. Subsequent updates via PUT to the appointment will "reactivate" the
|
@@ -399,6 +429,37 @@ module CandidApiClient
|
|
399
429
|
end
|
400
430
|
end
|
401
431
|
|
432
|
+
# Scans up to 100 appointment updates. The since query parameter is inclusive, and
|
433
|
+
# the result list is ordered by updatedAt ascending.
|
434
|
+
#
|
435
|
+
# @param since [DateTime]
|
436
|
+
# @param request_options [CandidApiClient::RequestOptions]
|
437
|
+
# @return [Array<CandidApiClient::PreEncounter::Appointments::V1::Types::Appointment>]
|
438
|
+
# @example
|
439
|
+
# api = CandidApiClient::Client.new(base_url: "https://api.example.com", environment: CandidApiClient::Environment::PRODUCTION)
|
440
|
+
# api.pre_encounter.appointments.v_1.scan(since: DateTime.parse(2024-01-15T09:30:00.000Z))
|
441
|
+
def scan(since:, request_options: nil)
|
442
|
+
Async do
|
443
|
+
response = @request_client.conn.get do |req|
|
444
|
+
req.options.timeout = request_options.timeout_in_seconds unless request_options&.timeout_in_seconds.nil?
|
445
|
+
req.headers["Authorization"] = request_options.token unless request_options&.token.nil?
|
446
|
+
req.headers = {
|
447
|
+
**(req.headers || {}),
|
448
|
+
**@request_client.get_headers,
|
449
|
+
**(request_options&.additional_headers || {})
|
450
|
+
}.compact
|
451
|
+
req.params = { **(request_options&.additional_query_parameters || {}), "since": since }.compact
|
452
|
+
req.url "#{@request_client.get_url(environment: PreEncounter,
|
453
|
+
request_options: request_options)}/appointments/v1/updates/scan"
|
454
|
+
end
|
455
|
+
parsed_json = JSON.parse(response.body)
|
456
|
+
parsed_json&.map do |item|
|
457
|
+
item = item.to_json
|
458
|
+
CandidApiClient::PreEncounter::Appointments::V1::Types::Appointment.from_json(json_object: item)
|
459
|
+
end
|
460
|
+
end
|
461
|
+
end
|
462
|
+
|
402
463
|
# Sets an appointment as deactivated. The path must contain the most recent
|
403
464
|
# version to prevent race conditions. Deactivating historic versions is not
|
404
465
|
# supported. Subsequent updates via PUT to the appointment will "reactivate" the
|
@@ -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,14 +1,14 @@
|
|
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
|
- ''
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2024-
|
11
|
+
date: 2024-10-01 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: async-http-faraday
|
@@ -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
|