candidhealth 0.34.5 → 0.34.6
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/diagnoses/client.rb +234 -0
- data/lib/candidhealth/diagnoses/types/diagnosis_not_found_error.rb +70 -0
- data/lib/candidhealth/encounters/v_4/client.rb +12 -8
- data/lib/candidhealth/medication_dispense/v_1/client.rb +4 -2
- data/lib/candidhealth/service_lines/v_2/client.rb +6 -4
- data/lib/candidhealth/service_lines/v_2/types/drug_identification.rb +10 -2
- data/lib/candidhealth/service_lines/v_2/types/service_line.rb +13 -13
- data/lib/candidhealth/service_lines/v_2/types/service_line_create.rb +13 -13
- data/lib/candidhealth/service_lines/v_2/types/service_line_update.rb +17 -13
- data/lib/candidhealth/service_lines/v_2/types/test_result.rb +30 -54
- data/lib/candidhealth/service_lines/v_2/types/test_result_type.rb +14 -0
- data/lib/candidhealth.rb +7 -0
- data/lib/requests.rb +2 -2
- data/lib/types_export.rb +2 -0
- metadata +5 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 106295fb417236a64e70a9443641c866b5b7924dc03d9365ded25e5b9f4158b5
|
4
|
+
data.tar.gz: d93d61e4e2295cc001f253b04feac3ba50af9574666cd52a6c9266af21bffc12
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: decdf49dacf832bb5b549b98951cec1408948dd053f5938dbcd44e3d2ab218d82fc49df5927c103224275324662dcc63b59ac89fee35f59e11b9f4d4926cd914
|
7
|
+
data.tar.gz: 1e3797cbc0ef23a19f1d21b9802abe8fdfb7324d65d6dacd5286e1711d9323723fd47b91eca0d09ae153f6227ff8958292cbd6c09c97f411ff218f3387cf9a41
|
@@ -0,0 +1,234 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require_relative "../../requests"
|
4
|
+
require_relative "types/standalone_diagnosis_create"
|
5
|
+
require_relative "types/diagnosis"
|
6
|
+
require_relative "types/diagnosis_type_code"
|
7
|
+
require "async"
|
8
|
+
|
9
|
+
module CandidApiClient
|
10
|
+
class DiagnosesClient
|
11
|
+
# @return [CandidApiClient::RequestClient]
|
12
|
+
attr_reader :request_client
|
13
|
+
|
14
|
+
# @param request_client [CandidApiClient::RequestClient]
|
15
|
+
# @return [CandidApiClient::DiagnosesClient]
|
16
|
+
def initialize(request_client:)
|
17
|
+
@request_client = request_client
|
18
|
+
end
|
19
|
+
|
20
|
+
# Creates a new diagnosis for an encounter
|
21
|
+
#
|
22
|
+
# @param request [Hash] Request of type CandidApiClient::Diagnoses::Types::StandaloneDiagnosisCreate, as a Hash
|
23
|
+
# * :encounter_id (String)
|
24
|
+
# * :name (String)
|
25
|
+
# * :code_type (CandidApiClient::Diagnoses::Types::DiagnosisTypeCode)
|
26
|
+
# * :code (String)
|
27
|
+
# @param request_options [CandidApiClient::RequestOptions]
|
28
|
+
# @return [CandidApiClient::Diagnoses::Types::Diagnosis]
|
29
|
+
# @example
|
30
|
+
# api = CandidApiClient::Client.new(base_url: "https://api.example.com", environment: CandidApiClient::Environment::PRODUCTION)
|
31
|
+
# api.diagnoses.create(request: { encounter_id: "d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32", name: "string", code_type: ABF, code: "string" })
|
32
|
+
def create(request:, request_options: nil)
|
33
|
+
response = @request_client.conn.post do |req|
|
34
|
+
req.options.timeout = request_options.timeout_in_seconds unless request_options&.timeout_in_seconds.nil?
|
35
|
+
req.headers["Authorization"] = request_options.token unless request_options&.token.nil?
|
36
|
+
req.headers = {
|
37
|
+
**(req.headers || {}),
|
38
|
+
**@request_client.get_headers,
|
39
|
+
**(request_options&.additional_headers || {})
|
40
|
+
}.compact
|
41
|
+
req.body = { **(request || {}), **(request_options&.additional_body_parameters || {}) }.compact
|
42
|
+
req.url "#{@request_client.get_url(environment: CandidApi, request_options: request_options)}/api/diagnoses/v2"
|
43
|
+
end
|
44
|
+
CandidApiClient::Diagnoses::Types::Diagnosis.from_json(json_object: response.body)
|
45
|
+
end
|
46
|
+
|
47
|
+
# Updates the diagnosis record matching the provided `diagnosis_id`
|
48
|
+
#
|
49
|
+
# @param diagnosis_id [String]
|
50
|
+
# @param name [String] Empty string not allowed.
|
51
|
+
# @param code_type [CandidApiClient::Diagnoses::Types::DiagnosisTypeCode] Typically, providers submitting claims to Candid are using ICD-10 diagnosis
|
52
|
+
# codes. If you are using ICD-10 codes, the primary diagnosis code listed on the
|
53
|
+
# claim should use the ABK code_type. If more than one diagnosis is being
|
54
|
+
# submitted on a claim, please use ABF for the rest of the listed diagnoses. If
|
55
|
+
# you are using ICD-9 diagnosis codes, use BK and BF for the principal and
|
56
|
+
# following diagnosis code(s) respectively.
|
57
|
+
# @param code [String] Empty string not allowed.
|
58
|
+
# Should be of the appropriate format for the provided `code_type`.
|
59
|
+
# Must obey the ICD-10 format if an ICD-10 code_type is provided, specifically:
|
60
|
+
# - Letter
|
61
|
+
# - Digit
|
62
|
+
# - Digit or the letter `A` or `B`
|
63
|
+
# - (Optional) Period `.`
|
64
|
+
# - Up to 4 (or as few as 0) letters and digits
|
65
|
+
# @param request_options [CandidApiClient::RequestOptions]
|
66
|
+
# @return [CandidApiClient::Diagnoses::Types::Diagnosis]
|
67
|
+
# @example
|
68
|
+
# api = CandidApiClient::Client.new(base_url: "https://api.example.com", environment: CandidApiClient::Environment::PRODUCTION)
|
69
|
+
# api.diagnoses.update(
|
70
|
+
# diagnosis_id: "d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32",
|
71
|
+
# name: "string",
|
72
|
+
# code_type: ABF,
|
73
|
+
# code: "string"
|
74
|
+
# )
|
75
|
+
def update(diagnosis_id:, name: nil, code_type: nil, code: nil, request_options: nil)
|
76
|
+
response = @request_client.conn.patch do |req|
|
77
|
+
req.options.timeout = request_options.timeout_in_seconds unless request_options&.timeout_in_seconds.nil?
|
78
|
+
req.headers["Authorization"] = request_options.token unless request_options&.token.nil?
|
79
|
+
req.headers = {
|
80
|
+
**(req.headers || {}),
|
81
|
+
**@request_client.get_headers,
|
82
|
+
**(request_options&.additional_headers || {})
|
83
|
+
}.compact
|
84
|
+
req.body = {
|
85
|
+
**(request_options&.additional_body_parameters || {}),
|
86
|
+
name: name,
|
87
|
+
code_type: code_type,
|
88
|
+
code: code
|
89
|
+
}.compact
|
90
|
+
req.url "#{@request_client.get_url(environment: CandidApi,
|
91
|
+
request_options: request_options)}/api/diagnoses/v2/#{diagnosis_id}"
|
92
|
+
end
|
93
|
+
CandidApiClient::Diagnoses::Types::Diagnosis.from_json(json_object: response.body)
|
94
|
+
end
|
95
|
+
|
96
|
+
# Deletes the diagnosis record associated with the provided `diagnosis_id`
|
97
|
+
#
|
98
|
+
# @param diagnosis_id [String]
|
99
|
+
# @param request_options [CandidApiClient::RequestOptions]
|
100
|
+
# @return [Void]
|
101
|
+
# @example
|
102
|
+
# api = CandidApiClient::Client.new(base_url: "https://api.example.com", environment: CandidApiClient::Environment::PRODUCTION)
|
103
|
+
# api.diagnoses.delete(diagnosis_id: "d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32")
|
104
|
+
def delete(diagnosis_id:, request_options: nil)
|
105
|
+
@request_client.conn.delete do |req|
|
106
|
+
req.options.timeout = request_options.timeout_in_seconds unless request_options&.timeout_in_seconds.nil?
|
107
|
+
req.headers["Authorization"] = request_options.token unless request_options&.token.nil?
|
108
|
+
req.headers = {
|
109
|
+
**(req.headers || {}),
|
110
|
+
**@request_client.get_headers,
|
111
|
+
**(request_options&.additional_headers || {})
|
112
|
+
}.compact
|
113
|
+
req.url "#{@request_client.get_url(environment: CandidApi,
|
114
|
+
request_options: request_options)}/api/diagnoses/v2/#{diagnosis_id}"
|
115
|
+
end
|
116
|
+
end
|
117
|
+
end
|
118
|
+
|
119
|
+
class AsyncDiagnosesClient
|
120
|
+
# @return [CandidApiClient::AsyncRequestClient]
|
121
|
+
attr_reader :request_client
|
122
|
+
|
123
|
+
# @param request_client [CandidApiClient::AsyncRequestClient]
|
124
|
+
# @return [CandidApiClient::AsyncDiagnosesClient]
|
125
|
+
def initialize(request_client:)
|
126
|
+
@request_client = request_client
|
127
|
+
end
|
128
|
+
|
129
|
+
# Creates a new diagnosis for an encounter
|
130
|
+
#
|
131
|
+
# @param request [Hash] Request of type CandidApiClient::Diagnoses::Types::StandaloneDiagnosisCreate, as a Hash
|
132
|
+
# * :encounter_id (String)
|
133
|
+
# * :name (String)
|
134
|
+
# * :code_type (CandidApiClient::Diagnoses::Types::DiagnosisTypeCode)
|
135
|
+
# * :code (String)
|
136
|
+
# @param request_options [CandidApiClient::RequestOptions]
|
137
|
+
# @return [CandidApiClient::Diagnoses::Types::Diagnosis]
|
138
|
+
# @example
|
139
|
+
# api = CandidApiClient::Client.new(base_url: "https://api.example.com", environment: CandidApiClient::Environment::PRODUCTION)
|
140
|
+
# api.diagnoses.create(request: { encounter_id: "d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32", name: "string", code_type: ABF, code: "string" })
|
141
|
+
def create(request:, request_options: nil)
|
142
|
+
Async do
|
143
|
+
response = @request_client.conn.post do |req|
|
144
|
+
req.options.timeout = request_options.timeout_in_seconds unless request_options&.timeout_in_seconds.nil?
|
145
|
+
req.headers["Authorization"] = request_options.token unless request_options&.token.nil?
|
146
|
+
req.headers = {
|
147
|
+
**(req.headers || {}),
|
148
|
+
**@request_client.get_headers,
|
149
|
+
**(request_options&.additional_headers || {})
|
150
|
+
}.compact
|
151
|
+
req.body = { **(request || {}), **(request_options&.additional_body_parameters || {}) }.compact
|
152
|
+
req.url "#{@request_client.get_url(environment: CandidApi,
|
153
|
+
request_options: request_options)}/api/diagnoses/v2"
|
154
|
+
end
|
155
|
+
CandidApiClient::Diagnoses::Types::Diagnosis.from_json(json_object: response.body)
|
156
|
+
end
|
157
|
+
end
|
158
|
+
|
159
|
+
# Updates the diagnosis record matching the provided `diagnosis_id`
|
160
|
+
#
|
161
|
+
# @param diagnosis_id [String]
|
162
|
+
# @param name [String] Empty string not allowed.
|
163
|
+
# @param code_type [CandidApiClient::Diagnoses::Types::DiagnosisTypeCode] Typically, providers submitting claims to Candid are using ICD-10 diagnosis
|
164
|
+
# codes. If you are using ICD-10 codes, the primary diagnosis code listed on the
|
165
|
+
# claim should use the ABK code_type. If more than one diagnosis is being
|
166
|
+
# submitted on a claim, please use ABF for the rest of the listed diagnoses. If
|
167
|
+
# you are using ICD-9 diagnosis codes, use BK and BF for the principal and
|
168
|
+
# following diagnosis code(s) respectively.
|
169
|
+
# @param code [String] Empty string not allowed.
|
170
|
+
# Should be of the appropriate format for the provided `code_type`.
|
171
|
+
# Must obey the ICD-10 format if an ICD-10 code_type is provided, specifically:
|
172
|
+
# - Letter
|
173
|
+
# - Digit
|
174
|
+
# - Digit or the letter `A` or `B`
|
175
|
+
# - (Optional) Period `.`
|
176
|
+
# - Up to 4 (or as few as 0) letters and digits
|
177
|
+
# @param request_options [CandidApiClient::RequestOptions]
|
178
|
+
# @return [CandidApiClient::Diagnoses::Types::Diagnosis]
|
179
|
+
# @example
|
180
|
+
# api = CandidApiClient::Client.new(base_url: "https://api.example.com", environment: CandidApiClient::Environment::PRODUCTION)
|
181
|
+
# api.diagnoses.update(
|
182
|
+
# diagnosis_id: "d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32",
|
183
|
+
# name: "string",
|
184
|
+
# code_type: ABF,
|
185
|
+
# code: "string"
|
186
|
+
# )
|
187
|
+
def update(diagnosis_id:, name: nil, code_type: nil, code: nil, request_options: nil)
|
188
|
+
Async do
|
189
|
+
response = @request_client.conn.patch do |req|
|
190
|
+
req.options.timeout = request_options.timeout_in_seconds unless request_options&.timeout_in_seconds.nil?
|
191
|
+
req.headers["Authorization"] = request_options.token unless request_options&.token.nil?
|
192
|
+
req.headers = {
|
193
|
+
**(req.headers || {}),
|
194
|
+
**@request_client.get_headers,
|
195
|
+
**(request_options&.additional_headers || {})
|
196
|
+
}.compact
|
197
|
+
req.body = {
|
198
|
+
**(request_options&.additional_body_parameters || {}),
|
199
|
+
name: name,
|
200
|
+
code_type: code_type,
|
201
|
+
code: code
|
202
|
+
}.compact
|
203
|
+
req.url "#{@request_client.get_url(environment: CandidApi,
|
204
|
+
request_options: request_options)}/api/diagnoses/v2/#{diagnosis_id}"
|
205
|
+
end
|
206
|
+
CandidApiClient::Diagnoses::Types::Diagnosis.from_json(json_object: response.body)
|
207
|
+
end
|
208
|
+
end
|
209
|
+
|
210
|
+
# Deletes the diagnosis record associated with the provided `diagnosis_id`
|
211
|
+
#
|
212
|
+
# @param diagnosis_id [String]
|
213
|
+
# @param request_options [CandidApiClient::RequestOptions]
|
214
|
+
# @return [Void]
|
215
|
+
# @example
|
216
|
+
# api = CandidApiClient::Client.new(base_url: "https://api.example.com", environment: CandidApiClient::Environment::PRODUCTION)
|
217
|
+
# api.diagnoses.delete(diagnosis_id: "d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32")
|
218
|
+
def delete(diagnosis_id:, request_options: nil)
|
219
|
+
Async do
|
220
|
+
@request_client.conn.delete do |req|
|
221
|
+
req.options.timeout = request_options.timeout_in_seconds unless request_options&.timeout_in_seconds.nil?
|
222
|
+
req.headers["Authorization"] = request_options.token unless request_options&.token.nil?
|
223
|
+
req.headers = {
|
224
|
+
**(req.headers || {}),
|
225
|
+
**@request_client.get_headers,
|
226
|
+
**(request_options&.additional_headers || {})
|
227
|
+
}.compact
|
228
|
+
req.url "#{@request_client.get_url(environment: CandidApi,
|
229
|
+
request_options: request_options)}/api/diagnoses/v2/#{diagnosis_id}"
|
230
|
+
end
|
231
|
+
end
|
232
|
+
end
|
233
|
+
end
|
234
|
+
end
|
@@ -0,0 +1,70 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require "ostruct"
|
4
|
+
require "json"
|
5
|
+
|
6
|
+
module CandidApiClient
|
7
|
+
module Diagnoses
|
8
|
+
module Types
|
9
|
+
class DiagnosisNotFoundError
|
10
|
+
# @return [String]
|
11
|
+
attr_reader :diagnosis_id
|
12
|
+
# @return [String]
|
13
|
+
attr_reader :message
|
14
|
+
# @return [OpenStruct] Additional properties unmapped to the current class definition
|
15
|
+
attr_reader :additional_properties
|
16
|
+
# @return [Object]
|
17
|
+
attr_reader :_field_set
|
18
|
+
protected :_field_set
|
19
|
+
|
20
|
+
OMIT = Object.new
|
21
|
+
|
22
|
+
# @param diagnosis_id [String]
|
23
|
+
# @param message [String]
|
24
|
+
# @param additional_properties [OpenStruct] Additional properties unmapped to the current class definition
|
25
|
+
# @return [CandidApiClient::Diagnoses::Types::DiagnosisNotFoundError]
|
26
|
+
def initialize(message:, diagnosis_id: OMIT, additional_properties: nil)
|
27
|
+
@diagnosis_id = diagnosis_id if diagnosis_id != OMIT
|
28
|
+
@message = message
|
29
|
+
@additional_properties = additional_properties
|
30
|
+
@_field_set = { "diagnosis_id": diagnosis_id, "message": message }.reject do |_k, v|
|
31
|
+
v == OMIT
|
32
|
+
end
|
33
|
+
end
|
34
|
+
|
35
|
+
# Deserialize a JSON object to an instance of DiagnosisNotFoundError
|
36
|
+
#
|
37
|
+
# @param json_object [String]
|
38
|
+
# @return [CandidApiClient::Diagnoses::Types::DiagnosisNotFoundError]
|
39
|
+
def self.from_json(json_object:)
|
40
|
+
struct = JSON.parse(json_object, object_class: OpenStruct)
|
41
|
+
diagnosis_id = struct["diagnosis_id"]
|
42
|
+
message = struct["message"]
|
43
|
+
new(
|
44
|
+
diagnosis_id: diagnosis_id,
|
45
|
+
message: message,
|
46
|
+
additional_properties: struct
|
47
|
+
)
|
48
|
+
end
|
49
|
+
|
50
|
+
# Serialize an instance of DiagnosisNotFoundError to a JSON object
|
51
|
+
#
|
52
|
+
# @return [String]
|
53
|
+
def to_json(*_args)
|
54
|
+
@_field_set&.to_json
|
55
|
+
end
|
56
|
+
|
57
|
+
# Leveraged for Union-type generation, validate_raw attempts to parse the given
|
58
|
+
# hash and check each fields type against the current object's property
|
59
|
+
# definitions.
|
60
|
+
#
|
61
|
+
# @param obj [Object]
|
62
|
+
# @return [Void]
|
63
|
+
def self.validate_raw(obj:)
|
64
|
+
obj.diagnosis_id&.is_a?(String) != false || raise("Passed value for field obj.diagnosis_id is not the expected type, validation failed.")
|
65
|
+
obj.message.is_a?(String) != false || raise("Passed value for field obj.message is not the expected type, validation failed.")
|
66
|
+
end
|
67
|
+
end
|
68
|
+
end
|
69
|
+
end
|
70
|
+
end
|
@@ -481,6 +481,7 @@ module CandidApiClient
|
|
481
481
|
# * :link_sequence_number (String)
|
482
482
|
# * :pharmacy_prescription_number (String)
|
483
483
|
# * :conversion_formula (String)
|
484
|
+
# * :drug_description (String)
|
484
485
|
# * :place_of_service_code (CandidApiClient::Commons::Types::FacilityTypeCode)
|
485
486
|
# * :description (String)
|
486
487
|
# * :date_of_service (Date)
|
@@ -498,7 +499,7 @@ module CandidApiClient
|
|
498
499
|
# * :first_name (String)
|
499
500
|
# * :last_name (String)
|
500
501
|
# * :organization_name (String)
|
501
|
-
# * :
|
502
|
+
# * :test_results (Array<CandidApiClient::ServiceLines::V2::Types::TestResult>)
|
502
503
|
# @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
|
503
504
|
# * :phone_numbers (Array<CandidApiClient::Commons::Types::PhoneNumber>)
|
504
505
|
# * :phone_consent (Boolean)
|
@@ -549,7 +550,7 @@ module CandidApiClient
|
|
549
550
|
# billing_notes: [{ text: "string" }],
|
550
551
|
# place_of_service_code: PHARMACY,
|
551
552
|
# patient_histories: [{ category: PRESENT_ILLNESS, questions: [{ id: "6E7FBCE4-A8EA-46D0-A8D8-FF83CA3BB176", text: "Do you have any allergies?", responses: [{ response: "No allergies", follow_ups: [{ id: "4F3D57F9-AC94-49D6-87E4-E804B709917A", text: "Do you have any allergies?", response: "No allergies" }] }] }] }],
|
552
|
-
# service_lines: [{ modifiers: [TWENTY_TWO], procedure_code: "string", quantity: "string", units: MJ, charge_amount_cents: 1, diagnosis_pointers: [1], drug_identification: { service_id_qualifier: EAN_UCC_13, national_drug_code: "string", national_drug_unit_count: "string", measurement_unit_code: MILLILITERS, link_sequence_number: "string", pharmacy_prescription_number: "string", conversion_formula: "string" }, place_of_service_code: PHARMACY, description: "string", date_of_service: DateTime.parse(2023-01-15), end_date_of_service: DateTime.parse(2023-01-15), ordering_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" } }],
|
553
|
+
# service_lines: [{ modifiers: [TWENTY_TWO], procedure_code: "string", quantity: "string", units: MJ, charge_amount_cents: 1, diagnosis_pointers: [1], drug_identification: { service_id_qualifier: EAN_UCC_13, national_drug_code: "string", national_drug_unit_count: "string", measurement_unit_code: MILLILITERS, link_sequence_number: "string", pharmacy_prescription_number: "string", conversion_formula: "string", drug_description: "string" }, place_of_service_code: PHARMACY, description: "string", date_of_service: DateTime.parse(2023-01-15), end_date_of_service: DateTime.parse(2023-01-15), ordering_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" }, test_results: [{ value: 1.1, result_type: HEMATOCRIT }] }],
|
553
554
|
# guarantor: { phone_numbers: [{ number: "1234567890", type: HOME }], phone_consent: true, email: "johndoe@joincandidhealth.com", email_consent: true, first_name: "string", last_name: "string", external_id: "string", date_of_birth: DateTime.parse(2023-01-15), address: { address_1: "123 Main St", address_2: "Apt 1", city: "New York", state: NY, zip_code: "10001", zip_plus_four_code: "1234" } },
|
554
555
|
# external_claim_submission: { claim_created_at: DateTime.parse(2023-01-01T12:00:00.000Z), patient_control_number: "PATIENT_CONTROL_NUMBER", submission_records: [{ submitted_at: DateTime.parse(2023-01-01T13:00:00.000Z), claim_frequency_code: ORIGINAL, payer_responsibility: PRIMARY, intended_submission_medium: ELECTRONIC }, { submitted_at: DateTime.parse(2023-01-04T12:00:00.000Z), claim_frequency_code: REPLACEMENT, payer_responsibility: PRIMARY, intended_submission_medium: PAPER }] },
|
555
556
|
# tag_ids: ["string"],
|
@@ -870,6 +871,7 @@ module CandidApiClient
|
|
870
871
|
# * :link_sequence_number (String)
|
871
872
|
# * :pharmacy_prescription_number (String)
|
872
873
|
# * :conversion_formula (String)
|
874
|
+
# * :drug_description (String)
|
873
875
|
# * :place_of_service_code (CandidApiClient::Commons::Types::FacilityTypeCode)
|
874
876
|
# * :description (String)
|
875
877
|
# * :date_of_service (Date)
|
@@ -887,7 +889,7 @@ module CandidApiClient
|
|
887
889
|
# * :first_name (String)
|
888
890
|
# * :last_name (String)
|
889
891
|
# * :organization_name (String)
|
890
|
-
# * :
|
892
|
+
# * :test_results (Array<CandidApiClient::ServiceLines::V2::Types::TestResult>)
|
891
893
|
# @param external_claim_submission [Hash] ***This field is in beta.***
|
892
894
|
# To be included for claims that have been submitted outside of Candid.
|
893
895
|
# Candid supports posting remits and payments to these claims and working them
|
@@ -918,7 +920,7 @@ module CandidApiClient
|
|
918
920
|
# billing_notes: [{ text: "string" }],
|
919
921
|
# place_of_service_code: PHARMACY,
|
920
922
|
# patient_histories: [{ category: PRESENT_ILLNESS, questions: [{ id: "6E7FBCE4-A8EA-46D0-A8D8-FF83CA3BB176", text: "Do you have any allergies?", responses: [{ response: "No allergies", follow_ups: [{ id: "4F3D57F9-AC94-49D6-87E4-E804B709917A", text: "Do you have any allergies?", response: "No allergies" }] }] }] }],
|
921
|
-
# service_lines: [{ modifiers: [TWENTY_TWO], procedure_code: "string", quantity: "string", units: MJ, charge_amount_cents: 1, diagnosis_pointers: [1], drug_identification: { service_id_qualifier: EAN_UCC_13, national_drug_code: "string", national_drug_unit_count: "string", measurement_unit_code: MILLILITERS, link_sequence_number: "string", pharmacy_prescription_number: "string", conversion_formula: "string" }, place_of_service_code: PHARMACY, description: "string", date_of_service: DateTime.parse(2023-01-15), end_date_of_service: DateTime.parse(2023-01-15), ordering_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" } }],
|
923
|
+
# service_lines: [{ modifiers: [TWENTY_TWO], procedure_code: "string", quantity: "string", units: MJ, charge_amount_cents: 1, diagnosis_pointers: [1], drug_identification: { service_id_qualifier: EAN_UCC_13, national_drug_code: "string", national_drug_unit_count: "string", measurement_unit_code: MILLILITERS, link_sequence_number: "string", pharmacy_prescription_number: "string", conversion_formula: "string", drug_description: "string" }, place_of_service_code: PHARMACY, description: "string", date_of_service: DateTime.parse(2023-01-15), end_date_of_service: DateTime.parse(2023-01-15), ordering_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" }, test_results: [{ value: 1.1, result_type: HEMATOCRIT }] }],
|
922
924
|
# external_claim_submission: { claim_created_at: DateTime.parse(2023-01-01T12:00:00.000Z), patient_control_number: "PATIENT_CONTROL_NUMBER", submission_records: [{ submitted_at: DateTime.parse(2023-01-01T13:00:00.000Z), claim_frequency_code: ORIGINAL, payer_responsibility: PRIMARY, intended_submission_medium: ELECTRONIC }, { submitted_at: DateTime.parse(2023-01-04T12:00:00.000Z), claim_frequency_code: REPLACEMENT, payer_responsibility: PRIMARY, intended_submission_medium: PAPER }] },
|
923
925
|
# tag_ids: ["string"],
|
924
926
|
# schema_instances: [{ schema_id: "ec096b13-f80a-471d-aaeb-54b021c9d582", content: { "provider_category": "internist", "is_urgent_care": true, "bmi": 24.2, "age": 38 } }]
|
@@ -1830,6 +1832,7 @@ module CandidApiClient
|
|
1830
1832
|
# * :link_sequence_number (String)
|
1831
1833
|
# * :pharmacy_prescription_number (String)
|
1832
1834
|
# * :conversion_formula (String)
|
1835
|
+
# * :drug_description (String)
|
1833
1836
|
# * :place_of_service_code (CandidApiClient::Commons::Types::FacilityTypeCode)
|
1834
1837
|
# * :description (String)
|
1835
1838
|
# * :date_of_service (Date)
|
@@ -1847,7 +1850,7 @@ module CandidApiClient
|
|
1847
1850
|
# * :first_name (String)
|
1848
1851
|
# * :last_name (String)
|
1849
1852
|
# * :organization_name (String)
|
1850
|
-
# * :
|
1853
|
+
# * :test_results (Array<CandidApiClient::ServiceLines::V2::Types::TestResult>)
|
1851
1854
|
# @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
|
1852
1855
|
# * :phone_numbers (Array<CandidApiClient::Commons::Types::PhoneNumber>)
|
1853
1856
|
# * :phone_consent (Boolean)
|
@@ -1898,7 +1901,7 @@ module CandidApiClient
|
|
1898
1901
|
# billing_notes: [{ text: "string" }],
|
1899
1902
|
# place_of_service_code: PHARMACY,
|
1900
1903
|
# patient_histories: [{ category: PRESENT_ILLNESS, questions: [{ id: "6E7FBCE4-A8EA-46D0-A8D8-FF83CA3BB176", text: "Do you have any allergies?", responses: [{ response: "No allergies", follow_ups: [{ id: "4F3D57F9-AC94-49D6-87E4-E804B709917A", text: "Do you have any allergies?", response: "No allergies" }] }] }] }],
|
1901
|
-
# service_lines: [{ modifiers: [TWENTY_TWO], procedure_code: "string", quantity: "string", units: MJ, charge_amount_cents: 1, diagnosis_pointers: [1], drug_identification: { service_id_qualifier: EAN_UCC_13, national_drug_code: "string", national_drug_unit_count: "string", measurement_unit_code: MILLILITERS, link_sequence_number: "string", pharmacy_prescription_number: "string", conversion_formula: "string" }, place_of_service_code: PHARMACY, description: "string", date_of_service: DateTime.parse(2023-01-15), end_date_of_service: DateTime.parse(2023-01-15), ordering_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" } }],
|
1904
|
+
# service_lines: [{ modifiers: [TWENTY_TWO], procedure_code: "string", quantity: "string", units: MJ, charge_amount_cents: 1, diagnosis_pointers: [1], drug_identification: { service_id_qualifier: EAN_UCC_13, national_drug_code: "string", national_drug_unit_count: "string", measurement_unit_code: MILLILITERS, link_sequence_number: "string", pharmacy_prescription_number: "string", conversion_formula: "string", drug_description: "string" }, place_of_service_code: PHARMACY, description: "string", date_of_service: DateTime.parse(2023-01-15), end_date_of_service: DateTime.parse(2023-01-15), ordering_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" }, test_results: [{ value: 1.1, result_type: HEMATOCRIT }] }],
|
1902
1905
|
# guarantor: { phone_numbers: [{ number: "1234567890", type: HOME }], phone_consent: true, email: "johndoe@joincandidhealth.com", email_consent: true, first_name: "string", last_name: "string", external_id: "string", date_of_birth: DateTime.parse(2023-01-15), address: { address_1: "123 Main St", address_2: "Apt 1", city: "New York", state: NY, zip_code: "10001", zip_plus_four_code: "1234" } },
|
1903
1906
|
# external_claim_submission: { claim_created_at: DateTime.parse(2023-01-01T12:00:00.000Z), patient_control_number: "PATIENT_CONTROL_NUMBER", submission_records: [{ submitted_at: DateTime.parse(2023-01-01T13:00:00.000Z), claim_frequency_code: ORIGINAL, payer_responsibility: PRIMARY, intended_submission_medium: ELECTRONIC }, { submitted_at: DateTime.parse(2023-01-04T12:00:00.000Z), claim_frequency_code: REPLACEMENT, payer_responsibility: PRIMARY, intended_submission_medium: PAPER }] },
|
1904
1907
|
# tag_ids: ["string"],
|
@@ -2221,6 +2224,7 @@ module CandidApiClient
|
|
2221
2224
|
# * :link_sequence_number (String)
|
2222
2225
|
# * :pharmacy_prescription_number (String)
|
2223
2226
|
# * :conversion_formula (String)
|
2227
|
+
# * :drug_description (String)
|
2224
2228
|
# * :place_of_service_code (CandidApiClient::Commons::Types::FacilityTypeCode)
|
2225
2229
|
# * :description (String)
|
2226
2230
|
# * :date_of_service (Date)
|
@@ -2238,7 +2242,7 @@ module CandidApiClient
|
|
2238
2242
|
# * :first_name (String)
|
2239
2243
|
# * :last_name (String)
|
2240
2244
|
# * :organization_name (String)
|
2241
|
-
# * :
|
2245
|
+
# * :test_results (Array<CandidApiClient::ServiceLines::V2::Types::TestResult>)
|
2242
2246
|
# @param external_claim_submission [Hash] ***This field is in beta.***
|
2243
2247
|
# To be included for claims that have been submitted outside of Candid.
|
2244
2248
|
# Candid supports posting remits and payments to these claims and working them
|
@@ -2269,7 +2273,7 @@ module CandidApiClient
|
|
2269
2273
|
# billing_notes: [{ text: "string" }],
|
2270
2274
|
# place_of_service_code: PHARMACY,
|
2271
2275
|
# patient_histories: [{ category: PRESENT_ILLNESS, questions: [{ id: "6E7FBCE4-A8EA-46D0-A8D8-FF83CA3BB176", text: "Do you have any allergies?", responses: [{ response: "No allergies", follow_ups: [{ id: "4F3D57F9-AC94-49D6-87E4-E804B709917A", text: "Do you have any allergies?", response: "No allergies" }] }] }] }],
|
2272
|
-
# service_lines: [{ modifiers: [TWENTY_TWO], procedure_code: "string", quantity: "string", units: MJ, charge_amount_cents: 1, diagnosis_pointers: [1], drug_identification: { service_id_qualifier: EAN_UCC_13, national_drug_code: "string", national_drug_unit_count: "string", measurement_unit_code: MILLILITERS, link_sequence_number: "string", pharmacy_prescription_number: "string", conversion_formula: "string" }, place_of_service_code: PHARMACY, description: "string", date_of_service: DateTime.parse(2023-01-15), end_date_of_service: DateTime.parse(2023-01-15), ordering_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" } }],
|
2276
|
+
# service_lines: [{ modifiers: [TWENTY_TWO], procedure_code: "string", quantity: "string", units: MJ, charge_amount_cents: 1, diagnosis_pointers: [1], drug_identification: { service_id_qualifier: EAN_UCC_13, national_drug_code: "string", national_drug_unit_count: "string", measurement_unit_code: MILLILITERS, link_sequence_number: "string", pharmacy_prescription_number: "string", conversion_formula: "string", drug_description: "string" }, place_of_service_code: PHARMACY, description: "string", date_of_service: DateTime.parse(2023-01-15), end_date_of_service: DateTime.parse(2023-01-15), ordering_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" }, test_results: [{ value: 1.1, result_type: HEMATOCRIT }] }],
|
2273
2277
|
# external_claim_submission: { claim_created_at: DateTime.parse(2023-01-01T12:00:00.000Z), patient_control_number: "PATIENT_CONTROL_NUMBER", submission_records: [{ submitted_at: DateTime.parse(2023-01-01T13:00:00.000Z), claim_frequency_code: ORIGINAL, payer_responsibility: PRIMARY, intended_submission_medium: ELECTRONIC }, { submitted_at: DateTime.parse(2023-01-04T12:00:00.000Z), claim_frequency_code: REPLACEMENT, payer_responsibility: PRIMARY, intended_submission_medium: PAPER }] },
|
2274
2278
|
# tag_ids: ["string"],
|
2275
2279
|
# schema_instances: [{ schema_id: "ec096b13-f80a-471d-aaeb-54b021c9d582", content: { "provider_category": "internist", "is_urgent_care": true, "bmi": 24.2, "age": 38 } }]
|
@@ -33,13 +33,14 @@ module CandidApiClient
|
|
33
33
|
# * :link_sequence_number (String)
|
34
34
|
# * :pharmacy_prescription_number (String)
|
35
35
|
# * :conversion_formula (String)
|
36
|
+
# * :drug_description (String)
|
36
37
|
# * :description (String)
|
37
38
|
# * :modifiers (Array<CandidApiClient::Commons::Types::ProcedureModifier>)
|
38
39
|
# @param request_options [CandidApiClient::RequestOptions]
|
39
40
|
# @return [CandidApiClient::Encounters::V4::Types::Encounter]
|
40
41
|
# @example
|
41
42
|
# api = CandidApiClient::Client.new(base_url: "https://api.example.com", environment: CandidApiClient::Environment::PRODUCTION)
|
42
|
-
# api.medication_dispense.v_1.create(request: { medication_dispense_external_id: "string", patient_external_id: "string", procedure_code: "string", quantity: "string", units: MJ, date_of_service: DateTime.parse(2023-01-15), drug_identification: { service_id_qualifier: EAN_UCC_13, national_drug_code: "string", national_drug_unit_count: "string", measurement_unit_code: MILLILITERS, link_sequence_number: "string", pharmacy_prescription_number: "string", conversion_formula: "string" }, description: "string", modifiers: [TWENTY_TWO] })
|
43
|
+
# api.medication_dispense.v_1.create(request: { medication_dispense_external_id: "string", patient_external_id: "string", procedure_code: "string", quantity: "string", units: MJ, date_of_service: DateTime.parse(2023-01-15), drug_identification: { service_id_qualifier: EAN_UCC_13, national_drug_code: "string", national_drug_unit_count: "string", measurement_unit_code: MILLILITERS, link_sequence_number: "string", pharmacy_prescription_number: "string", conversion_formula: "string", drug_description: "string" }, description: "string", modifiers: [TWENTY_TWO] })
|
43
44
|
def create(request:, request_options: nil)
|
44
45
|
response = @request_client.conn.post do |req|
|
45
46
|
req.options.timeout = request_options.timeout_in_seconds unless request_options&.timeout_in_seconds.nil?
|
@@ -82,13 +83,14 @@ module CandidApiClient
|
|
82
83
|
# * :link_sequence_number (String)
|
83
84
|
# * :pharmacy_prescription_number (String)
|
84
85
|
# * :conversion_formula (String)
|
86
|
+
# * :drug_description (String)
|
85
87
|
# * :description (String)
|
86
88
|
# * :modifiers (Array<CandidApiClient::Commons::Types::ProcedureModifier>)
|
87
89
|
# @param request_options [CandidApiClient::RequestOptions]
|
88
90
|
# @return [CandidApiClient::Encounters::V4::Types::Encounter]
|
89
91
|
# @example
|
90
92
|
# api = CandidApiClient::Client.new(base_url: "https://api.example.com", environment: CandidApiClient::Environment::PRODUCTION)
|
91
|
-
# api.medication_dispense.v_1.create(request: { medication_dispense_external_id: "string", patient_external_id: "string", procedure_code: "string", quantity: "string", units: MJ, date_of_service: DateTime.parse(2023-01-15), drug_identification: { service_id_qualifier: EAN_UCC_13, national_drug_code: "string", national_drug_unit_count: "string", measurement_unit_code: MILLILITERS, link_sequence_number: "string", pharmacy_prescription_number: "string", conversion_formula: "string" }, description: "string", modifiers: [TWENTY_TWO] })
|
93
|
+
# api.medication_dispense.v_1.create(request: { medication_dispense_external_id: "string", patient_external_id: "string", procedure_code: "string", quantity: "string", units: MJ, date_of_service: DateTime.parse(2023-01-15), drug_identification: { service_id_qualifier: EAN_UCC_13, national_drug_code: "string", national_drug_unit_count: "string", measurement_unit_code: MILLILITERS, link_sequence_number: "string", pharmacy_prescription_number: "string", conversion_formula: "string", drug_description: "string" }, description: "string", modifiers: [TWENTY_TWO] })
|
92
94
|
def create(request:, request_options: nil)
|
93
95
|
Async do
|
94
96
|
response = @request_client.conn.post do |req|
|
@@ -74,6 +74,7 @@ module CandidApiClient
|
|
74
74
|
# * :link_sequence_number (String)
|
75
75
|
# * :pharmacy_prescription_number (String)
|
76
76
|
# * :conversion_formula (String)
|
77
|
+
# * :drug_description (String)
|
77
78
|
# * :denial_reason (Hash)
|
78
79
|
# * :reason (CandidApiClient::ServiceLines::V2::Types::DenialReasonContent)
|
79
80
|
# * :place_of_service_code (CandidApiClient::Commons::Types::FacilityTypeCode)
|
@@ -83,12 +84,12 @@ module CandidApiClient
|
|
83
84
|
# * :description (String)
|
84
85
|
# * :date_of_service (Date)
|
85
86
|
# * :end_date_of_service (Date)
|
86
|
-
# * :
|
87
|
+
# * :test_results (Array<CandidApiClient::ServiceLines::V2::Types::TestResult>)
|
87
88
|
# @param request_options [CandidApiClient::RequestOptions]
|
88
89
|
# @return [CandidApiClient::ServiceLines::V2::Types::ServiceLine]
|
89
90
|
# @example
|
90
91
|
# api = CandidApiClient::Client.new(base_url: "https://api.example.com", environment: CandidApiClient::Environment::PRODUCTION)
|
91
|
-
# api.service_lines.v_2.update(service_line_id: "d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32", request: { edit_reason: "string", modifiers: [TWENTY_TWO], charge_amount_cents: 1, diagnosis_id_zero: "d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32", diagnosis_id_one: "d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32", diagnosis_id_two: "d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32", diagnosis_id_three: "d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32", drug_identification: { service_id_qualifier: EAN_UCC_13, national_drug_code: "string", national_drug_unit_count: "string", measurement_unit_code: MILLILITERS, link_sequence_number: "string", pharmacy_prescription_number: "string", conversion_formula: "string" }, denial_reason: { reason: AUTHORIZATION_REQUIRED }, place_of_service_code: PHARMACY, units: MJ, procedure_code: "string", quantity: "string", description: "string", date_of_service: DateTime.parse(2023-01-15), end_date_of_service: DateTime.parse(2023-01-15) })
|
92
|
+
# api.service_lines.v_2.update(service_line_id: "d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32", request: { edit_reason: "string", modifiers: [TWENTY_TWO], charge_amount_cents: 1, diagnosis_id_zero: "d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32", diagnosis_id_one: "d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32", diagnosis_id_two: "d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32", diagnosis_id_three: "d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32", drug_identification: { service_id_qualifier: EAN_UCC_13, national_drug_code: "string", national_drug_unit_count: "string", measurement_unit_code: MILLILITERS, link_sequence_number: "string", pharmacy_prescription_number: "string", conversion_formula: "string", drug_description: "string" }, denial_reason: { reason: AUTHORIZATION_REQUIRED }, place_of_service_code: PHARMACY, units: MJ, procedure_code: "string", quantity: "string", description: "string", date_of_service: DateTime.parse(2023-01-15), end_date_of_service: DateTime.parse(2023-01-15), test_results: [{ value: 1.1, result_type: HEMATOCRIT }] })
|
92
93
|
def update(service_line_id:, request:, request_options: nil)
|
93
94
|
response = @request_client.conn.patch do |req|
|
94
95
|
req.options.timeout = request_options.timeout_in_seconds unless request_options&.timeout_in_seconds.nil?
|
@@ -193,6 +194,7 @@ module CandidApiClient
|
|
193
194
|
# * :link_sequence_number (String)
|
194
195
|
# * :pharmacy_prescription_number (String)
|
195
196
|
# * :conversion_formula (String)
|
197
|
+
# * :drug_description (String)
|
196
198
|
# * :denial_reason (Hash)
|
197
199
|
# * :reason (CandidApiClient::ServiceLines::V2::Types::DenialReasonContent)
|
198
200
|
# * :place_of_service_code (CandidApiClient::Commons::Types::FacilityTypeCode)
|
@@ -202,12 +204,12 @@ module CandidApiClient
|
|
202
204
|
# * :description (String)
|
203
205
|
# * :date_of_service (Date)
|
204
206
|
# * :end_date_of_service (Date)
|
205
|
-
# * :
|
207
|
+
# * :test_results (Array<CandidApiClient::ServiceLines::V2::Types::TestResult>)
|
206
208
|
# @param request_options [CandidApiClient::RequestOptions]
|
207
209
|
# @return [CandidApiClient::ServiceLines::V2::Types::ServiceLine]
|
208
210
|
# @example
|
209
211
|
# api = CandidApiClient::Client.new(base_url: "https://api.example.com", environment: CandidApiClient::Environment::PRODUCTION)
|
210
|
-
# api.service_lines.v_2.update(service_line_id: "d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32", request: { edit_reason: "string", modifiers: [TWENTY_TWO], charge_amount_cents: 1, diagnosis_id_zero: "d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32", diagnosis_id_one: "d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32", diagnosis_id_two: "d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32", diagnosis_id_three: "d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32", drug_identification: { service_id_qualifier: EAN_UCC_13, national_drug_code: "string", national_drug_unit_count: "string", measurement_unit_code: MILLILITERS, link_sequence_number: "string", pharmacy_prescription_number: "string", conversion_formula: "string" }, denial_reason: { reason: AUTHORIZATION_REQUIRED }, place_of_service_code: PHARMACY, units: MJ, procedure_code: "string", quantity: "string", description: "string", date_of_service: DateTime.parse(2023-01-15), end_date_of_service: DateTime.parse(2023-01-15) })
|
212
|
+
# api.service_lines.v_2.update(service_line_id: "d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32", request: { edit_reason: "string", modifiers: [TWENTY_TWO], charge_amount_cents: 1, diagnosis_id_zero: "d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32", diagnosis_id_one: "d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32", diagnosis_id_two: "d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32", diagnosis_id_three: "d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32", drug_identification: { service_id_qualifier: EAN_UCC_13, national_drug_code: "string", national_drug_unit_count: "string", measurement_unit_code: MILLILITERS, link_sequence_number: "string", pharmacy_prescription_number: "string", conversion_formula: "string", drug_description: "string" }, denial_reason: { reason: AUTHORIZATION_REQUIRED }, place_of_service_code: PHARMACY, units: MJ, procedure_code: "string", quantity: "string", description: "string", date_of_service: DateTime.parse(2023-01-15), end_date_of_service: DateTime.parse(2023-01-15), test_results: [{ value: 1.1, result_type: HEMATOCRIT }] })
|
211
213
|
def update(service_line_id:, request:, request_options: nil)
|
212
214
|
Async do
|
213
215
|
response = @request_client.conn.patch do |req|
|
@@ -24,6 +24,8 @@ module CandidApiClient
|
|
24
24
|
attr_reader :pharmacy_prescription_number
|
25
25
|
# @return [String]
|
26
26
|
attr_reader :conversion_formula
|
27
|
+
# @return [String]
|
28
|
+
attr_reader :drug_description
|
27
29
|
# @return [OpenStruct] Additional properties unmapped to the current class definition
|
28
30
|
attr_reader :additional_properties
|
29
31
|
# @return [Object]
|
@@ -39,10 +41,11 @@ module CandidApiClient
|
|
39
41
|
# @param link_sequence_number [String]
|
40
42
|
# @param pharmacy_prescription_number [String]
|
41
43
|
# @param conversion_formula [String]
|
44
|
+
# @param drug_description [String]
|
42
45
|
# @param additional_properties [OpenStruct] Additional properties unmapped to the current class definition
|
43
46
|
# @return [CandidApiClient::ServiceLines::V2::Types::DrugIdentification]
|
44
47
|
def initialize(service_id_qualifier:, national_drug_code:, national_drug_unit_count:, measurement_unit_code:,
|
45
|
-
link_sequence_number: OMIT, pharmacy_prescription_number: OMIT, conversion_formula: OMIT, additional_properties: nil)
|
48
|
+
link_sequence_number: OMIT, pharmacy_prescription_number: OMIT, conversion_formula: OMIT, drug_description: OMIT, additional_properties: nil)
|
46
49
|
@service_id_qualifier = service_id_qualifier
|
47
50
|
@national_drug_code = national_drug_code
|
48
51
|
@national_drug_unit_count = national_drug_unit_count
|
@@ -50,6 +53,7 @@ module CandidApiClient
|
|
50
53
|
@link_sequence_number = link_sequence_number if link_sequence_number != OMIT
|
51
54
|
@pharmacy_prescription_number = pharmacy_prescription_number if pharmacy_prescription_number != OMIT
|
52
55
|
@conversion_formula = conversion_formula if conversion_formula != OMIT
|
56
|
+
@drug_description = drug_description if drug_description != OMIT
|
53
57
|
@additional_properties = additional_properties
|
54
58
|
@_field_set = {
|
55
59
|
"service_id_qualifier": service_id_qualifier,
|
@@ -58,7 +62,8 @@ module CandidApiClient
|
|
58
62
|
"measurement_unit_code": measurement_unit_code,
|
59
63
|
"link_sequence_number": link_sequence_number,
|
60
64
|
"pharmacy_prescription_number": pharmacy_prescription_number,
|
61
|
-
"conversion_formula": conversion_formula
|
65
|
+
"conversion_formula": conversion_formula,
|
66
|
+
"drug_description": drug_description
|
62
67
|
}.reject do |_k, v|
|
63
68
|
v == OMIT
|
64
69
|
end
|
@@ -77,6 +82,7 @@ module CandidApiClient
|
|
77
82
|
link_sequence_number = struct["link_sequence_number"]
|
78
83
|
pharmacy_prescription_number = struct["pharmacy_prescription_number"]
|
79
84
|
conversion_formula = struct["conversion_formula"]
|
85
|
+
drug_description = struct["drug_description"]
|
80
86
|
new(
|
81
87
|
service_id_qualifier: service_id_qualifier,
|
82
88
|
national_drug_code: national_drug_code,
|
@@ -85,6 +91,7 @@ module CandidApiClient
|
|
85
91
|
link_sequence_number: link_sequence_number,
|
86
92
|
pharmacy_prescription_number: pharmacy_prescription_number,
|
87
93
|
conversion_formula: conversion_formula,
|
94
|
+
drug_description: drug_description,
|
88
95
|
additional_properties: struct
|
89
96
|
)
|
90
97
|
end
|
@@ -110,6 +117,7 @@ module CandidApiClient
|
|
110
117
|
obj.link_sequence_number&.is_a?(String) != false || raise("Passed value for field obj.link_sequence_number is not the expected type, validation failed.")
|
111
118
|
obj.pharmacy_prescription_number&.is_a?(String) != false || raise("Passed value for field obj.pharmacy_prescription_number is not the expected type, validation failed.")
|
112
119
|
obj.conversion_formula&.is_a?(String) != false || raise("Passed value for field obj.conversion_formula is not the expected type, validation failed.")
|
120
|
+
obj.drug_description&.is_a?(String) != false || raise("Passed value for field obj.drug_description is not the expected type, validation failed.")
|
113
121
|
end
|
114
122
|
end
|
115
123
|
end
|
@@ -90,8 +90,9 @@ module CandidApiClient
|
|
90
90
|
attr_reader :date_of_service
|
91
91
|
# @return [Date]
|
92
92
|
attr_reader :end_date_of_service
|
93
|
-
# @return [CandidApiClient::ServiceLines::V2::Types::TestResult]
|
94
|
-
|
93
|
+
# @return [Array<CandidApiClient::ServiceLines::V2::Types::TestResult>] Maps to MEA-02 on the 837-P. No more than 5 test results may be submitted per
|
94
|
+
# service line.
|
95
|
+
attr_reader :test_results
|
95
96
|
# @return [OpenStruct] Additional properties unmapped to the current class definition
|
96
97
|
attr_reader :additional_properties
|
97
98
|
# @return [Object]
|
@@ -137,11 +138,12 @@ module CandidApiClient
|
|
137
138
|
# Maps to SV1-01, C003-07 on the 837-P.
|
138
139
|
# @param date_of_service [Date]
|
139
140
|
# @param end_date_of_service [Date]
|
140
|
-
# @param
|
141
|
+
# @param test_results [Array<CandidApiClient::ServiceLines::V2::Types::TestResult>] Maps to MEA-02 on the 837-P. No more than 5 test results may be submitted per
|
142
|
+
# service line.
|
141
143
|
# @param additional_properties [OpenStruct] Additional properties unmapped to the current class definition
|
142
144
|
# @return [CandidApiClient::ServiceLines::V2::Types::ServiceLine]
|
143
145
|
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,
|
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,
|
146
|
+
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_results: OMIT, additional_properties: nil)
|
145
147
|
@modifiers = modifiers if modifiers != OMIT
|
146
148
|
@charge_amount_cents = charge_amount_cents if charge_amount_cents != OMIT
|
147
149
|
@allowed_amount_cents = allowed_amount_cents if allowed_amount_cents != OMIT
|
@@ -178,7 +180,7 @@ module CandidApiClient
|
|
178
180
|
@description = description if description != OMIT
|
179
181
|
@date_of_service = date_of_service
|
180
182
|
@end_date_of_service = end_date_of_service if end_date_of_service != OMIT
|
181
|
-
@
|
183
|
+
@test_results = test_results if test_results != OMIT
|
182
184
|
@additional_properties = additional_properties
|
183
185
|
@_field_set = {
|
184
186
|
"modifiers": modifiers,
|
@@ -213,7 +215,7 @@ module CandidApiClient
|
|
213
215
|
"description": description,
|
214
216
|
"date_of_service": date_of_service,
|
215
217
|
"end_date_of_service": end_date_of_service,
|
216
|
-
"
|
218
|
+
"test_results": test_results
|
217
219
|
}.reject do |_k, v|
|
218
220
|
v == OMIT
|
219
221
|
end
|
@@ -294,11 +296,9 @@ module CandidApiClient
|
|
294
296
|
end_date_of_service = unless parsed_json["end_date_of_service"].nil?
|
295
297
|
Date.parse(parsed_json["end_date_of_service"])
|
296
298
|
end
|
297
|
-
|
298
|
-
|
299
|
-
|
300
|
-
test_result = parsed_json["test_result"].to_json
|
301
|
-
test_result = CandidApiClient::ServiceLines::V2::Types::TestResult.from_json(json_object: test_result)
|
299
|
+
test_results = parsed_json["test_results"]&.map do |item|
|
300
|
+
item = item.to_json
|
301
|
+
CandidApiClient::ServiceLines::V2::Types::TestResult.from_json(json_object: item)
|
302
302
|
end
|
303
303
|
new(
|
304
304
|
modifiers: modifiers,
|
@@ -333,7 +333,7 @@ module CandidApiClient
|
|
333
333
|
description: description,
|
334
334
|
date_of_service: date_of_service,
|
335
335
|
end_date_of_service: end_date_of_service,
|
336
|
-
|
336
|
+
test_results: test_results,
|
337
337
|
additional_properties: struct
|
338
338
|
)
|
339
339
|
end
|
@@ -384,7 +384,7 @@ module CandidApiClient
|
|
384
384
|
obj.description&.is_a?(String) != false || raise("Passed value for field obj.description is not the expected type, validation failed.")
|
385
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.")
|
386
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.
|
387
|
+
obj.test_results&.is_a?(Array) != false || raise("Passed value for field obj.test_results is not the expected type, validation failed.")
|
388
388
|
end
|
389
389
|
end
|
390
390
|
end
|
@@ -48,8 +48,9 @@ module CandidApiClient
|
|
48
48
|
# than the rendering provider for this service line.
|
49
49
|
# If not required by this implementation guide, do not send.
|
50
50
|
attr_reader :ordering_provider
|
51
|
-
# @return [CandidApiClient::ServiceLines::V2::Types::TestResult]
|
52
|
-
|
51
|
+
# @return [Array<CandidApiClient::ServiceLines::V2::Types::TestResult>] Maps to MEA-02 on the 837-P. No more than 5 test results may be submitted per
|
52
|
+
# service line.
|
53
|
+
attr_reader :test_results
|
53
54
|
# @return [OpenStruct] Additional properties unmapped to the current class definition
|
54
55
|
attr_reader :additional_properties
|
55
56
|
# @return [Object]
|
@@ -79,11 +80,12 @@ module CandidApiClient
|
|
79
80
|
# @param ordering_provider [CandidApiClient::EncounterProviders::V2::Types::OrderingProvider] Required when the service or supply was ordered by a provider who is different
|
80
81
|
# than the rendering provider for this service line.
|
81
82
|
# If not required by this implementation guide, do not send.
|
82
|
-
# @param
|
83
|
+
# @param test_results [Array<CandidApiClient::ServiceLines::V2::Types::TestResult>] Maps to MEA-02 on the 837-P. No more than 5 test results may be submitted per
|
84
|
+
# service line.
|
83
85
|
# @param additional_properties [OpenStruct] Additional properties unmapped to the current class definition
|
84
86
|
# @return [CandidApiClient::ServiceLines::V2::Types::ServiceLineCreate]
|
85
87
|
def initialize(procedure_code:, quantity:, units:, diagnosis_pointers:, modifiers: OMIT,
|
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,
|
88
|
+
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_results: OMIT, additional_properties: nil)
|
87
89
|
@modifiers = modifiers if modifiers != OMIT
|
88
90
|
@procedure_code = procedure_code
|
89
91
|
@quantity = quantity
|
@@ -96,7 +98,7 @@ module CandidApiClient
|
|
96
98
|
@date_of_service = date_of_service if date_of_service != OMIT
|
97
99
|
@end_date_of_service = end_date_of_service if end_date_of_service != OMIT
|
98
100
|
@ordering_provider = ordering_provider if ordering_provider != OMIT
|
99
|
-
@
|
101
|
+
@test_results = test_results if test_results != OMIT
|
100
102
|
@additional_properties = additional_properties
|
101
103
|
@_field_set = {
|
102
104
|
"modifiers": modifiers,
|
@@ -111,7 +113,7 @@ module CandidApiClient
|
|
111
113
|
"date_of_service": date_of_service,
|
112
114
|
"end_date_of_service": end_date_of_service,
|
113
115
|
"ordering_provider": ordering_provider,
|
114
|
-
"
|
116
|
+
"test_results": test_results
|
115
117
|
}.reject do |_k, v|
|
116
118
|
v == OMIT
|
117
119
|
end
|
@@ -148,11 +150,9 @@ module CandidApiClient
|
|
148
150
|
ordering_provider = parsed_json["ordering_provider"].to_json
|
149
151
|
ordering_provider = CandidApiClient::EncounterProviders::V2::Types::OrderingProvider.from_json(json_object: ordering_provider)
|
150
152
|
end
|
151
|
-
|
152
|
-
|
153
|
-
|
154
|
-
test_result = parsed_json["test_result"].to_json
|
155
|
-
test_result = CandidApiClient::ServiceLines::V2::Types::TestResult.from_json(json_object: test_result)
|
153
|
+
test_results = parsed_json["test_results"]&.map do |item|
|
154
|
+
item = item.to_json
|
155
|
+
CandidApiClient::ServiceLines::V2::Types::TestResult.from_json(json_object: item)
|
156
156
|
end
|
157
157
|
new(
|
158
158
|
modifiers: modifiers,
|
@@ -167,7 +167,7 @@ module CandidApiClient
|
|
167
167
|
date_of_service: date_of_service,
|
168
168
|
end_date_of_service: end_date_of_service,
|
169
169
|
ordering_provider: ordering_provider,
|
170
|
-
|
170
|
+
test_results: test_results,
|
171
171
|
additional_properties: struct
|
172
172
|
)
|
173
173
|
end
|
@@ -198,7 +198,7 @@ module CandidApiClient
|
|
198
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.")
|
199
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.")
|
200
200
|
obj.ordering_provider.nil? || CandidApiClient::EncounterProviders::V2::Types::OrderingProvider.validate_raw(obj: obj.ordering_provider)
|
201
|
-
obj.
|
201
|
+
obj.test_results&.is_a?(Array) != false || raise("Passed value for field obj.test_results is not the expected type, validation failed.")
|
202
202
|
end
|
203
203
|
end
|
204
204
|
end
|
@@ -51,8 +51,11 @@ module CandidApiClient
|
|
51
51
|
attr_reader :date_of_service
|
52
52
|
# @return [Date]
|
53
53
|
attr_reader :end_date_of_service
|
54
|
-
# @return [CandidApiClient::ServiceLines::V2::Types::TestResult]
|
55
|
-
|
54
|
+
# @return [Array<CandidApiClient::ServiceLines::V2::Types::TestResult>] Maps to MEA-02 on the 837-P. Updating test results utilizes PUT semantics,
|
55
|
+
# so the test results on the service line will be set to whatever inputs are
|
56
|
+
# provided. No more than 5 test
|
57
|
+
# results may be submitted per service line.
|
58
|
+
attr_reader :test_results
|
56
59
|
# @return [OpenStruct] Additional properties unmapped to the current class definition
|
57
60
|
attr_reader :additional_properties
|
58
61
|
# @return [Object]
|
@@ -81,11 +84,14 @@ module CandidApiClient
|
|
81
84
|
# @param date_of_service [Date] date_of_service must be defined on either the encounter or the service lines but
|
82
85
|
# not both.
|
83
86
|
# @param end_date_of_service [Date]
|
84
|
-
# @param
|
87
|
+
# @param test_results [Array<CandidApiClient::ServiceLines::V2::Types::TestResult>] Maps to MEA-02 on the 837-P. Updating test results utilizes PUT semantics,
|
88
|
+
# so the test results on the service line will be set to whatever inputs are
|
89
|
+
# provided. No more than 5 test
|
90
|
+
# results may be submitted per service line.
|
85
91
|
# @param additional_properties [OpenStruct] Additional properties unmapped to the current class definition
|
86
92
|
# @return [CandidApiClient::ServiceLines::V2::Types::ServiceLineUpdate]
|
87
93
|
def initialize(edit_reason: OMIT, modifiers: OMIT, charge_amount_cents: OMIT, diagnosis_id_zero: OMIT,
|
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,
|
94
|
+
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_results: OMIT, additional_properties: nil)
|
89
95
|
@edit_reason = edit_reason if edit_reason != OMIT
|
90
96
|
@modifiers = modifiers if modifiers != OMIT
|
91
97
|
@charge_amount_cents = charge_amount_cents if charge_amount_cents != OMIT
|
@@ -102,7 +108,7 @@ module CandidApiClient
|
|
102
108
|
@description = description if description != OMIT
|
103
109
|
@date_of_service = date_of_service if date_of_service != OMIT
|
104
110
|
@end_date_of_service = end_date_of_service if end_date_of_service != OMIT
|
105
|
-
@
|
111
|
+
@test_results = test_results if test_results != OMIT
|
106
112
|
@additional_properties = additional_properties
|
107
113
|
@_field_set = {
|
108
114
|
"edit_reason": edit_reason,
|
@@ -121,7 +127,7 @@ module CandidApiClient
|
|
121
127
|
"description": description,
|
122
128
|
"date_of_service": date_of_service,
|
123
129
|
"end_date_of_service": end_date_of_service,
|
124
|
-
"
|
130
|
+
"test_results": test_results
|
125
131
|
}.reject do |_k, v|
|
126
132
|
v == OMIT
|
127
133
|
end
|
@@ -162,11 +168,9 @@ module CandidApiClient
|
|
162
168
|
end_date_of_service = unless parsed_json["end_date_of_service"].nil?
|
163
169
|
Date.parse(parsed_json["end_date_of_service"])
|
164
170
|
end
|
165
|
-
|
166
|
-
|
167
|
-
|
168
|
-
test_result = parsed_json["test_result"].to_json
|
169
|
-
test_result = CandidApiClient::ServiceLines::V2::Types::TestResult.from_json(json_object: test_result)
|
171
|
+
test_results = parsed_json["test_results"]&.map do |item|
|
172
|
+
item = item.to_json
|
173
|
+
CandidApiClient::ServiceLines::V2::Types::TestResult.from_json(json_object: item)
|
170
174
|
end
|
171
175
|
new(
|
172
176
|
edit_reason: edit_reason,
|
@@ -185,7 +189,7 @@ module CandidApiClient
|
|
185
189
|
description: description,
|
186
190
|
date_of_service: date_of_service,
|
187
191
|
end_date_of_service: end_date_of_service,
|
188
|
-
|
192
|
+
test_results: test_results,
|
189
193
|
additional_properties: struct
|
190
194
|
)
|
191
195
|
end
|
@@ -220,7 +224,7 @@ module CandidApiClient
|
|
220
224
|
obj.description&.is_a?(String) != false || raise("Passed value for field obj.description is not the expected type, validation failed.")
|
221
225
|
obj.date_of_service&.is_a?(Date) != false || raise("Passed value for field obj.date_of_service is not the expected type, validation failed.")
|
222
226
|
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.
|
227
|
+
obj.test_results&.is_a?(Array) != false || raise("Passed value for field obj.test_results is not the expected type, validation failed.")
|
224
228
|
end
|
225
229
|
end
|
226
230
|
end
|
@@ -1,5 +1,7 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
|
+
require_relative "test_result_type"
|
4
|
+
require "ostruct"
|
3
5
|
require "json"
|
4
6
|
|
5
7
|
module CandidApiClient
|
@@ -7,20 +9,27 @@ module CandidApiClient
|
|
7
9
|
module V2
|
8
10
|
module Types
|
9
11
|
class TestResult
|
12
|
+
# @return [Float]
|
13
|
+
attr_reader :value
|
14
|
+
# @return [CandidApiClient::ServiceLines::V2::Types::TestResultType]
|
15
|
+
attr_reader :result_type
|
16
|
+
# @return [OpenStruct] Additional properties unmapped to the current class definition
|
17
|
+
attr_reader :additional_properties
|
10
18
|
# @return [Object]
|
11
|
-
attr_reader :
|
12
|
-
|
13
|
-
attr_reader :discriminant
|
19
|
+
attr_reader :_field_set
|
20
|
+
protected :_field_set
|
14
21
|
|
15
|
-
|
16
|
-
alias kind_of? is_a?
|
22
|
+
OMIT = Object.new
|
17
23
|
|
18
|
-
# @param
|
19
|
-
# @param
|
24
|
+
# @param value [Float]
|
25
|
+
# @param result_type [CandidApiClient::ServiceLines::V2::Types::TestResultType]
|
26
|
+
# @param additional_properties [OpenStruct] Additional properties unmapped to the current class definition
|
20
27
|
# @return [CandidApiClient::ServiceLines::V2::Types::TestResult]
|
21
|
-
def initialize(
|
22
|
-
@
|
23
|
-
@
|
28
|
+
def initialize(value:, result_type:, additional_properties: nil)
|
29
|
+
@value = value
|
30
|
+
@result_type = result_type
|
31
|
+
@additional_properties = additional_properties
|
32
|
+
@_field_set = { "value": value, "result_type": result_type }
|
24
33
|
end
|
25
34
|
|
26
35
|
# Deserialize a JSON object to an instance of TestResult
|
@@ -29,27 +38,20 @@ module CandidApiClient
|
|
29
38
|
# @return [CandidApiClient::ServiceLines::V2::Types::TestResult]
|
30
39
|
def self.from_json(json_object:)
|
31
40
|
struct = JSON.parse(json_object, object_class: OpenStruct)
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
end
|
40
|
-
new(member: member, discriminant: struct.type)
|
41
|
+
value = struct["value"]
|
42
|
+
result_type = struct["result_type"]
|
43
|
+
new(
|
44
|
+
value: value,
|
45
|
+
result_type: result_type,
|
46
|
+
additional_properties: struct
|
47
|
+
)
|
41
48
|
end
|
42
49
|
|
43
|
-
#
|
50
|
+
# Serialize an instance of TestResult to a JSON object
|
44
51
|
#
|
45
52
|
# @return [String]
|
46
53
|
def to_json(*_args)
|
47
|
-
|
48
|
-
when "hematocrit"
|
49
|
-
when "hemoglobin"
|
50
|
-
end
|
51
|
-
{ "type": @discriminant, "value": @member }.to_json
|
52
|
-
@member.to_json
|
54
|
+
@_field_set&.to_json
|
53
55
|
end
|
54
56
|
|
55
57
|
# Leveraged for Union-type generation, validate_raw attempts to parse the given
|
@@ -59,34 +61,8 @@ module CandidApiClient
|
|
59
61
|
# @param obj [Object]
|
60
62
|
# @return [Void]
|
61
63
|
def self.validate_raw(obj:)
|
62
|
-
|
63
|
-
|
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")
|
64
|
+
obj.value.is_a?(Float) != false || raise("Passed value for field obj.value is not the expected type, validation failed.")
|
65
|
+
obj.result_type.is_a?(CandidApiClient::ServiceLines::V2::Types::TestResultType) != false || raise("Passed value for field obj.result_type is not the expected type, validation failed.")
|
90
66
|
end
|
91
67
|
end
|
92
68
|
end
|
data/lib/candidhealth.rb
CHANGED
@@ -33,6 +33,7 @@ require_relative "candidhealth/service_lines/client"
|
|
33
33
|
require_relative "candidhealth/tasks/client"
|
34
34
|
require_relative "candidhealth/write_offs/client"
|
35
35
|
require_relative "candidhealth/pre_encounter/client"
|
36
|
+
require_relative "candidhealth/diagnoses/client"
|
36
37
|
require_relative "candidhealth/service_facility/client"
|
37
38
|
|
38
39
|
module CandidApiClient
|
@@ -95,6 +96,8 @@ module CandidApiClient
|
|
95
96
|
attr_reader :write_offs
|
96
97
|
# @return [CandidApiClient::PreEncounter::Client]
|
97
98
|
attr_reader :pre_encounter
|
99
|
+
# @return [CandidApiClient::DiagnosesClient]
|
100
|
+
attr_reader :diagnoses
|
98
101
|
# @return [CandidApiClient::ServiceFacilityClient]
|
99
102
|
attr_reader :service_facility
|
100
103
|
|
@@ -153,6 +156,7 @@ module CandidApiClient
|
|
153
156
|
@tasks = CandidApiClient::Tasks::Client.new(request_client: @request_client)
|
154
157
|
@write_offs = CandidApiClient::WriteOffs::Client.new(request_client: @request_client)
|
155
158
|
@pre_encounter = CandidApiClient::PreEncounter::Client.new(request_client: @request_client)
|
159
|
+
@diagnoses = CandidApiClient::DiagnosesClient.new(request_client: @request_client)
|
156
160
|
@service_facility = CandidApiClient::ServiceFacilityClient.new(request_client: @request_client)
|
157
161
|
end
|
158
162
|
end
|
@@ -216,6 +220,8 @@ module CandidApiClient
|
|
216
220
|
attr_reader :write_offs
|
217
221
|
# @return [CandidApiClient::PreEncounter::AsyncClient]
|
218
222
|
attr_reader :pre_encounter
|
223
|
+
# @return [CandidApiClient::AsyncDiagnosesClient]
|
224
|
+
attr_reader :diagnoses
|
219
225
|
# @return [CandidApiClient::AsyncServiceFacilityClient]
|
220
226
|
attr_reader :service_facility
|
221
227
|
|
@@ -274,6 +280,7 @@ module CandidApiClient
|
|
274
280
|
@tasks = CandidApiClient::Tasks::AsyncClient.new(request_client: @async_request_client)
|
275
281
|
@write_offs = CandidApiClient::WriteOffs::AsyncClient.new(request_client: @async_request_client)
|
276
282
|
@pre_encounter = CandidApiClient::PreEncounter::AsyncClient.new(request_client: @async_request_client)
|
283
|
+
@diagnoses = CandidApiClient::AsyncDiagnosesClient.new(request_client: @async_request_client)
|
277
284
|
@service_facility = CandidApiClient::AsyncServiceFacilityClient.new(request_client: @async_request_client)
|
278
285
|
end
|
279
286
|
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.6" }
|
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.6" }
|
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
@@ -232,6 +232,7 @@ require_relative "candidhealth/service_lines/v_2/types/service_line_adjustment"
|
|
232
232
|
require_relative "candidhealth/service_lines/v_2/types/service_line_denial_reason"
|
233
233
|
require_relative "candidhealth/service_lines/v_2/types/denial_reason_content"
|
234
234
|
require_relative "candidhealth/service_lines/v_2/types/drug_identification"
|
235
|
+
require_relative "candidhealth/service_lines/v_2/types/test_result_type"
|
235
236
|
require_relative "candidhealth/service_lines/v_2/types/test_result"
|
236
237
|
require_relative "candidhealth/service_lines/v_2/types/service_id_qualifier"
|
237
238
|
require_relative "candidhealth/service_lines/v_2/types/measurement_unit_code"
|
@@ -353,6 +354,7 @@ require_relative "candidhealth/diagnoses/types/diagnosis_create"
|
|
353
354
|
require_relative "candidhealth/diagnoses/types/standalone_diagnosis_create"
|
354
355
|
require_relative "candidhealth/diagnoses/types/diagnosis_type_code"
|
355
356
|
require_relative "candidhealth/diagnoses/types/diagnosis"
|
357
|
+
require_relative "candidhealth/diagnoses/types/diagnosis_not_found_error"
|
356
358
|
require_relative "candidhealth/era_commons/types/claim_status_code_create"
|
357
359
|
require_relative "candidhealth/era/types/era_base"
|
358
360
|
require_relative "candidhealth/era/types/era_not_fully_processed_error_message"
|
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.6
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- ''
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2024-10-
|
11
|
+
date: 2024-10-07 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: async-http-faraday
|
@@ -168,8 +168,10 @@ files:
|
|
168
168
|
- lib/candidhealth/custom_schemas/v_1/types/schema_validation_error.rb
|
169
169
|
- lib/candidhealth/custom_schemas/v_1/types/schema_validation_failure.rb
|
170
170
|
- lib/candidhealth/custom_schemas/v_1/types/schema_with_name_already_exists_error.rb
|
171
|
+
- lib/candidhealth/diagnoses/client.rb
|
171
172
|
- lib/candidhealth/diagnoses/types/diagnosis.rb
|
172
173
|
- lib/candidhealth/diagnoses/types/diagnosis_create.rb
|
174
|
+
- lib/candidhealth/diagnoses/types/diagnosis_not_found_error.rb
|
173
175
|
- lib/candidhealth/diagnoses/types/diagnosis_type_code.rb
|
174
176
|
- lib/candidhealth/diagnoses/types/standalone_diagnosis_create.rb
|
175
177
|
- lib/candidhealth/eligibility/client.rb
|
@@ -550,6 +552,7 @@ files:
|
|
550
552
|
- lib/candidhealth/service_lines/v_2/types/service_line_era_data.rb
|
551
553
|
- lib/candidhealth/service_lines/v_2/types/service_line_update.rb
|
552
554
|
- lib/candidhealth/service_lines/v_2/types/test_result.rb
|
555
|
+
- lib/candidhealth/service_lines/v_2/types/test_result_type.rb
|
553
556
|
- lib/candidhealth/tags/types/tag.rb
|
554
557
|
- lib/candidhealth/tags/types/tag_color_enum.rb
|
555
558
|
- lib/candidhealth/tags/types/tag_create.rb
|