candidhealth 1.5.0 → 1.7.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/lib/candidhealth/auth/default/client.rb +46 -0
- data/lib/candidhealth/credentialing/v_2/client.rb +342 -8
- data/lib/candidhealth/credentialing/v_2/types/base_credentialing_span.rb +143 -0
- data/lib/candidhealth/credentialing/v_2/types/facility_credentialing_span.rb +165 -0
- data/lib/candidhealth/credentialing/v_2/types/facility_credentialing_span_page.rb +88 -0
- data/lib/candidhealth/credentialing/v_2/types/provider_credentialing_span.rb +34 -34
- data/lib/candidhealth/health_care_code_information/client.rb +30 -0
- data/lib/candidhealth/health_care_code_information/v_1/client.rb +268 -0
- data/lib/candidhealth/health_care_code_information/v_1/types/admitting_diagnosis.rb +236 -0
- data/lib/candidhealth/health_care_code_information/v_1/types/admitting_diagnosis_code_qualifier.rb +14 -0
- data/lib/candidhealth/health_care_code_information/v_1/types/code_list_qualifier_code.rb +1068 -0
- data/lib/candidhealth/health_care_code_information/v_1/types/condition_code.rb +71 -0
- data/lib/candidhealth/health_care_code_information/v_1/types/condition_information.rb +237 -0
- data/lib/candidhealth/health_care_code_information/v_1/types/condition_information_code_qualifier.rb +13 -0
- data/lib/candidhealth/health_care_code_information/v_1/types/date_time_period_format_qualifier.rb +54 -0
- data/lib/candidhealth/health_care_code_information/v_1/types/diagnosis_related_group.rb +236 -0
- data/lib/candidhealth/health_care_code_information/v_1/types/diagnosis_related_group_code_qualifier.rb +13 -0
- data/lib/candidhealth/health_care_code_information/v_1/types/external_cause_of_injury.rb +245 -0
- data/lib/candidhealth/health_care_code_information/v_1/types/external_cause_of_injury_code_qualifier.rb +14 -0
- data/lib/candidhealth/health_care_code_information/v_1/types/health_care_code_information.rb +218 -0
- data/lib/candidhealth/health_care_code_information/v_1/types/health_care_code_information_get_all_response.rb +227 -0
- data/lib/candidhealth/health_care_code_information/v_1/types/health_care_code_information_new.rb +188 -0
- data/lib/candidhealth/health_care_code_information/v_1/types/health_care_code_information_update.rb +225 -0
- data/lib/candidhealth/health_care_code_information/v_1/types/occurrence_code.rb +71 -0
- data/lib/candidhealth/health_care_code_information/v_1/types/occurrence_information.rb +249 -0
- data/lib/candidhealth/health_care_code_information/v_1/types/occurrence_information_code_qualifier.rb +13 -0
- data/lib/candidhealth/health_care_code_information/v_1/types/occurrence_span_code.rb +25 -0
- data/lib/candidhealth/health_care_code_information/v_1/types/occurrence_span_code_qualifier.rb +13 -0
- data/lib/candidhealth/health_care_code_information/v_1/types/occurrence_span_information.rb +252 -0
- data/lib/candidhealth/health_care_code_information/v_1/types/other_diagnosis_information.rb +245 -0
- data/lib/candidhealth/health_care_code_information/v_1/types/other_diagnosis_information_code_qualifier.rb +14 -0
- data/lib/candidhealth/health_care_code_information/v_1/types/other_procedure_information.rb +248 -0
- data/lib/candidhealth/health_care_code_information/v_1/types/other_procedure_information_code_qualifier.rb +14 -0
- data/lib/candidhealth/health_care_code_information/v_1/types/patient_reason_for_visit.rb +236 -0
- data/lib/candidhealth/health_care_code_information/v_1/types/patient_reason_for_visit_code_qualifier.rb +14 -0
- data/lib/candidhealth/health_care_code_information/v_1/types/present_on_admission_indicator_code.rb +17 -0
- data/lib/candidhealth/health_care_code_information/v_1/types/principal_diagnosis.rb +245 -0
- data/lib/candidhealth/health_care_code_information/v_1/types/principal_diagnosis_code_qualifier.rb +14 -0
- data/lib/candidhealth/health_care_code_information/v_1/types/principal_procedure_information.rb +246 -0
- data/lib/candidhealth/health_care_code_information/v_1/types/principal_procedure_information_code_qualifier.rb +15 -0
- data/lib/candidhealth/health_care_code_information/v_1/types/rd_8_date.rb +72 -0
- data/lib/candidhealth/health_care_code_information/v_1/types/set_or_clear_admitting_diagnosis.rb +69 -0
- data/lib/candidhealth/health_care_code_information/v_1/types/set_or_clear_diagnosis_related_group.rb +69 -0
- data/lib/candidhealth/health_care_code_information/v_1/types/set_or_clear_principal_diagnosis.rb +69 -0
- data/lib/candidhealth/health_care_code_information/v_1/types/set_or_clear_principal_procedure_information.rb +71 -0
- data/lib/candidhealth/health_care_code_information/v_1/types/treatment_code_information.rb +236 -0
- data/lib/candidhealth/health_care_code_information/v_1/types/treatment_code_qualifier.rb +13 -0
- data/lib/candidhealth/health_care_code_information/v_1/types/value_code.rb +119 -0
- data/lib/candidhealth/health_care_code_information/v_1/types/value_code_qualifier.rb +13 -0
- data/lib/candidhealth/health_care_code_information/v_1/types/value_information.rb +245 -0
- data/lib/candidhealth/patient_ar/client.rb +30 -0
- data/lib/candidhealth/patient_ar/v_1/client.rb +161 -0
- data/lib/candidhealth/patient_ar/v_1/types/insurance_adjustment_info.rb +60 -0
- data/lib/candidhealth/patient_ar/v_1/types/insurance_payment_info.rb +60 -0
- data/lib/candidhealth/patient_ar/v_1/types/invalid_filters_error_type.rb +60 -0
- data/lib/candidhealth/patient_ar/v_1/types/inventory_record.rb +101 -0
- data/lib/candidhealth/patient_ar/v_1/types/invoice_itemization_response.rb +103 -0
- data/lib/candidhealth/patient_ar/v_1/types/list_inventory_paged_response.rb +77 -0
- data/lib/candidhealth/patient_ar/v_1/types/non_insurance_adjustment_info.rb +60 -0
- data/lib/candidhealth/patient_ar/v_1/types/non_insurance_payment_info.rb +60 -0
- data/lib/candidhealth/patient_ar/v_1/types/patient_adjustment_info.rb +60 -0
- data/lib/candidhealth/patient_ar/v_1/types/patient_ar_status.rb +14 -0
- data/lib/candidhealth/patient_ar/v_1/types/patient_payment_allocation.rb +76 -0
- data/lib/candidhealth/patient_ar/v_1/types/patient_payment_info.rb +75 -0
- data/lib/candidhealth/patient_ar/v_1/types/service_line_itemization.rb +210 -0
- data/lib/candidhealth/pre_encounter/patients/v_1/client.rb +132 -0
- data/lib/candidhealth/pre_encounter/patients/v_1/types/mutable_patient.rb +16 -2
- data/lib/candidhealth/pre_encounter/patients/v_1/types/mutable_patient_with_mrn.rb +16 -2
- data/lib/candidhealth/pre_encounter/patients/v_1/types/origination_detail.rb +104 -0
- data/lib/candidhealth/pre_encounter/patients/v_1/types/patient.rb +16 -2
- data/lib/candidhealth/pre_encounter/patients/v_1/types/referral_source.rb +18 -0
- data/lib/candidhealth/pre_encounter/patients/v_1/types/referral_type.rb +16 -0
- data/lib/candidhealth/pre_encounter/patients/v_1/types/specialization_category.rb +42 -0
- data/lib/candidhealth.rb +21 -7
- data/lib/requests.rb +2 -2
- data/lib/types_export.rb +72 -9
- metadata +68 -2
@@ -0,0 +1,161 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require_relative "../../../requests"
|
4
|
+
require "date"
|
5
|
+
require_relative "types/list_inventory_paged_response"
|
6
|
+
require_relative "types/invoice_itemization_response"
|
7
|
+
require "async"
|
8
|
+
|
9
|
+
module CandidApiClient
|
10
|
+
module PatientAr
|
11
|
+
module V1
|
12
|
+
class V1Client
|
13
|
+
# @return [CandidApiClient::RequestClient]
|
14
|
+
attr_reader :request_client
|
15
|
+
|
16
|
+
# @param request_client [CandidApiClient::RequestClient]
|
17
|
+
# @return [CandidApiClient::PatientAr::V1::V1Client]
|
18
|
+
def initialize(request_client:)
|
19
|
+
@request_client = request_client
|
20
|
+
end
|
21
|
+
|
22
|
+
# NOTE: This service is in-development and can only be used by select partners.
|
23
|
+
# Please contact Candid Health to request access.
|
24
|
+
# Retrieve a list of inventory records based on the provided filters. Each
|
25
|
+
# inventory record provides the latest invoiceable status of the associated claim.
|
26
|
+
# The response is paginated, and the `page_token` can be used to retrieve
|
27
|
+
# subsequent pages. Initial requests should not include `page_token`.
|
28
|
+
#
|
29
|
+
# @param since [DateTime] Timestamp to filter records since, inclusive
|
30
|
+
# @param limit [Integer] Maximum number of records to return, default is 100
|
31
|
+
# @param page_token [String]
|
32
|
+
# @param request_options [CandidApiClient::RequestOptions]
|
33
|
+
# @return [CandidApiClient::PatientAr::V1::Types::ListInventoryPagedResponse]
|
34
|
+
# @example
|
35
|
+
# api = CandidApiClient::Client.new(base_url: "https://api.example.com", environment: CandidApiClient::Environment::PRODUCTION)
|
36
|
+
# api.patient_ar.v_1.list_inventory
|
37
|
+
def list_inventory(since: nil, limit: nil, page_token: nil, request_options: nil)
|
38
|
+
response = @request_client.conn.get do |req|
|
39
|
+
req.options.timeout = request_options.timeout_in_seconds unless request_options&.timeout_in_seconds.nil?
|
40
|
+
req.headers["Authorization"] = request_options.token unless request_options&.token.nil?
|
41
|
+
req.headers = {
|
42
|
+
**(req.headers || {}),
|
43
|
+
**@request_client.get_headers,
|
44
|
+
**(request_options&.additional_headers || {})
|
45
|
+
}.compact
|
46
|
+
req.params = {
|
47
|
+
**(request_options&.additional_query_parameters || {}),
|
48
|
+
"since": since,
|
49
|
+
"limit": limit,
|
50
|
+
"page_token": page_token
|
51
|
+
}.compact
|
52
|
+
req.url "#{@request_client.get_url(environment: CandidApi,
|
53
|
+
request_options: request_options)}/api/patient-ar/v1/inventory"
|
54
|
+
end
|
55
|
+
CandidApiClient::PatientAr::V1::Types::ListInventoryPagedResponse.from_json(json_object: response.body)
|
56
|
+
end
|
57
|
+
|
58
|
+
# NOTE: This service is in-development and can only be used by select partners.
|
59
|
+
# Please contact Candid Health to request access.
|
60
|
+
# Provides detailed itemization of invoice data for a specific claim.
|
61
|
+
#
|
62
|
+
# @param claim_id [String]
|
63
|
+
# @param request_options [CandidApiClient::RequestOptions]
|
64
|
+
# @return [CandidApiClient::PatientAr::V1::Types::InvoiceItemizationResponse]
|
65
|
+
# @example
|
66
|
+
# api = CandidApiClient::Client.new(base_url: "https://api.example.com", environment: CandidApiClient::Environment::PRODUCTION)
|
67
|
+
# api.patient_ar.v_1.itemize(claim_id: "d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32")
|
68
|
+
def itemize(claim_id:, request_options: nil)
|
69
|
+
response = @request_client.conn.get do |req|
|
70
|
+
req.options.timeout = request_options.timeout_in_seconds unless request_options&.timeout_in_seconds.nil?
|
71
|
+
req.headers["Authorization"] = request_options.token unless request_options&.token.nil?
|
72
|
+
req.headers = {
|
73
|
+
**(req.headers || {}),
|
74
|
+
**@request_client.get_headers,
|
75
|
+
**(request_options&.additional_headers || {})
|
76
|
+
}.compact
|
77
|
+
req.url "#{@request_client.get_url(environment: CandidApi,
|
78
|
+
request_options: request_options)}/api/patient-ar/v1/invoice-itemization/#{claim_id}"
|
79
|
+
end
|
80
|
+
CandidApiClient::PatientAr::V1::Types::InvoiceItemizationResponse.from_json(json_object: response.body)
|
81
|
+
end
|
82
|
+
end
|
83
|
+
|
84
|
+
class AsyncV1Client
|
85
|
+
# @return [CandidApiClient::AsyncRequestClient]
|
86
|
+
attr_reader :request_client
|
87
|
+
|
88
|
+
# @param request_client [CandidApiClient::AsyncRequestClient]
|
89
|
+
# @return [CandidApiClient::PatientAr::V1::AsyncV1Client]
|
90
|
+
def initialize(request_client:)
|
91
|
+
@request_client = request_client
|
92
|
+
end
|
93
|
+
|
94
|
+
# NOTE: This service is in-development and can only be used by select partners.
|
95
|
+
# Please contact Candid Health to request access.
|
96
|
+
# Retrieve a list of inventory records based on the provided filters. Each
|
97
|
+
# inventory record provides the latest invoiceable status of the associated claim.
|
98
|
+
# The response is paginated, and the `page_token` can be used to retrieve
|
99
|
+
# subsequent pages. Initial requests should not include `page_token`.
|
100
|
+
#
|
101
|
+
# @param since [DateTime] Timestamp to filter records since, inclusive
|
102
|
+
# @param limit [Integer] Maximum number of records to return, default is 100
|
103
|
+
# @param page_token [String]
|
104
|
+
# @param request_options [CandidApiClient::RequestOptions]
|
105
|
+
# @return [CandidApiClient::PatientAr::V1::Types::ListInventoryPagedResponse]
|
106
|
+
# @example
|
107
|
+
# api = CandidApiClient::Client.new(base_url: "https://api.example.com", environment: CandidApiClient::Environment::PRODUCTION)
|
108
|
+
# api.patient_ar.v_1.list_inventory
|
109
|
+
def list_inventory(since: nil, limit: nil, page_token: nil, request_options: nil)
|
110
|
+
Async do
|
111
|
+
response = @request_client.conn.get do |req|
|
112
|
+
req.options.timeout = request_options.timeout_in_seconds unless request_options&.timeout_in_seconds.nil?
|
113
|
+
req.headers["Authorization"] = request_options.token unless request_options&.token.nil?
|
114
|
+
req.headers = {
|
115
|
+
**(req.headers || {}),
|
116
|
+
**@request_client.get_headers,
|
117
|
+
**(request_options&.additional_headers || {})
|
118
|
+
}.compact
|
119
|
+
req.params = {
|
120
|
+
**(request_options&.additional_query_parameters || {}),
|
121
|
+
"since": since,
|
122
|
+
"limit": limit,
|
123
|
+
"page_token": page_token
|
124
|
+
}.compact
|
125
|
+
req.url "#{@request_client.get_url(environment: CandidApi,
|
126
|
+
request_options: request_options)}/api/patient-ar/v1/inventory"
|
127
|
+
end
|
128
|
+
CandidApiClient::PatientAr::V1::Types::ListInventoryPagedResponse.from_json(json_object: response.body)
|
129
|
+
end
|
130
|
+
end
|
131
|
+
|
132
|
+
# NOTE: This service is in-development and can only be used by select partners.
|
133
|
+
# Please contact Candid Health to request access.
|
134
|
+
# Provides detailed itemization of invoice data for a specific claim.
|
135
|
+
#
|
136
|
+
# @param claim_id [String]
|
137
|
+
# @param request_options [CandidApiClient::RequestOptions]
|
138
|
+
# @return [CandidApiClient::PatientAr::V1::Types::InvoiceItemizationResponse]
|
139
|
+
# @example
|
140
|
+
# api = CandidApiClient::Client.new(base_url: "https://api.example.com", environment: CandidApiClient::Environment::PRODUCTION)
|
141
|
+
# api.patient_ar.v_1.itemize(claim_id: "d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32")
|
142
|
+
def itemize(claim_id:, request_options: nil)
|
143
|
+
Async do
|
144
|
+
response = @request_client.conn.get do |req|
|
145
|
+
req.options.timeout = request_options.timeout_in_seconds unless request_options&.timeout_in_seconds.nil?
|
146
|
+
req.headers["Authorization"] = request_options.token unless request_options&.token.nil?
|
147
|
+
req.headers = {
|
148
|
+
**(req.headers || {}),
|
149
|
+
**@request_client.get_headers,
|
150
|
+
**(request_options&.additional_headers || {})
|
151
|
+
}.compact
|
152
|
+
req.url "#{@request_client.get_url(environment: CandidApi,
|
153
|
+
request_options: request_options)}/api/patient-ar/v1/invoice-itemization/#{claim_id}"
|
154
|
+
end
|
155
|
+
CandidApiClient::PatientAr::V1::Types::InvoiceItemizationResponse.from_json(json_object: response.body)
|
156
|
+
end
|
157
|
+
end
|
158
|
+
end
|
159
|
+
end
|
160
|
+
end
|
161
|
+
end
|
@@ -0,0 +1,60 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require "ostruct"
|
4
|
+
require "json"
|
5
|
+
|
6
|
+
module CandidApiClient
|
7
|
+
module PatientAr
|
8
|
+
module V1
|
9
|
+
module Types
|
10
|
+
class InsuranceAdjustmentInfo
|
11
|
+
# @return [Integer] The total amount of insurance adjustments in cents for the service line.
|
12
|
+
attr_reader :total_adjustment_cents
|
13
|
+
# @return [OpenStruct] Additional properties unmapped to the current class definition
|
14
|
+
attr_reader :additional_properties
|
15
|
+
# @return [Object]
|
16
|
+
attr_reader :_field_set
|
17
|
+
protected :_field_set
|
18
|
+
|
19
|
+
OMIT = Object.new
|
20
|
+
|
21
|
+
# @param total_adjustment_cents [Integer] The total amount of insurance adjustments in cents for the service line.
|
22
|
+
# @param additional_properties [OpenStruct] Additional properties unmapped to the current class definition
|
23
|
+
# @return [CandidApiClient::PatientAr::V1::Types::InsuranceAdjustmentInfo]
|
24
|
+
def initialize(total_adjustment_cents:, additional_properties: nil)
|
25
|
+
@total_adjustment_cents = total_adjustment_cents
|
26
|
+
@additional_properties = additional_properties
|
27
|
+
@_field_set = { "total_adjustment_cents": total_adjustment_cents }
|
28
|
+
end
|
29
|
+
|
30
|
+
# Deserialize a JSON object to an instance of InsuranceAdjustmentInfo
|
31
|
+
#
|
32
|
+
# @param json_object [String]
|
33
|
+
# @return [CandidApiClient::PatientAr::V1::Types::InsuranceAdjustmentInfo]
|
34
|
+
def self.from_json(json_object:)
|
35
|
+
struct = JSON.parse(json_object, object_class: OpenStruct)
|
36
|
+
total_adjustment_cents = struct["total_adjustment_cents"]
|
37
|
+
new(total_adjustment_cents: total_adjustment_cents, additional_properties: struct)
|
38
|
+
end
|
39
|
+
|
40
|
+
# Serialize an instance of InsuranceAdjustmentInfo to a JSON object
|
41
|
+
#
|
42
|
+
# @return [String]
|
43
|
+
def to_json(*_args)
|
44
|
+
@_field_set&.to_json
|
45
|
+
end
|
46
|
+
|
47
|
+
# Leveraged for Union-type generation, validate_raw attempts to parse the given
|
48
|
+
# hash and check each fields type against the current object's property
|
49
|
+
# definitions.
|
50
|
+
#
|
51
|
+
# @param obj [Object]
|
52
|
+
# @return [Void]
|
53
|
+
def self.validate_raw(obj:)
|
54
|
+
obj.total_adjustment_cents.is_a?(Integer) != false || raise("Passed value for field obj.total_adjustment_cents is not the expected type, validation failed.")
|
55
|
+
end
|
56
|
+
end
|
57
|
+
end
|
58
|
+
end
|
59
|
+
end
|
60
|
+
end
|
@@ -0,0 +1,60 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require "ostruct"
|
4
|
+
require "json"
|
5
|
+
|
6
|
+
module CandidApiClient
|
7
|
+
module PatientAr
|
8
|
+
module V1
|
9
|
+
module Types
|
10
|
+
class InsurancePaymentInfo
|
11
|
+
# @return [Integer] The total amount of insurance payments in cents for the service line.
|
12
|
+
attr_reader :total_payment_cents
|
13
|
+
# @return [OpenStruct] Additional properties unmapped to the current class definition
|
14
|
+
attr_reader :additional_properties
|
15
|
+
# @return [Object]
|
16
|
+
attr_reader :_field_set
|
17
|
+
protected :_field_set
|
18
|
+
|
19
|
+
OMIT = Object.new
|
20
|
+
|
21
|
+
# @param total_payment_cents [Integer] The total amount of insurance payments in cents for the service line.
|
22
|
+
# @param additional_properties [OpenStruct] Additional properties unmapped to the current class definition
|
23
|
+
# @return [CandidApiClient::PatientAr::V1::Types::InsurancePaymentInfo]
|
24
|
+
def initialize(total_payment_cents:, additional_properties: nil)
|
25
|
+
@total_payment_cents = total_payment_cents
|
26
|
+
@additional_properties = additional_properties
|
27
|
+
@_field_set = { "total_payment_cents": total_payment_cents }
|
28
|
+
end
|
29
|
+
|
30
|
+
# Deserialize a JSON object to an instance of InsurancePaymentInfo
|
31
|
+
#
|
32
|
+
# @param json_object [String]
|
33
|
+
# @return [CandidApiClient::PatientAr::V1::Types::InsurancePaymentInfo]
|
34
|
+
def self.from_json(json_object:)
|
35
|
+
struct = JSON.parse(json_object, object_class: OpenStruct)
|
36
|
+
total_payment_cents = struct["total_payment_cents"]
|
37
|
+
new(total_payment_cents: total_payment_cents, additional_properties: struct)
|
38
|
+
end
|
39
|
+
|
40
|
+
# Serialize an instance of InsurancePaymentInfo to a JSON object
|
41
|
+
#
|
42
|
+
# @return [String]
|
43
|
+
def to_json(*_args)
|
44
|
+
@_field_set&.to_json
|
45
|
+
end
|
46
|
+
|
47
|
+
# Leveraged for Union-type generation, validate_raw attempts to parse the given
|
48
|
+
# hash and check each fields type against the current object's property
|
49
|
+
# definitions.
|
50
|
+
#
|
51
|
+
# @param obj [Object]
|
52
|
+
# @return [Void]
|
53
|
+
def self.validate_raw(obj:)
|
54
|
+
obj.total_payment_cents.is_a?(Integer) != false || raise("Passed value for field obj.total_payment_cents is not the expected type, validation failed.")
|
55
|
+
end
|
56
|
+
end
|
57
|
+
end
|
58
|
+
end
|
59
|
+
end
|
60
|
+
end
|
@@ -0,0 +1,60 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require "ostruct"
|
4
|
+
require "json"
|
5
|
+
|
6
|
+
module CandidApiClient
|
7
|
+
module PatientAr
|
8
|
+
module V1
|
9
|
+
module Types
|
10
|
+
class InvalidFiltersErrorType
|
11
|
+
# @return [String]
|
12
|
+
attr_reader :message
|
13
|
+
# @return [OpenStruct] Additional properties unmapped to the current class definition
|
14
|
+
attr_reader :additional_properties
|
15
|
+
# @return [Object]
|
16
|
+
attr_reader :_field_set
|
17
|
+
protected :_field_set
|
18
|
+
|
19
|
+
OMIT = Object.new
|
20
|
+
|
21
|
+
# @param message [String]
|
22
|
+
# @param additional_properties [OpenStruct] Additional properties unmapped to the current class definition
|
23
|
+
# @return [CandidApiClient::PatientAr::V1::Types::InvalidFiltersErrorType]
|
24
|
+
def initialize(message:, additional_properties: nil)
|
25
|
+
@message = message
|
26
|
+
@additional_properties = additional_properties
|
27
|
+
@_field_set = { "message": message }
|
28
|
+
end
|
29
|
+
|
30
|
+
# Deserialize a JSON object to an instance of InvalidFiltersErrorType
|
31
|
+
#
|
32
|
+
# @param json_object [String]
|
33
|
+
# @return [CandidApiClient::PatientAr::V1::Types::InvalidFiltersErrorType]
|
34
|
+
def self.from_json(json_object:)
|
35
|
+
struct = JSON.parse(json_object, object_class: OpenStruct)
|
36
|
+
message = struct["message"]
|
37
|
+
new(message: message, additional_properties: struct)
|
38
|
+
end
|
39
|
+
|
40
|
+
# Serialize an instance of InvalidFiltersErrorType to a JSON object
|
41
|
+
#
|
42
|
+
# @return [String]
|
43
|
+
def to_json(*_args)
|
44
|
+
@_field_set&.to_json
|
45
|
+
end
|
46
|
+
|
47
|
+
# Leveraged for Union-type generation, validate_raw attempts to parse the given
|
48
|
+
# hash and check each fields type against the current object's property
|
49
|
+
# definitions.
|
50
|
+
#
|
51
|
+
# @param obj [Object]
|
52
|
+
# @return [Void]
|
53
|
+
def self.validate_raw(obj:)
|
54
|
+
obj.message.is_a?(String) != false || raise("Passed value for field obj.message is not the expected type, validation failed.")
|
55
|
+
end
|
56
|
+
end
|
57
|
+
end
|
58
|
+
end
|
59
|
+
end
|
60
|
+
end
|
@@ -0,0 +1,101 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require "date"
|
4
|
+
require_relative "patient_ar_status"
|
5
|
+
require "ostruct"
|
6
|
+
require "json"
|
7
|
+
|
8
|
+
module CandidApiClient
|
9
|
+
module PatientAr
|
10
|
+
module V1
|
11
|
+
module Types
|
12
|
+
class InventoryRecord
|
13
|
+
# @return [String]
|
14
|
+
attr_reader :claim_id
|
15
|
+
# @return [String]
|
16
|
+
attr_reader :encounter_id
|
17
|
+
# @return [DateTime]
|
18
|
+
attr_reader :timestamp
|
19
|
+
# @return [String]
|
20
|
+
attr_reader :patient_external_id
|
21
|
+
# @return [CandidApiClient::PatientAr::V1::Types::PatientArStatus]
|
22
|
+
attr_reader :patient_ar_status
|
23
|
+
# @return [OpenStruct] Additional properties unmapped to the current class definition
|
24
|
+
attr_reader :additional_properties
|
25
|
+
# @return [Object]
|
26
|
+
attr_reader :_field_set
|
27
|
+
protected :_field_set
|
28
|
+
|
29
|
+
OMIT = Object.new
|
30
|
+
|
31
|
+
# @param claim_id [String]
|
32
|
+
# @param encounter_id [String]
|
33
|
+
# @param timestamp [DateTime]
|
34
|
+
# @param patient_external_id [String]
|
35
|
+
# @param patient_ar_status [CandidApiClient::PatientAr::V1::Types::PatientArStatus]
|
36
|
+
# @param additional_properties [OpenStruct] Additional properties unmapped to the current class definition
|
37
|
+
# @return [CandidApiClient::PatientAr::V1::Types::InventoryRecord]
|
38
|
+
def initialize(claim_id:, encounter_id:, timestamp:, patient_external_id:, patient_ar_status:,
|
39
|
+
additional_properties: nil)
|
40
|
+
@claim_id = claim_id
|
41
|
+
@encounter_id = encounter_id
|
42
|
+
@timestamp = timestamp
|
43
|
+
@patient_external_id = patient_external_id
|
44
|
+
@patient_ar_status = patient_ar_status
|
45
|
+
@additional_properties = additional_properties
|
46
|
+
@_field_set = {
|
47
|
+
"claim_id": claim_id,
|
48
|
+
"encounter_id": encounter_id,
|
49
|
+
"timestamp": timestamp,
|
50
|
+
"patient_external_id": patient_external_id,
|
51
|
+
"patient_ar_status": patient_ar_status
|
52
|
+
}
|
53
|
+
end
|
54
|
+
|
55
|
+
# Deserialize a JSON object to an instance of InventoryRecord
|
56
|
+
#
|
57
|
+
# @param json_object [String]
|
58
|
+
# @return [CandidApiClient::PatientAr::V1::Types::InventoryRecord]
|
59
|
+
def self.from_json(json_object:)
|
60
|
+
struct = JSON.parse(json_object, object_class: OpenStruct)
|
61
|
+
parsed_json = JSON.parse(json_object)
|
62
|
+
claim_id = struct["claim_id"]
|
63
|
+
encounter_id = struct["encounter_id"]
|
64
|
+
timestamp = (DateTime.parse(parsed_json["timestamp"]) unless parsed_json["timestamp"].nil?)
|
65
|
+
patient_external_id = struct["patient_external_id"]
|
66
|
+
patient_ar_status = struct["patient_ar_status"]
|
67
|
+
new(
|
68
|
+
claim_id: claim_id,
|
69
|
+
encounter_id: encounter_id,
|
70
|
+
timestamp: timestamp,
|
71
|
+
patient_external_id: patient_external_id,
|
72
|
+
patient_ar_status: patient_ar_status,
|
73
|
+
additional_properties: struct
|
74
|
+
)
|
75
|
+
end
|
76
|
+
|
77
|
+
# Serialize an instance of InventoryRecord to a JSON object
|
78
|
+
#
|
79
|
+
# @return [String]
|
80
|
+
def to_json(*_args)
|
81
|
+
@_field_set&.to_json
|
82
|
+
end
|
83
|
+
|
84
|
+
# Leveraged for Union-type generation, validate_raw attempts to parse the given
|
85
|
+
# hash and check each fields type against the current object's property
|
86
|
+
# definitions.
|
87
|
+
#
|
88
|
+
# @param obj [Object]
|
89
|
+
# @return [Void]
|
90
|
+
def self.validate_raw(obj:)
|
91
|
+
obj.claim_id.is_a?(String) != false || raise("Passed value for field obj.claim_id is not the expected type, validation failed.")
|
92
|
+
obj.encounter_id.is_a?(String) != false || raise("Passed value for field obj.encounter_id is not the expected type, validation failed.")
|
93
|
+
obj.timestamp.is_a?(DateTime) != false || raise("Passed value for field obj.timestamp is not the expected type, validation failed.")
|
94
|
+
obj.patient_external_id.is_a?(String) != false || raise("Passed value for field obj.patient_external_id is not the expected type, validation failed.")
|
95
|
+
obj.patient_ar_status.is_a?(CandidApiClient::PatientAr::V1::Types::PatientArStatus) != false || raise("Passed value for field obj.patient_ar_status is not the expected type, validation failed.")
|
96
|
+
end
|
97
|
+
end
|
98
|
+
end
|
99
|
+
end
|
100
|
+
end
|
101
|
+
end
|
@@ -0,0 +1,103 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require_relative "patient_payment_info"
|
4
|
+
require_relative "service_line_itemization"
|
5
|
+
require "ostruct"
|
6
|
+
require "json"
|
7
|
+
|
8
|
+
module CandidApiClient
|
9
|
+
module PatientAr
|
10
|
+
module V1
|
11
|
+
module Types
|
12
|
+
class InvoiceItemizationResponse
|
13
|
+
# @return [String] The ID of the claim associated with the invoice itemization.
|
14
|
+
attr_reader :claim_id
|
15
|
+
# @return [Integer] The total patient balance in cents for the claim. Negative values indicate a
|
16
|
+
# credit balance.
|
17
|
+
attr_reader :patient_balance_cents
|
18
|
+
# @return [CandidApiClient::PatientAr::V1::Types::PatientPaymentInfo]
|
19
|
+
attr_reader :claim_level_patient_payments
|
20
|
+
# @return [Array<CandidApiClient::PatientAr::V1::Types::ServiceLineItemization>] A list of service line itemizations for the claim.
|
21
|
+
attr_reader :service_line_itemization
|
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 claim_id [String] The ID of the claim associated with the invoice itemization.
|
31
|
+
# @param patient_balance_cents [Integer] The total patient balance in cents for the claim. Negative values indicate a
|
32
|
+
# credit balance.
|
33
|
+
# @param claim_level_patient_payments [CandidApiClient::PatientAr::V1::Types::PatientPaymentInfo]
|
34
|
+
# @param service_line_itemization [Array<CandidApiClient::PatientAr::V1::Types::ServiceLineItemization>] A list of service line itemizations for the claim.
|
35
|
+
# @param additional_properties [OpenStruct] Additional properties unmapped to the current class definition
|
36
|
+
# @return [CandidApiClient::PatientAr::V1::Types::InvoiceItemizationResponse]
|
37
|
+
def initialize(claim_id:, patient_balance_cents:, claim_level_patient_payments:, service_line_itemization:,
|
38
|
+
additional_properties: nil)
|
39
|
+
@claim_id = claim_id
|
40
|
+
@patient_balance_cents = patient_balance_cents
|
41
|
+
@claim_level_patient_payments = claim_level_patient_payments
|
42
|
+
@service_line_itemization = service_line_itemization
|
43
|
+
@additional_properties = additional_properties
|
44
|
+
@_field_set = {
|
45
|
+
"claim_id": claim_id,
|
46
|
+
"patient_balance_cents": patient_balance_cents,
|
47
|
+
"claim_level_patient_payments": claim_level_patient_payments,
|
48
|
+
"service_line_itemization": service_line_itemization
|
49
|
+
}
|
50
|
+
end
|
51
|
+
|
52
|
+
# Deserialize a JSON object to an instance of InvoiceItemizationResponse
|
53
|
+
#
|
54
|
+
# @param json_object [String]
|
55
|
+
# @return [CandidApiClient::PatientAr::V1::Types::InvoiceItemizationResponse]
|
56
|
+
def self.from_json(json_object:)
|
57
|
+
struct = JSON.parse(json_object, object_class: OpenStruct)
|
58
|
+
parsed_json = JSON.parse(json_object)
|
59
|
+
claim_id = struct["claim_id"]
|
60
|
+
patient_balance_cents = struct["patient_balance_cents"]
|
61
|
+
if parsed_json["claim_level_patient_payments"].nil?
|
62
|
+
claim_level_patient_payments = nil
|
63
|
+
else
|
64
|
+
claim_level_patient_payments = parsed_json["claim_level_patient_payments"].to_json
|
65
|
+
claim_level_patient_payments = CandidApiClient::PatientAr::V1::Types::PatientPaymentInfo.from_json(json_object: claim_level_patient_payments)
|
66
|
+
end
|
67
|
+
service_line_itemization = parsed_json["service_line_itemization"]&.map do |item|
|
68
|
+
item = item.to_json
|
69
|
+
CandidApiClient::PatientAr::V1::Types::ServiceLineItemization.from_json(json_object: item)
|
70
|
+
end
|
71
|
+
new(
|
72
|
+
claim_id: claim_id,
|
73
|
+
patient_balance_cents: patient_balance_cents,
|
74
|
+
claim_level_patient_payments: claim_level_patient_payments,
|
75
|
+
service_line_itemization: service_line_itemization,
|
76
|
+
additional_properties: struct
|
77
|
+
)
|
78
|
+
end
|
79
|
+
|
80
|
+
# Serialize an instance of InvoiceItemizationResponse to a JSON object
|
81
|
+
#
|
82
|
+
# @return [String]
|
83
|
+
def to_json(*_args)
|
84
|
+
@_field_set&.to_json
|
85
|
+
end
|
86
|
+
|
87
|
+
# Leveraged for Union-type generation, validate_raw attempts to parse the given
|
88
|
+
# hash and check each fields type against the current object's property
|
89
|
+
# definitions.
|
90
|
+
#
|
91
|
+
# @param obj [Object]
|
92
|
+
# @return [Void]
|
93
|
+
def self.validate_raw(obj:)
|
94
|
+
obj.claim_id.is_a?(String) != false || raise("Passed value for field obj.claim_id is not the expected type, validation failed.")
|
95
|
+
obj.patient_balance_cents.is_a?(Integer) != false || raise("Passed value for field obj.patient_balance_cents is not the expected type, validation failed.")
|
96
|
+
CandidApiClient::PatientAr::V1::Types::PatientPaymentInfo.validate_raw(obj: obj.claim_level_patient_payments)
|
97
|
+
obj.service_line_itemization.is_a?(Array) != false || raise("Passed value for field obj.service_line_itemization is not the expected type, validation failed.")
|
98
|
+
end
|
99
|
+
end
|
100
|
+
end
|
101
|
+
end
|
102
|
+
end
|
103
|
+
end
|
@@ -0,0 +1,77 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require_relative "inventory_record"
|
4
|
+
require "ostruct"
|
5
|
+
require "json"
|
6
|
+
|
7
|
+
module CandidApiClient
|
8
|
+
module PatientAr
|
9
|
+
module V1
|
10
|
+
module Types
|
11
|
+
class ListInventoryPagedResponse
|
12
|
+
# @return [Array<CandidApiClient::PatientAr::V1::Types::InventoryRecord>] List of inventory records matching the filters
|
13
|
+
attr_reader :records
|
14
|
+
# @return [String] Token for the next page of results, if available
|
15
|
+
attr_reader :next_page_token
|
16
|
+
# @return [OpenStruct] Additional properties unmapped to the current class definition
|
17
|
+
attr_reader :additional_properties
|
18
|
+
# @return [Object]
|
19
|
+
attr_reader :_field_set
|
20
|
+
protected :_field_set
|
21
|
+
|
22
|
+
OMIT = Object.new
|
23
|
+
|
24
|
+
# @param records [Array<CandidApiClient::PatientAr::V1::Types::InventoryRecord>] List of inventory records matching the filters
|
25
|
+
# @param next_page_token [String] Token for the next page of results, if available
|
26
|
+
# @param additional_properties [OpenStruct] Additional properties unmapped to the current class definition
|
27
|
+
# @return [CandidApiClient::PatientAr::V1::Types::ListInventoryPagedResponse]
|
28
|
+
def initialize(records:, next_page_token: OMIT, additional_properties: nil)
|
29
|
+
@records = records
|
30
|
+
@next_page_token = next_page_token if next_page_token != OMIT
|
31
|
+
@additional_properties = additional_properties
|
32
|
+
@_field_set = { "records": records, "next_page_token": next_page_token }.reject do |_k, v|
|
33
|
+
v == OMIT
|
34
|
+
end
|
35
|
+
end
|
36
|
+
|
37
|
+
# Deserialize a JSON object to an instance of ListInventoryPagedResponse
|
38
|
+
#
|
39
|
+
# @param json_object [String]
|
40
|
+
# @return [CandidApiClient::PatientAr::V1::Types::ListInventoryPagedResponse]
|
41
|
+
def self.from_json(json_object:)
|
42
|
+
struct = JSON.parse(json_object, object_class: OpenStruct)
|
43
|
+
parsed_json = JSON.parse(json_object)
|
44
|
+
records = parsed_json["records"]&.map do |item|
|
45
|
+
item = item.to_json
|
46
|
+
CandidApiClient::PatientAr::V1::Types::InventoryRecord.from_json(json_object: item)
|
47
|
+
end
|
48
|
+
next_page_token = struct["next_page_token"]
|
49
|
+
new(
|
50
|
+
records: records,
|
51
|
+
next_page_token: next_page_token,
|
52
|
+
additional_properties: struct
|
53
|
+
)
|
54
|
+
end
|
55
|
+
|
56
|
+
# Serialize an instance of ListInventoryPagedResponse to a JSON object
|
57
|
+
#
|
58
|
+
# @return [String]
|
59
|
+
def to_json(*_args)
|
60
|
+
@_field_set&.to_json
|
61
|
+
end
|
62
|
+
|
63
|
+
# Leveraged for Union-type generation, validate_raw attempts to parse the given
|
64
|
+
# hash and check each fields type against the current object's property
|
65
|
+
# definitions.
|
66
|
+
#
|
67
|
+
# @param obj [Object]
|
68
|
+
# @return [Void]
|
69
|
+
def self.validate_raw(obj:)
|
70
|
+
obj.records.is_a?(Array) != false || raise("Passed value for field obj.records is not the expected type, validation failed.")
|
71
|
+
obj.next_page_token&.is_a?(String) != false || raise("Passed value for field obj.next_page_token is not the expected type, validation failed.")
|
72
|
+
end
|
73
|
+
end
|
74
|
+
end
|
75
|
+
end
|
76
|
+
end
|
77
|
+
end
|