candidhealth 0.34.1 → 0.34.2
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/encounter_providers/v_2/types/rendering_provider.rb +10 -10
- data/lib/candidhealth/encounter_providers/v_2/types/rendering_provider_update.rb +123 -0
- data/lib/candidhealth/encounters/v_4/client.rb +282 -32
- data/lib/candidhealth/encounters/v_4/types/encounter.rb +11 -11
- data/lib/candidhealth/encounters/v_4/types/encounter_base.rb +11 -1
- data/lib/candidhealth/{third_party_payers/v_1/types/toggle_third_party_payer_enablement_request.rb → encounters/v_4/types/insurance_pay_missing_primary_coverage_error_type.rb} +17 -16
- data/lib/candidhealth/guarantor/v_1/client.rb +39 -89
- data/lib/candidhealth/guarantor/v_1/types/guarantor_update.rb +144 -0
- data/lib/candidhealth/payers/v_3/types/payer.rb +41 -2
- data/lib/candidhealth/pre_encounter/appointments/v_1/client.rb +68 -4
- data/lib/candidhealth/pre_encounter/appointments/v_1/types/appointment.rb +17 -1
- data/lib/candidhealth/pre_encounter/appointments/v_1/types/mutable_appointment.rb +17 -1
- data/lib/candidhealth/pre_encounter/common/types/additional_payer_information.rb +92 -0
- data/lib/candidhealth/pre_encounter/coverages/v_1/client.rb +48 -4
- data/lib/candidhealth/pre_encounter/coverages/v_1/types/benefit_type.rb +20 -0
- data/lib/candidhealth/pre_encounter/coverages/v_1/types/coverage.rb +15 -1
- data/lib/candidhealth/pre_encounter/coverages/v_1/types/coverage_details.rb +104 -0
- data/lib/candidhealth/pre_encounter/coverages/v_1/types/coverage_level.rb +17 -0
- data/lib/candidhealth/pre_encounter/coverages/v_1/types/coverage_value_unit.rb +17 -0
- data/lib/candidhealth/pre_encounter/coverages/v_1/types/insurance_plan.rb +16 -2
- data/lib/candidhealth/pre_encounter/coverages/v_1/types/latest_eligibility_check.rb +83 -0
- data/lib/candidhealth/pre_encounter/coverages/v_1/types/mutable_coverage.rb +15 -1
- data/lib/candidhealth/pre_encounter/coverages/v_1/types/plan_coverage.rb +29 -2
- data/lib/candidhealth/pre_encounter/coverages/v_1/types/service_coverage.rb +26 -2
- data/lib/candidhealth/pre_encounter/patients/v_1/client.rb +12 -4
- data/lib/candidhealth/pre_encounter/patients/v_1/types/authorization.rb +148 -0
- data/lib/candidhealth/pre_encounter/patients/v_1/types/authorization_unit.rb +15 -0
- data/lib/candidhealth/pre_encounter/patients/v_1/types/mutable_patient.rb +26 -2
- data/lib/candidhealth/pre_encounter/patients/v_1/types/patient.rb +26 -2
- data/lib/candidhealth/pre_encounter/patients/v_1/types/referral.rb +106 -0
- data/lib/candidhealth/service_facility/client.rb +27 -51
- data/lib/candidhealth/service_facility/types/encounter_service_facility_update.rb +90 -0
- data/lib/candidhealth.rb +0 -21
- data/lib/requests.rb +2 -2
- data/lib/types_export.rb +13 -16
- metadata +15 -24
- data/lib/candidhealth/third_party_payer_payments/client.rb +0 -30
- data/lib/candidhealth/third_party_payer_payments/v_1/client.rb +0 -360
- data/lib/candidhealth/third_party_payer_payments/v_1/types/third_party_payer_payment.rb +0 -138
- data/lib/candidhealth/third_party_payer_payments/v_1/types/third_party_payer_payment_create.rb +0 -124
- data/lib/candidhealth/third_party_payer_payments/v_1/types/third_party_payer_payment_sort_field.rb +0 -14
- data/lib/candidhealth/third_party_payer_payments/v_1/types/third_party_payer_payments_page.rb +0 -88
- data/lib/candidhealth/third_party_payer_refunds/client.rb +0 -30
- data/lib/candidhealth/third_party_payer_refunds/v_1/client.rb +0 -385
- data/lib/candidhealth/third_party_payer_refunds/v_1/types/third_party_payer_refund.rb +0 -139
- data/lib/candidhealth/third_party_payer_refunds/v_1/types/third_party_payer_refund_create.rb +0 -125
- data/lib/candidhealth/third_party_payer_refunds/v_1/types/third_party_payer_refund_sort_field.rb +0 -14
- data/lib/candidhealth/third_party_payer_refunds/v_1/types/third_party_payer_refunds_page.rb +0 -88
- data/lib/candidhealth/third_party_payers/client.rb +0 -30
- data/lib/candidhealth/third_party_payers/v_1/client.rb +0 -375
- data/lib/candidhealth/third_party_payers/v_1/types/create_third_party_payer_request.rb +0 -79
- data/lib/candidhealth/third_party_payers/v_1/types/third_party_payer.rb +0 -100
- data/lib/candidhealth/third_party_payers/v_1/types/third_party_payer_category_update.rb +0 -97
- data/lib/candidhealth/third_party_payers/v_1/types/third_party_payer_description_update.rb +0 -97
- data/lib/candidhealth/third_party_payers/v_1/types/third_party_payer_page.rb +0 -88
- data/lib/candidhealth/third_party_payers/v_1/types/third_party_payer_sort_field.rb +0 -16
- data/lib/candidhealth/third_party_payers/v_1/types/third_party_payer_update_request.rb +0 -92
@@ -16,6 +16,8 @@ require_relative "contact"
|
|
16
16
|
require_relative "../../../common/types/external_provider"
|
17
17
|
require_relative "filing_order"
|
18
18
|
require_relative "guarantor"
|
19
|
+
require_relative "authorization"
|
20
|
+
require_relative "referral"
|
19
21
|
require "ostruct"
|
20
22
|
require "json"
|
21
23
|
|
@@ -105,6 +107,10 @@ module CandidApiClient
|
|
105
107
|
attr_reader :guarantor
|
106
108
|
# @return [Boolean]
|
107
109
|
attr_reader :self_pay
|
110
|
+
# @return [Array<CandidApiClient::PreEncounter::Patients::V1::Types::Authorization>]
|
111
|
+
attr_reader :authorizations
|
112
|
+
# @return [Array<CandidApiClient::PreEncounter::Patients::V1::Types::Referral>]
|
113
|
+
attr_reader :referrals
|
108
114
|
# @return [OpenStruct] Additional properties unmapped to the current class definition
|
109
115
|
attr_reader :additional_properties
|
110
116
|
# @return [Object]
|
@@ -157,10 +163,12 @@ module CandidApiClient
|
|
157
163
|
# @param non_insurance_payers [Array<String>]
|
158
164
|
# @param guarantor [CandidApiClient::PreEncounter::Patients::V1::Types::Guarantor]
|
159
165
|
# @param self_pay [Boolean]
|
166
|
+
# @param authorizations [Array<CandidApiClient::PreEncounter::Patients::V1::Types::Authorization>]
|
167
|
+
# @param referrals [Array<CandidApiClient::PreEncounter::Patients::V1::Types::Referral>]
|
160
168
|
# @param additional_properties [OpenStruct] Additional properties unmapped to the current class definition
|
161
169
|
# @return [CandidApiClient::PreEncounter::Patients::V1::Types::Patient]
|
162
170
|
def initialize(id:, mrn:, organization_id:, deactivated:, version:, updated_at:, updating_user_id:, name:,
|
163
|
-
other_names:, birth_date:, biological_sex:, primary_address:, other_addresses:, primary_telecom:, other_telecoms:, contacts:, general_practitioners:, filing_order:, gender: OMIT, social_security_number: OMIT, sexual_orientation: OMIT, race: OMIT, ethnicity: OMIT, disability_status: OMIT, marital_status: OMIT, deceased: OMIT, multiple_birth: OMIT, email: OMIT, electronic_communication_opt_in: OMIT, photo: OMIT, language: OMIT, external_provenance: OMIT, non_insurance_payers: OMIT, guarantor: OMIT, self_pay: OMIT, additional_properties: nil)
|
171
|
+
other_names:, birth_date:, biological_sex:, primary_address:, other_addresses:, primary_telecom:, other_telecoms:, contacts:, general_practitioners:, filing_order:, gender: OMIT, social_security_number: OMIT, sexual_orientation: OMIT, race: OMIT, ethnicity: OMIT, disability_status: OMIT, marital_status: OMIT, deceased: OMIT, multiple_birth: OMIT, email: OMIT, electronic_communication_opt_in: OMIT, photo: OMIT, language: OMIT, external_provenance: OMIT, non_insurance_payers: OMIT, guarantor: OMIT, self_pay: OMIT, authorizations: OMIT, referrals: OMIT, additional_properties: nil)
|
164
172
|
@id = id
|
165
173
|
@mrn = mrn
|
166
174
|
@organization_id = organization_id
|
@@ -198,6 +206,8 @@ module CandidApiClient
|
|
198
206
|
@non_insurance_payers = non_insurance_payers if non_insurance_payers != OMIT
|
199
207
|
@guarantor = guarantor if guarantor != OMIT
|
200
208
|
@self_pay = self_pay if self_pay != OMIT
|
209
|
+
@authorizations = authorizations if authorizations != OMIT
|
210
|
+
@referrals = referrals if referrals != OMIT
|
201
211
|
@additional_properties = additional_properties
|
202
212
|
@_field_set = {
|
203
213
|
"id": id,
|
@@ -234,7 +244,9 @@ module CandidApiClient
|
|
234
244
|
"filing_order": filing_order,
|
235
245
|
"non_insurance_payers": non_insurance_payers,
|
236
246
|
"guarantor": guarantor,
|
237
|
-
"self_pay": self_pay
|
247
|
+
"self_pay": self_pay,
|
248
|
+
"authorizations": authorizations,
|
249
|
+
"referrals": referrals
|
238
250
|
}.reject do |_k, v|
|
239
251
|
v == OMIT
|
240
252
|
end
|
@@ -327,6 +339,14 @@ module CandidApiClient
|
|
327
339
|
guarantor = CandidApiClient::PreEncounter::Patients::V1::Types::Guarantor.from_json(json_object: guarantor)
|
328
340
|
end
|
329
341
|
self_pay = struct["self_pay"]
|
342
|
+
authorizations = parsed_json["authorizations"]&.map do |item|
|
343
|
+
item = item.to_json
|
344
|
+
CandidApiClient::PreEncounter::Patients::V1::Types::Authorization.from_json(json_object: item)
|
345
|
+
end
|
346
|
+
referrals = parsed_json["referrals"]&.map do |item|
|
347
|
+
item = item.to_json
|
348
|
+
CandidApiClient::PreEncounter::Patients::V1::Types::Referral.from_json(json_object: item)
|
349
|
+
end
|
330
350
|
new(
|
331
351
|
id: id,
|
332
352
|
mrn: mrn,
|
@@ -363,6 +383,8 @@ module CandidApiClient
|
|
363
383
|
non_insurance_payers: non_insurance_payers,
|
364
384
|
guarantor: guarantor,
|
365
385
|
self_pay: self_pay,
|
386
|
+
authorizations: authorizations,
|
387
|
+
referrals: referrals,
|
366
388
|
additional_properties: struct
|
367
389
|
)
|
368
390
|
end
|
@@ -416,6 +438,8 @@ module CandidApiClient
|
|
416
438
|
obj.non_insurance_payers&.is_a?(Array) != false || raise("Passed value for field obj.non_insurance_payers is not the expected type, validation failed.")
|
417
439
|
obj.guarantor.nil? || CandidApiClient::PreEncounter::Patients::V1::Types::Guarantor.validate_raw(obj: obj.guarantor)
|
418
440
|
obj.self_pay&.is_a?(Boolean) != false || raise("Passed value for field obj.self_pay is not the expected type, validation failed.")
|
441
|
+
obj.authorizations&.is_a?(Array) != false || raise("Passed value for field obj.authorizations is not the expected type, validation failed.")
|
442
|
+
obj.referrals&.is_a?(Array) != false || raise("Passed value for field obj.referrals is not the expected type, validation failed.")
|
419
443
|
end
|
420
444
|
end
|
421
445
|
end
|
@@ -0,0 +1,106 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require_relative "../../../common/types/external_provider"
|
4
|
+
require_relative "../../../common/types/period"
|
5
|
+
require "ostruct"
|
6
|
+
require "json"
|
7
|
+
|
8
|
+
module CandidApiClient
|
9
|
+
module PreEncounter
|
10
|
+
module Patients
|
11
|
+
module V1
|
12
|
+
module Types
|
13
|
+
class Referral
|
14
|
+
# @return [CandidApiClient::PreEncounter::Common::Types::ExternalProvider]
|
15
|
+
attr_reader :provider
|
16
|
+
# @return [String]
|
17
|
+
attr_reader :referral_number
|
18
|
+
# @return [CandidApiClient::PreEncounter::Common::Types::Period]
|
19
|
+
attr_reader :period
|
20
|
+
# @return [String]
|
21
|
+
attr_reader :notes
|
22
|
+
# @return [OpenStruct] Additional properties unmapped to the current class definition
|
23
|
+
attr_reader :additional_properties
|
24
|
+
# @return [Object]
|
25
|
+
attr_reader :_field_set
|
26
|
+
protected :_field_set
|
27
|
+
|
28
|
+
OMIT = Object.new
|
29
|
+
|
30
|
+
# @param provider [CandidApiClient::PreEncounter::Common::Types::ExternalProvider]
|
31
|
+
# @param referral_number [String]
|
32
|
+
# @param period [CandidApiClient::PreEncounter::Common::Types::Period]
|
33
|
+
# @param notes [String]
|
34
|
+
# @param additional_properties [OpenStruct] Additional properties unmapped to the current class definition
|
35
|
+
# @return [CandidApiClient::PreEncounter::Patients::V1::Types::Referral]
|
36
|
+
def initialize(provider:, referral_number:, period: OMIT, notes: OMIT, additional_properties: nil)
|
37
|
+
@provider = provider
|
38
|
+
@referral_number = referral_number
|
39
|
+
@period = period if period != OMIT
|
40
|
+
@notes = notes if notes != OMIT
|
41
|
+
@additional_properties = additional_properties
|
42
|
+
@_field_set = {
|
43
|
+
"provider": provider,
|
44
|
+
"referral_number": referral_number,
|
45
|
+
"period": period,
|
46
|
+
"notes": notes
|
47
|
+
}.reject do |_k, v|
|
48
|
+
v == OMIT
|
49
|
+
end
|
50
|
+
end
|
51
|
+
|
52
|
+
# Deserialize a JSON object to an instance of Referral
|
53
|
+
#
|
54
|
+
# @param json_object [String]
|
55
|
+
# @return [CandidApiClient::PreEncounter::Patients::V1::Types::Referral]
|
56
|
+
def self.from_json(json_object:)
|
57
|
+
struct = JSON.parse(json_object, object_class: OpenStruct)
|
58
|
+
parsed_json = JSON.parse(json_object)
|
59
|
+
if parsed_json["provider"].nil?
|
60
|
+
provider = nil
|
61
|
+
else
|
62
|
+
provider = parsed_json["provider"].to_json
|
63
|
+
provider = CandidApiClient::PreEncounter::Common::Types::ExternalProvider.from_json(json_object: provider)
|
64
|
+
end
|
65
|
+
referral_number = struct["referral_number"]
|
66
|
+
if parsed_json["period"].nil?
|
67
|
+
period = nil
|
68
|
+
else
|
69
|
+
period = parsed_json["period"].to_json
|
70
|
+
period = CandidApiClient::PreEncounter::Common::Types::Period.from_json(json_object: period)
|
71
|
+
end
|
72
|
+
notes = struct["notes"]
|
73
|
+
new(
|
74
|
+
provider: provider,
|
75
|
+
referral_number: referral_number,
|
76
|
+
period: period,
|
77
|
+
notes: notes,
|
78
|
+
additional_properties: struct
|
79
|
+
)
|
80
|
+
end
|
81
|
+
|
82
|
+
# Serialize an instance of Referral to a JSON object
|
83
|
+
#
|
84
|
+
# @return [String]
|
85
|
+
def to_json(*_args)
|
86
|
+
@_field_set&.to_json
|
87
|
+
end
|
88
|
+
|
89
|
+
# Leveraged for Union-type generation, validate_raw attempts to parse the given
|
90
|
+
# hash and check each fields type against the current object's property
|
91
|
+
# definitions.
|
92
|
+
#
|
93
|
+
# @param obj [Object]
|
94
|
+
# @return [Void]
|
95
|
+
def self.validate_raw(obj:)
|
96
|
+
CandidApiClient::PreEncounter::Common::Types::ExternalProvider.validate_raw(obj: obj.provider)
|
97
|
+
obj.referral_number.is_a?(String) != false || raise("Passed value for field obj.referral_number is not the expected type, validation failed.")
|
98
|
+
obj.period.nil? || CandidApiClient::PreEncounter::Common::Types::Period.validate_raw(obj: obj.period)
|
99
|
+
obj.notes&.is_a?(String) != false || raise("Passed value for field obj.notes is not the expected type, validation failed.")
|
100
|
+
end
|
101
|
+
end
|
102
|
+
end
|
103
|
+
end
|
104
|
+
end
|
105
|
+
end
|
106
|
+
end
|
@@ -1,7 +1,7 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
3
|
require_relative "../../requests"
|
4
|
-
require_relative "
|
4
|
+
require_relative "types/encounter_service_facility_update"
|
5
5
|
require_relative "types/encounter_service_facility"
|
6
6
|
require "async"
|
7
7
|
|
@@ -17,29 +17,22 @@ module CandidApiClient
|
|
17
17
|
end
|
18
18
|
|
19
19
|
# @param service_facility_id [String]
|
20
|
-
# @param
|
21
|
-
#
|
22
|
-
#
|
23
|
-
#
|
24
|
-
#
|
25
|
-
#
|
26
|
-
#
|
27
|
-
#
|
28
|
-
#
|
29
|
-
#
|
30
|
-
# * :state (CandidApiClient::Commons::Types::State)
|
31
|
-
# * :zip_code (String)
|
20
|
+
# @param request [Hash] Request of type CandidApiClient::ServiceFacility::Types::EncounterServiceFacilityUpdate, as a Hash
|
21
|
+
# * :organization_name (String)
|
22
|
+
# * :npi (String)
|
23
|
+
# * :address (Hash)
|
24
|
+
# * :zip_plus_four_code (String)
|
25
|
+
# * :address_1 (String)
|
26
|
+
# * :address_2 (String)
|
27
|
+
# * :city (String)
|
28
|
+
# * :state (CandidApiClient::Commons::Types::State)
|
29
|
+
# * :zip_code (String)
|
32
30
|
# @param request_options [CandidApiClient::RequestOptions]
|
33
31
|
# @return [CandidApiClient::ServiceFacility::Types::EncounterServiceFacility]
|
34
32
|
# @example
|
35
33
|
# api = CandidApiClient::Client.new(base_url: "https://api.example.com", environment: CandidApiClient::Environment::PRODUCTION)
|
36
|
-
# api.service_facility.update(
|
37
|
-
|
38
|
-
# organization_name: "string",
|
39
|
-
# npi: "string",
|
40
|
-
# address: { address_1: "123 Main St", address_2: "Apt 1", city: "New York", state: NY, zip_code: "10001", zip_plus_four_code: "1234" }
|
41
|
-
# )
|
42
|
-
def update(service_facility_id:, organization_name: nil, npi: nil, address: nil, request_options: nil)
|
34
|
+
# api.service_facility.update(service_facility_id: "d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32", request: { organization_name: "Test Organization", address: { address_1: "123 Main St", address_2: "Apt 1", city: "New York", state: NY, zip_code: "10001", zip_plus_four_code: "1234" } })
|
35
|
+
def update(service_facility_id:, request:, request_options: nil)
|
43
36
|
response = @request_client.conn.patch do |req|
|
44
37
|
req.options.timeout = request_options.timeout_in_seconds unless request_options&.timeout_in_seconds.nil?
|
45
38
|
req.headers["Authorization"] = request_options.token unless request_options&.token.nil?
|
@@ -48,12 +41,7 @@ module CandidApiClient
|
|
48
41
|
**@request_client.get_headers,
|
49
42
|
**(request_options&.additional_headers || {})
|
50
43
|
}.compact
|
51
|
-
req.body = {
|
52
|
-
**(request_options&.additional_body_parameters || {}),
|
53
|
-
organization_name: organization_name,
|
54
|
-
npi: npi,
|
55
|
-
address: address
|
56
|
-
}.compact
|
44
|
+
req.body = { **(request || {}), **(request_options&.additional_body_parameters || {}) }.compact
|
57
45
|
req.url "#{@request_client.get_url(environment: CandidApi,
|
58
46
|
request_options: request_options)}/api/service_facility/v2/#{service_facility_id}"
|
59
47
|
end
|
@@ -72,29 +60,22 @@ module CandidApiClient
|
|
72
60
|
end
|
73
61
|
|
74
62
|
# @param service_facility_id [String]
|
75
|
-
# @param
|
76
|
-
#
|
77
|
-
#
|
78
|
-
#
|
79
|
-
#
|
80
|
-
#
|
81
|
-
#
|
82
|
-
#
|
83
|
-
#
|
84
|
-
#
|
85
|
-
# * :state (CandidApiClient::Commons::Types::State)
|
86
|
-
# * :zip_code (String)
|
63
|
+
# @param request [Hash] Request of type CandidApiClient::ServiceFacility::Types::EncounterServiceFacilityUpdate, as a Hash
|
64
|
+
# * :organization_name (String)
|
65
|
+
# * :npi (String)
|
66
|
+
# * :address (Hash)
|
67
|
+
# * :zip_plus_four_code (String)
|
68
|
+
# * :address_1 (String)
|
69
|
+
# * :address_2 (String)
|
70
|
+
# * :city (String)
|
71
|
+
# * :state (CandidApiClient::Commons::Types::State)
|
72
|
+
# * :zip_code (String)
|
87
73
|
# @param request_options [CandidApiClient::RequestOptions]
|
88
74
|
# @return [CandidApiClient::ServiceFacility::Types::EncounterServiceFacility]
|
89
75
|
# @example
|
90
76
|
# api = CandidApiClient::Client.new(base_url: "https://api.example.com", environment: CandidApiClient::Environment::PRODUCTION)
|
91
|
-
# api.service_facility.update(
|
92
|
-
|
93
|
-
# organization_name: "string",
|
94
|
-
# npi: "string",
|
95
|
-
# address: { address_1: "123 Main St", address_2: "Apt 1", city: "New York", state: NY, zip_code: "10001", zip_plus_four_code: "1234" }
|
96
|
-
# )
|
97
|
-
def update(service_facility_id:, organization_name: nil, npi: nil, address: nil, request_options: nil)
|
77
|
+
# api.service_facility.update(service_facility_id: "d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32", request: { organization_name: "Test Organization", address: { address_1: "123 Main St", address_2: "Apt 1", city: "New York", state: NY, zip_code: "10001", zip_plus_four_code: "1234" } })
|
78
|
+
def update(service_facility_id:, request:, request_options: nil)
|
98
79
|
Async do
|
99
80
|
response = @request_client.conn.patch do |req|
|
100
81
|
req.options.timeout = request_options.timeout_in_seconds unless request_options&.timeout_in_seconds.nil?
|
@@ -104,12 +85,7 @@ module CandidApiClient
|
|
104
85
|
**@request_client.get_headers,
|
105
86
|
**(request_options&.additional_headers || {})
|
106
87
|
}.compact
|
107
|
-
req.body = {
|
108
|
-
**(request_options&.additional_body_parameters || {}),
|
109
|
-
organization_name: organization_name,
|
110
|
-
npi: npi,
|
111
|
-
address: address
|
112
|
-
}.compact
|
88
|
+
req.body = { **(request || {}), **(request_options&.additional_body_parameters || {}) }.compact
|
113
89
|
req.url "#{@request_client.get_url(environment: CandidApi,
|
114
90
|
request_options: request_options)}/api/service_facility/v2/#{service_facility_id}"
|
115
91
|
end
|
@@ -0,0 +1,90 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require_relative "../../commons/types/street_address_long_zip"
|
4
|
+
require "ostruct"
|
5
|
+
require "json"
|
6
|
+
|
7
|
+
module CandidApiClient
|
8
|
+
module ServiceFacility
|
9
|
+
module Types
|
10
|
+
class EncounterServiceFacilityUpdate
|
11
|
+
# @return [String]
|
12
|
+
attr_reader :organization_name
|
13
|
+
# @return [String] An NPI specific to the service facility if applicable, i.e. if it has one and is
|
14
|
+
# not under the billing provider's NPI.
|
15
|
+
# Box 32 section (a) of the CMS-1500 claim form.
|
16
|
+
attr_reader :npi
|
17
|
+
# @return [CandidApiClient::Commons::Types::StreetAddressLongZip] zip_plus_four_code is required for service facility address. When the
|
18
|
+
# zip_plus_four_code is not available use "9998" as per CMS documentation.
|
19
|
+
attr_reader :address
|
20
|
+
# @return [OpenStruct] Additional properties unmapped to the current class definition
|
21
|
+
attr_reader :additional_properties
|
22
|
+
# @return [Object]
|
23
|
+
attr_reader :_field_set
|
24
|
+
protected :_field_set
|
25
|
+
|
26
|
+
OMIT = Object.new
|
27
|
+
|
28
|
+
# @param organization_name [String]
|
29
|
+
# @param npi [String] An NPI specific to the service facility if applicable, i.e. if it has one and is
|
30
|
+
# not under the billing provider's NPI.
|
31
|
+
# Box 32 section (a) of the CMS-1500 claim form.
|
32
|
+
# @param address [CandidApiClient::Commons::Types::StreetAddressLongZip] zip_plus_four_code is required for service facility address. When the
|
33
|
+
# zip_plus_four_code is not available use "9998" as per CMS documentation.
|
34
|
+
# @param additional_properties [OpenStruct] Additional properties unmapped to the current class definition
|
35
|
+
# @return [CandidApiClient::ServiceFacility::Types::EncounterServiceFacilityUpdate]
|
36
|
+
def initialize(organization_name: OMIT, npi: OMIT, address: OMIT, additional_properties: nil)
|
37
|
+
@organization_name = organization_name if organization_name != OMIT
|
38
|
+
@npi = npi if npi != OMIT
|
39
|
+
@address = address if address != OMIT
|
40
|
+
@additional_properties = additional_properties
|
41
|
+
@_field_set = { "organization_name": organization_name, "npi": npi, "address": address }.reject do |_k, v|
|
42
|
+
v == OMIT
|
43
|
+
end
|
44
|
+
end
|
45
|
+
|
46
|
+
# Deserialize a JSON object to an instance of EncounterServiceFacilityUpdate
|
47
|
+
#
|
48
|
+
# @param json_object [String]
|
49
|
+
# @return [CandidApiClient::ServiceFacility::Types::EncounterServiceFacilityUpdate]
|
50
|
+
def self.from_json(json_object:)
|
51
|
+
struct = JSON.parse(json_object, object_class: OpenStruct)
|
52
|
+
parsed_json = JSON.parse(json_object)
|
53
|
+
organization_name = struct["organization_name"]
|
54
|
+
npi = struct["npi"]
|
55
|
+
if parsed_json["address"].nil?
|
56
|
+
address = nil
|
57
|
+
else
|
58
|
+
address = parsed_json["address"].to_json
|
59
|
+
address = CandidApiClient::Commons::Types::StreetAddressLongZip.from_json(json_object: address)
|
60
|
+
end
|
61
|
+
new(
|
62
|
+
organization_name: organization_name,
|
63
|
+
npi: npi,
|
64
|
+
address: address,
|
65
|
+
additional_properties: struct
|
66
|
+
)
|
67
|
+
end
|
68
|
+
|
69
|
+
# Serialize an instance of EncounterServiceFacilityUpdate to a JSON object
|
70
|
+
#
|
71
|
+
# @return [String]
|
72
|
+
def to_json(*_args)
|
73
|
+
@_field_set&.to_json
|
74
|
+
end
|
75
|
+
|
76
|
+
# Leveraged for Union-type generation, validate_raw attempts to parse the given
|
77
|
+
# hash and check each fields type against the current object's property
|
78
|
+
# definitions.
|
79
|
+
#
|
80
|
+
# @param obj [Object]
|
81
|
+
# @return [Void]
|
82
|
+
def self.validate_raw(obj:)
|
83
|
+
obj.organization_name&.is_a?(String) != false || raise("Passed value for field obj.organization_name is not the expected type, validation failed.")
|
84
|
+
obj.npi&.is_a?(String) != false || raise("Passed value for field obj.npi is not the expected type, validation failed.")
|
85
|
+
obj.address.nil? || CandidApiClient::Commons::Types::StreetAddressLongZip.validate_raw(obj: obj.address)
|
86
|
+
end
|
87
|
+
end
|
88
|
+
end
|
89
|
+
end
|
90
|
+
end
|
data/lib/candidhealth.rb
CHANGED
@@ -31,9 +31,6 @@ require_relative "candidhealth/patient_refunds/client"
|
|
31
31
|
require_relative "candidhealth/payers/client"
|
32
32
|
require_relative "candidhealth/service_lines/client"
|
33
33
|
require_relative "candidhealth/tasks/client"
|
34
|
-
require_relative "candidhealth/third_party_payer_payments/client"
|
35
|
-
require_relative "candidhealth/third_party_payer_refunds/client"
|
36
|
-
require_relative "candidhealth/third_party_payers/client"
|
37
34
|
require_relative "candidhealth/write_offs/client"
|
38
35
|
require_relative "candidhealth/pre_encounter/client"
|
39
36
|
require_relative "candidhealth/service_facility/client"
|
@@ -94,12 +91,6 @@ module CandidApiClient
|
|
94
91
|
attr_reader :service_lines
|
95
92
|
# @return [CandidApiClient::Tasks::Client]
|
96
93
|
attr_reader :tasks
|
97
|
-
# @return [CandidApiClient::ThirdPartyPayerPayments::Client]
|
98
|
-
attr_reader :third_party_payer_payments
|
99
|
-
# @return [CandidApiClient::ThirdPartyPayerRefunds::Client]
|
100
|
-
attr_reader :third_party_payer_refunds
|
101
|
-
# @return [CandidApiClient::ThirdPartyPayers::Client]
|
102
|
-
attr_reader :third_party_payers
|
103
94
|
# @return [CandidApiClient::WriteOffs::Client]
|
104
95
|
attr_reader :write_offs
|
105
96
|
# @return [CandidApiClient::PreEncounter::Client]
|
@@ -160,9 +151,6 @@ module CandidApiClient
|
|
160
151
|
@payers = CandidApiClient::Payers::Client.new(request_client: @request_client)
|
161
152
|
@service_lines = CandidApiClient::ServiceLines::Client.new(request_client: @request_client)
|
162
153
|
@tasks = CandidApiClient::Tasks::Client.new(request_client: @request_client)
|
163
|
-
@third_party_payer_payments = CandidApiClient::ThirdPartyPayerPayments::Client.new(request_client: @request_client)
|
164
|
-
@third_party_payer_refunds = CandidApiClient::ThirdPartyPayerRefunds::Client.new(request_client: @request_client)
|
165
|
-
@third_party_payers = CandidApiClient::ThirdPartyPayers::Client.new(request_client: @request_client)
|
166
154
|
@write_offs = CandidApiClient::WriteOffs::Client.new(request_client: @request_client)
|
167
155
|
@pre_encounter = CandidApiClient::PreEncounter::Client.new(request_client: @request_client)
|
168
156
|
@service_facility = CandidApiClient::ServiceFacilityClient.new(request_client: @request_client)
|
@@ -224,12 +212,6 @@ module CandidApiClient
|
|
224
212
|
attr_reader :service_lines
|
225
213
|
# @return [CandidApiClient::Tasks::AsyncClient]
|
226
214
|
attr_reader :tasks
|
227
|
-
# @return [CandidApiClient::ThirdPartyPayerPayments::AsyncClient]
|
228
|
-
attr_reader :third_party_payer_payments
|
229
|
-
# @return [CandidApiClient::ThirdPartyPayerRefunds::AsyncClient]
|
230
|
-
attr_reader :third_party_payer_refunds
|
231
|
-
# @return [CandidApiClient::ThirdPartyPayers::AsyncClient]
|
232
|
-
attr_reader :third_party_payers
|
233
215
|
# @return [CandidApiClient::WriteOffs::AsyncClient]
|
234
216
|
attr_reader :write_offs
|
235
217
|
# @return [CandidApiClient::PreEncounter::AsyncClient]
|
@@ -290,9 +272,6 @@ module CandidApiClient
|
|
290
272
|
@payers = CandidApiClient::Payers::AsyncClient.new(request_client: @async_request_client)
|
291
273
|
@service_lines = CandidApiClient::ServiceLines::AsyncClient.new(request_client: @async_request_client)
|
292
274
|
@tasks = CandidApiClient::Tasks::AsyncClient.new(request_client: @async_request_client)
|
293
|
-
@third_party_payer_payments = CandidApiClient::ThirdPartyPayerPayments::AsyncClient.new(request_client: @async_request_client)
|
294
|
-
@third_party_payer_refunds = CandidApiClient::ThirdPartyPayerRefunds::AsyncClient.new(request_client: @async_request_client)
|
295
|
-
@third_party_payers = CandidApiClient::ThirdPartyPayers::AsyncClient.new(request_client: @async_request_client)
|
296
275
|
@write_offs = CandidApiClient::WriteOffs::AsyncClient.new(request_client: @async_request_client)
|
297
276
|
@pre_encounter = CandidApiClient::PreEncounter::AsyncClient.new(request_client: @async_request_client)
|
298
277
|
@service_facility = CandidApiClient::AsyncServiceFacilityClient.new(request_client: @async_request_client)
|
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.2" }
|
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.2" }
|
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
@@ -28,6 +28,7 @@ require_relative "candidhealth/custom_schemas/v_1/types/schema_validation_failur
|
|
28
28
|
require_relative "candidhealth/custom_schemas/v_1/types/schema_validation_error"
|
29
29
|
require_relative "candidhealth/encounter_providers/v_2/types/encounter_provider_base"
|
30
30
|
require_relative "candidhealth/encounter_providers/v_2/types/rendering_provider"
|
31
|
+
require_relative "candidhealth/encounter_providers/v_2/types/rendering_provider_update"
|
31
32
|
require_relative "candidhealth/encounter_providers/v_2/types/referring_provider"
|
32
33
|
require_relative "candidhealth/encounter_providers/v_2/types/referring_provider_update"
|
33
34
|
require_relative "candidhealth/encounter_providers/v_2/types/initial_referring_provider"
|
@@ -64,6 +65,7 @@ require_relative "candidhealth/encounters/v_4/types/encounter_submission_origin_
|
|
64
65
|
require_relative "candidhealth/encounters/v_4/types/synchronicity_type"
|
65
66
|
require_relative "candidhealth/encounters/v_4/types/coding_attribution_type"
|
66
67
|
require_relative "candidhealth/encounters/v_4/types/encounter_page"
|
68
|
+
require_relative "candidhealth/encounters/v_4/types/insurance_pay_missing_primary_coverage_error_type"
|
67
69
|
require_relative "candidhealth/encounters/v_4/types/encounter_external_id_uniqueness_error_type"
|
68
70
|
require_relative "candidhealth/encounters/v_4/types/encounter_patient_control_number_uniqueness_error_type"
|
69
71
|
require_relative "candidhealth/encounters/v_4/types/encounter_guarantor_missing_contact_info_error_type"
|
@@ -129,6 +131,7 @@ require_relative "candidhealth/fee_schedules/v_3/types/validation_error"
|
|
129
131
|
require_relative "candidhealth/guarantor/v_1/types/guarantor_base"
|
130
132
|
require_relative "candidhealth/guarantor/v_1/types/guarantor"
|
131
133
|
require_relative "candidhealth/guarantor/v_1/types/guarantor_create"
|
134
|
+
require_relative "candidhealth/guarantor/v_1/types/guarantor_update"
|
132
135
|
require_relative "candidhealth/guarantor/v_1/types/encounter_has_existing_guarantor_error_type"
|
133
136
|
require_relative "candidhealth/import_invoice/v_1/types/import_invoice"
|
134
137
|
require_relative "candidhealth/import_invoice/v_1/types/create_import_invoice_request"
|
@@ -242,22 +245,6 @@ require_relative "candidhealth/tasks/v_3/types/task_create_v_3"
|
|
242
245
|
require_relative "candidhealth/tasks/v_3/types/task_update_v_3"
|
243
246
|
require_relative "candidhealth/tasks/v_3/types/task_page"
|
244
247
|
require_relative "candidhealth/tasks/v_3/types/task_updated_to_deprecated_status_error_type"
|
245
|
-
require_relative "candidhealth/third_party_payer_payments/v_1/types/third_party_payer_payment"
|
246
|
-
require_relative "candidhealth/third_party_payer_payments/v_1/types/third_party_payer_payment_create"
|
247
|
-
require_relative "candidhealth/third_party_payer_payments/v_1/types/third_party_payer_payments_page"
|
248
|
-
require_relative "candidhealth/third_party_payer_payments/v_1/types/third_party_payer_payment_sort_field"
|
249
|
-
require_relative "candidhealth/third_party_payer_refunds/v_1/types/third_party_payer_refund"
|
250
|
-
require_relative "candidhealth/third_party_payer_refunds/v_1/types/third_party_payer_refund_create"
|
251
|
-
require_relative "candidhealth/third_party_payer_refunds/v_1/types/third_party_payer_refunds_page"
|
252
|
-
require_relative "candidhealth/third_party_payer_refunds/v_1/types/third_party_payer_refund_sort_field"
|
253
|
-
require_relative "candidhealth/third_party_payers/v_1/types/third_party_payer"
|
254
|
-
require_relative "candidhealth/third_party_payers/v_1/types/create_third_party_payer_request"
|
255
|
-
require_relative "candidhealth/third_party_payers/v_1/types/third_party_payer_page"
|
256
|
-
require_relative "candidhealth/third_party_payers/v_1/types/third_party_payer_sort_field"
|
257
|
-
require_relative "candidhealth/third_party_payers/v_1/types/third_party_payer_description_update"
|
258
|
-
require_relative "candidhealth/third_party_payers/v_1/types/third_party_payer_category_update"
|
259
|
-
require_relative "candidhealth/third_party_payers/v_1/types/toggle_third_party_payer_enablement_request"
|
260
|
-
require_relative "candidhealth/third_party_payers/v_1/types/third_party_payer_update_request"
|
261
248
|
require_relative "candidhealth/write_offs/v_1/types/write_off"
|
262
249
|
require_relative "candidhealth/write_offs/v_1/types/write_off_create"
|
263
250
|
require_relative "candidhealth/write_offs/v_1/types/patient_write_off_reason"
|
@@ -280,12 +267,15 @@ require_relative "candidhealth/pre_encounter/appointments/v_1/types/appointment_
|
|
280
267
|
require_relative "candidhealth/pre_encounter/appointments/v_1/types/service"
|
281
268
|
require_relative "candidhealth/pre_encounter/appointments/v_1/types/mutable_appointment"
|
282
269
|
require_relative "candidhealth/pre_encounter/appointments/v_1/types/appointment"
|
270
|
+
require_relative "candidhealth/pre_encounter/coverages/v_1/types/latest_eligibility_check"
|
283
271
|
require_relative "candidhealth/pre_encounter/coverages/v_1/types/eligibility_check_metadata"
|
284
272
|
require_relative "candidhealth/pre_encounter/coverages/v_1/types/coverage_eligibility_check_response"
|
285
273
|
require_relative "candidhealth/pre_encounter/coverages/v_1/types/eligibility_check"
|
286
274
|
require_relative "candidhealth/pre_encounter/coverages/v_1/types/eligibility_check_status"
|
275
|
+
require_relative "candidhealth/pre_encounter/coverages/v_1/types/benefit_type"
|
287
276
|
require_relative "candidhealth/pre_encounter/coverages/v_1/types/coverage_value"
|
288
277
|
require_relative "candidhealth/pre_encounter/coverages/v_1/types/coverage_benefits"
|
278
|
+
require_relative "candidhealth/pre_encounter/coverages/v_1/types/coverage_details"
|
289
279
|
require_relative "candidhealth/pre_encounter/coverages/v_1/types/plan_coverage"
|
290
280
|
require_relative "candidhealth/pre_encounter/coverages/v_1/types/plan_coverage_details"
|
291
281
|
require_relative "candidhealth/pre_encounter/coverages/v_1/types/service_coverage"
|
@@ -293,6 +283,8 @@ require_relative "candidhealth/pre_encounter/coverages/v_1/types/service_coverag
|
|
293
283
|
require_relative "candidhealth/pre_encounter/coverages/v_1/types/plan_metadata"
|
294
284
|
require_relative "candidhealth/pre_encounter/coverages/v_1/types/plan_date"
|
295
285
|
require_relative "candidhealth/pre_encounter/coverages/v_1/types/eligibility_status"
|
286
|
+
require_relative "candidhealth/pre_encounter/coverages/v_1/types/coverage_level"
|
287
|
+
require_relative "candidhealth/pre_encounter/coverages/v_1/types/coverage_value_unit"
|
296
288
|
require_relative "candidhealth/pre_encounter/coverages/v_1/types/subscriber"
|
297
289
|
require_relative "candidhealth/pre_encounter/coverages/v_1/types/coverage_status"
|
298
290
|
require_relative "candidhealth/pre_encounter/coverages/v_1/types/network_type"
|
@@ -314,6 +306,9 @@ require_relative "candidhealth/pre_encounter/patients/v_1/types/patient"
|
|
314
306
|
require_relative "candidhealth/pre_encounter/patients/v_1/types/patient_page"
|
315
307
|
require_relative "candidhealth/pre_encounter/patients/v_1/types/potential_duplicate_patient"
|
316
308
|
require_relative "candidhealth/pre_encounter/patients/v_1/types/potential_duplicate_patients_error_body"
|
309
|
+
require_relative "candidhealth/pre_encounter/patients/v_1/types/authorization_unit"
|
310
|
+
require_relative "candidhealth/pre_encounter/patients/v_1/types/authorization"
|
311
|
+
require_relative "candidhealth/pre_encounter/patients/v_1/types/referral"
|
317
312
|
require_relative "candidhealth/pre_encounter/patients/v_1/types/guarantor"
|
318
313
|
require_relative "candidhealth/claims/types/claim"
|
319
314
|
require_relative "candidhealth/claims/types/claim_status"
|
@@ -398,6 +393,7 @@ require_relative "candidhealth/invoices/types/invoice_item"
|
|
398
393
|
require_relative "candidhealth/invoices/types/invoice_status"
|
399
394
|
require_relative "candidhealth/service_facility/types/encounter_service_facility_base"
|
400
395
|
require_relative "candidhealth/service_facility/types/encounter_service_facility"
|
396
|
+
require_relative "candidhealth/service_facility/types/encounter_service_facility_update"
|
401
397
|
require_relative "candidhealth/tags/types/tag_create"
|
402
398
|
require_relative "candidhealth/tags/types/tag"
|
403
399
|
require_relative "candidhealth/tags/types/tag_color_enum"
|
@@ -422,6 +418,7 @@ require_relative "candidhealth/pre_encounter/common/types/resource_page"
|
|
422
418
|
require_relative "candidhealth/pre_encounter/common/types/error_base"
|
423
419
|
require_relative "candidhealth/pre_encounter/common/types/not_found_error_body"
|
424
420
|
require_relative "candidhealth/pre_encounter/common/types/version_conflict_error_body"
|
421
|
+
require_relative "candidhealth/pre_encounter/common/types/additional_payer_information"
|
425
422
|
require_relative "candidhealth/pre_encounter/common/types/external_provider_type"
|
426
423
|
require_relative "candidhealth/pre_encounter/common/types/external_provider"
|
427
424
|
require_relative "candidhealth/pre_encounter/common/types/sort_direction"
|