candidhealth 0.33.0 → 0.33.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/candidhealth/pre_encounter/appointments/v_1/client.rb +32 -270
- data/lib/candidhealth/pre_encounter/appointments/v_1/types/appointment.rb +87 -75
- data/lib/candidhealth/pre_encounter/appointments/v_1/types/{appointment_sort_field.rb → appointment_status.rb} +5 -3
- data/lib/candidhealth/pre_encounter/appointments/v_1/types/mutable_appointment.rb +87 -75
- data/lib/candidhealth/pre_encounter/coverages/v_1/client.rb +4 -4
- data/lib/candidhealth/pre_encounter/coverages/v_1/types/plan_date.rb +87 -0
- data/lib/candidhealth/pre_encounter/coverages/v_1/types/plan_metadata.rb +13 -10
- data/lib/candidhealth/pre_encounter/lists/client.rb +32 -0
- data/lib/candidhealth/pre_encounter/lists/v_1/client.rb +213 -0
- data/lib/candidhealth/pre_encounter/lists/v_1/types/appointment_list_item.rb +104 -0
- data/lib/candidhealth/pre_encounter/lists/v_1/types/appointment_list_page.rb +90 -0
- data/lib/candidhealth/pre_encounter/lists/v_1/types/patient_list_item.rb +104 -0
- data/lib/candidhealth/pre_encounter/lists/v_1/types/patient_list_page.rb +90 -0
- data/lib/candidhealth/pre_encounter/patients/v_1/client.rb +126 -150
- data/lib/candidhealth/pre_encounter/patients/v_1/types/guarantor.rb +121 -0
- data/lib/candidhealth/pre_encounter/patients/v_1/types/mutable_patient.rb +32 -2
- data/lib/candidhealth/pre_encounter/patients/v_1/types/patient.rb +32 -2
- data/lib/candidhealth/pre_encounter/patients/v_1/types/potential_duplicate_patient.rb +72 -0
- data/lib/candidhealth/pre_encounter/patients/v_1/types/potential_duplicate_patients_error_body.rb +84 -0
- data/lib/requests.rb +2 -2
- data/lib/types_export.rb +9 -3
- metadata +13 -5
- data/lib/candidhealth/pre_encounter/appointments/v_1/types/appointment_reason.rb +0 -19
- data/lib/candidhealth/pre_encounter/appointments/v_1/types/appointment_type.rb +0 -17
@@ -0,0 +1,121 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require_relative "../../../common/types/human_name"
|
4
|
+
require_relative "../../../common/types/contact_point"
|
5
|
+
require "date"
|
6
|
+
require_relative "../../../common/types/address"
|
7
|
+
require "ostruct"
|
8
|
+
require "json"
|
9
|
+
|
10
|
+
module CandidApiClient
|
11
|
+
module PreEncounter
|
12
|
+
module Patients
|
13
|
+
module V1
|
14
|
+
module Types
|
15
|
+
class Guarantor
|
16
|
+
# @return [CandidApiClient::PreEncounter::Common::Types::HumanName]
|
17
|
+
attr_reader :name
|
18
|
+
# @return [CandidApiClient::PreEncounter::Common::Types::ContactPoint]
|
19
|
+
attr_reader :telecom
|
20
|
+
# @return [String]
|
21
|
+
attr_reader :email
|
22
|
+
# @return [Date]
|
23
|
+
attr_reader :birth_date
|
24
|
+
# @return [CandidApiClient::PreEncounter::Common::Types::Address]
|
25
|
+
attr_reader :address
|
26
|
+
# @return [OpenStruct] Additional properties unmapped to the current class definition
|
27
|
+
attr_reader :additional_properties
|
28
|
+
# @return [Object]
|
29
|
+
attr_reader :_field_set
|
30
|
+
protected :_field_set
|
31
|
+
|
32
|
+
OMIT = Object.new
|
33
|
+
|
34
|
+
# @param name [CandidApiClient::PreEncounter::Common::Types::HumanName]
|
35
|
+
# @param telecom [CandidApiClient::PreEncounter::Common::Types::ContactPoint]
|
36
|
+
# @param email [String]
|
37
|
+
# @param birth_date [Date]
|
38
|
+
# @param address [CandidApiClient::PreEncounter::Common::Types::Address]
|
39
|
+
# @param additional_properties [OpenStruct] Additional properties unmapped to the current class definition
|
40
|
+
# @return [CandidApiClient::PreEncounter::Patients::V1::Types::Guarantor]
|
41
|
+
def initialize(name:, telecom:, birth_date:, address:, email: OMIT, additional_properties: nil)
|
42
|
+
@name = name
|
43
|
+
@telecom = telecom
|
44
|
+
@email = email if email != OMIT
|
45
|
+
@birth_date = birth_date
|
46
|
+
@address = address
|
47
|
+
@additional_properties = additional_properties
|
48
|
+
@_field_set = {
|
49
|
+
"name": name,
|
50
|
+
"telecom": telecom,
|
51
|
+
"email": email,
|
52
|
+
"birth_date": birth_date,
|
53
|
+
"address": address
|
54
|
+
}.reject do |_k, v|
|
55
|
+
v == OMIT
|
56
|
+
end
|
57
|
+
end
|
58
|
+
|
59
|
+
# Deserialize a JSON object to an instance of Guarantor
|
60
|
+
#
|
61
|
+
# @param json_object [String]
|
62
|
+
# @return [CandidApiClient::PreEncounter::Patients::V1::Types::Guarantor]
|
63
|
+
def self.from_json(json_object:)
|
64
|
+
struct = JSON.parse(json_object, object_class: OpenStruct)
|
65
|
+
parsed_json = JSON.parse(json_object)
|
66
|
+
if parsed_json["name"].nil?
|
67
|
+
name = nil
|
68
|
+
else
|
69
|
+
name = parsed_json["name"].to_json
|
70
|
+
name = CandidApiClient::PreEncounter::Common::Types::HumanName.from_json(json_object: name)
|
71
|
+
end
|
72
|
+
if parsed_json["telecom"].nil?
|
73
|
+
telecom = nil
|
74
|
+
else
|
75
|
+
telecom = parsed_json["telecom"].to_json
|
76
|
+
telecom = CandidApiClient::PreEncounter::Common::Types::ContactPoint.from_json(json_object: telecom)
|
77
|
+
end
|
78
|
+
email = struct["email"]
|
79
|
+
birth_date = (Date.parse(parsed_json["birth_date"]) unless parsed_json["birth_date"].nil?)
|
80
|
+
if parsed_json["address"].nil?
|
81
|
+
address = nil
|
82
|
+
else
|
83
|
+
address = parsed_json["address"].to_json
|
84
|
+
address = CandidApiClient::PreEncounter::Common::Types::Address.from_json(json_object: address)
|
85
|
+
end
|
86
|
+
new(
|
87
|
+
name: name,
|
88
|
+
telecom: telecom,
|
89
|
+
email: email,
|
90
|
+
birth_date: birth_date,
|
91
|
+
address: address,
|
92
|
+
additional_properties: struct
|
93
|
+
)
|
94
|
+
end
|
95
|
+
|
96
|
+
# Serialize an instance of Guarantor to a JSON object
|
97
|
+
#
|
98
|
+
# @return [String]
|
99
|
+
def to_json(*_args)
|
100
|
+
@_field_set&.to_json
|
101
|
+
end
|
102
|
+
|
103
|
+
# Leveraged for Union-type generation, validate_raw attempts to parse the given
|
104
|
+
# hash and check each fields type against the current object's property
|
105
|
+
# definitions.
|
106
|
+
#
|
107
|
+
# @param obj [Object]
|
108
|
+
# @return [Void]
|
109
|
+
def self.validate_raw(obj:)
|
110
|
+
CandidApiClient::PreEncounter::Common::Types::HumanName.validate_raw(obj: obj.name)
|
111
|
+
CandidApiClient::PreEncounter::Common::Types::ContactPoint.validate_raw(obj: obj.telecom)
|
112
|
+
obj.email&.is_a?(String) != false || raise("Passed value for field obj.email is not the expected type, validation failed.")
|
113
|
+
obj.birth_date.is_a?(Date) != false || raise("Passed value for field obj.birth_date is not the expected type, validation failed.")
|
114
|
+
CandidApiClient::PreEncounter::Common::Types::Address.validate_raw(obj: obj.address)
|
115
|
+
end
|
116
|
+
end
|
117
|
+
end
|
118
|
+
end
|
119
|
+
end
|
120
|
+
end
|
121
|
+
end
|
@@ -15,6 +15,7 @@ require_relative "external_provenance"
|
|
15
15
|
require_relative "contact"
|
16
16
|
require_relative "../../../common/types/external_provider"
|
17
17
|
require_relative "filing_order"
|
18
|
+
require_relative "guarantor"
|
18
19
|
require "ostruct"
|
19
20
|
require "json"
|
20
21
|
|
@@ -79,6 +80,12 @@ module CandidApiClient
|
|
79
80
|
attr_reader :general_practitioners
|
80
81
|
# @return [CandidApiClient::PreEncounter::Patients::V1::Types::FilingOrder]
|
81
82
|
attr_reader :filing_order
|
83
|
+
# @return [Array<String>]
|
84
|
+
attr_reader :non_insurance_payers
|
85
|
+
# @return [CandidApiClient::PreEncounter::Patients::V1::Types::Guarantor]
|
86
|
+
attr_reader :guarantor
|
87
|
+
# @return [Boolean]
|
88
|
+
attr_reader :self_pay
|
82
89
|
# @return [OpenStruct] Additional properties unmapped to the current class definition
|
83
90
|
attr_reader :additional_properties
|
84
91
|
# @return [Object]
|
@@ -116,10 +123,13 @@ module CandidApiClient
|
|
116
123
|
# @param contacts [Array<CandidApiClient::PreEncounter::Patients::V1::Types::Contact>] Contacts for the patient.
|
117
124
|
# @param general_practitioners [Array<CandidApiClient::PreEncounter::Common::Types::ExternalProvider>]
|
118
125
|
# @param filing_order [CandidApiClient::PreEncounter::Patients::V1::Types::FilingOrder]
|
126
|
+
# @param non_insurance_payers [Array<String>]
|
127
|
+
# @param guarantor [CandidApiClient::PreEncounter::Patients::V1::Types::Guarantor]
|
128
|
+
# @param self_pay [Boolean]
|
119
129
|
# @param additional_properties [OpenStruct] Additional properties unmapped to the current class definition
|
120
130
|
# @return [CandidApiClient::PreEncounter::Patients::V1::Types::MutablePatient]
|
121
131
|
def initialize(name:, other_names:, birth_date:, biological_sex:, primary_address:, other_addresses:,
|
122
|
-
primary_telecom:, other_telecoms:, contacts:, general_practitioners:, filing_order:, gender: OMIT, social_security_number: OMIT, sexual_orientation: OMIT, race: OMIT, ethnicity: OMIT, disability_status: OMIT, marital_status: OMIT, deceased: OMIT, multiple_birth: OMIT, email: OMIT, electronic_communication_opt_in: OMIT, photo: OMIT, language: OMIT, external_provenance: OMIT, additional_properties: nil)
|
132
|
+
primary_telecom:, other_telecoms:, contacts:, general_practitioners:, filing_order:, gender: OMIT, social_security_number: OMIT, sexual_orientation: OMIT, race: OMIT, ethnicity: OMIT, disability_status: OMIT, marital_status: OMIT, deceased: OMIT, multiple_birth: OMIT, email: OMIT, electronic_communication_opt_in: OMIT, photo: OMIT, language: OMIT, external_provenance: OMIT, non_insurance_payers: OMIT, guarantor: OMIT, self_pay: OMIT, additional_properties: nil)
|
123
133
|
@name = name
|
124
134
|
@other_names = other_names
|
125
135
|
@gender = gender if gender != OMIT
|
@@ -147,6 +157,9 @@ module CandidApiClient
|
|
147
157
|
@contacts = contacts
|
148
158
|
@general_practitioners = general_practitioners
|
149
159
|
@filing_order = filing_order
|
160
|
+
@non_insurance_payers = non_insurance_payers if non_insurance_payers != OMIT
|
161
|
+
@guarantor = guarantor if guarantor != OMIT
|
162
|
+
@self_pay = self_pay if self_pay != OMIT
|
150
163
|
@additional_properties = additional_properties
|
151
164
|
@_field_set = {
|
152
165
|
"name": name,
|
@@ -173,7 +186,10 @@ module CandidApiClient
|
|
173
186
|
"external_provenance": external_provenance,
|
174
187
|
"contacts": contacts,
|
175
188
|
"general_practitioners": general_practitioners,
|
176
|
-
"filing_order": filing_order
|
189
|
+
"filing_order": filing_order,
|
190
|
+
"non_insurance_payers": non_insurance_payers,
|
191
|
+
"guarantor": guarantor,
|
192
|
+
"self_pay": self_pay
|
177
193
|
}.reject do |_k, v|
|
178
194
|
v == OMIT
|
179
195
|
end
|
@@ -251,6 +267,14 @@ module CandidApiClient
|
|
251
267
|
filing_order = parsed_json["filing_order"].to_json
|
252
268
|
filing_order = CandidApiClient::PreEncounter::Patients::V1::Types::FilingOrder.from_json(json_object: filing_order)
|
253
269
|
end
|
270
|
+
non_insurance_payers = struct["non_insurance_payers"]
|
271
|
+
if parsed_json["guarantor"].nil?
|
272
|
+
guarantor = nil
|
273
|
+
else
|
274
|
+
guarantor = parsed_json["guarantor"].to_json
|
275
|
+
guarantor = CandidApiClient::PreEncounter::Patients::V1::Types::Guarantor.from_json(json_object: guarantor)
|
276
|
+
end
|
277
|
+
self_pay = struct["self_pay"]
|
254
278
|
new(
|
255
279
|
name: name,
|
256
280
|
other_names: other_names,
|
@@ -277,6 +301,9 @@ module CandidApiClient
|
|
277
301
|
contacts: contacts,
|
278
302
|
general_practitioners: general_practitioners,
|
279
303
|
filing_order: filing_order,
|
304
|
+
non_insurance_payers: non_insurance_payers,
|
305
|
+
guarantor: guarantor,
|
306
|
+
self_pay: self_pay,
|
280
307
|
additional_properties: struct
|
281
308
|
)
|
282
309
|
end
|
@@ -320,6 +347,9 @@ module CandidApiClient
|
|
320
347
|
obj.contacts.is_a?(Array) != false || raise("Passed value for field obj.contacts is not the expected type, validation failed.")
|
321
348
|
obj.general_practitioners.is_a?(Array) != false || raise("Passed value for field obj.general_practitioners is not the expected type, validation failed.")
|
322
349
|
CandidApiClient::PreEncounter::Patients::V1::Types::FilingOrder.validate_raw(obj: obj.filing_order)
|
350
|
+
obj.non_insurance_payers&.is_a?(Array) != false || raise("Passed value for field obj.non_insurance_payers is not the expected type, validation failed.")
|
351
|
+
obj.guarantor.nil? || CandidApiClient::PreEncounter::Patients::V1::Types::Guarantor.validate_raw(obj: obj.guarantor)
|
352
|
+
obj.self_pay&.is_a?(Boolean) != false || raise("Passed value for field obj.self_pay is not the expected type, validation failed.")
|
323
353
|
end
|
324
354
|
end
|
325
355
|
end
|
@@ -15,6 +15,7 @@ require_relative "external_provenance"
|
|
15
15
|
require_relative "contact"
|
16
16
|
require_relative "../../../common/types/external_provider"
|
17
17
|
require_relative "filing_order"
|
18
|
+
require_relative "guarantor"
|
18
19
|
require "ostruct"
|
19
20
|
require "json"
|
20
21
|
|
@@ -98,6 +99,12 @@ module CandidApiClient
|
|
98
99
|
attr_reader :general_practitioners
|
99
100
|
# @return [CandidApiClient::PreEncounter::Patients::V1::Types::FilingOrder]
|
100
101
|
attr_reader :filing_order
|
102
|
+
# @return [Array<String>]
|
103
|
+
attr_reader :non_insurance_payers
|
104
|
+
# @return [CandidApiClient::PreEncounter::Patients::V1::Types::Guarantor]
|
105
|
+
attr_reader :guarantor
|
106
|
+
# @return [Boolean]
|
107
|
+
attr_reader :self_pay
|
101
108
|
# @return [OpenStruct] Additional properties unmapped to the current class definition
|
102
109
|
attr_reader :additional_properties
|
103
110
|
# @return [Object]
|
@@ -147,10 +154,13 @@ module CandidApiClient
|
|
147
154
|
# @param contacts [Array<CandidApiClient::PreEncounter::Patients::V1::Types::Contact>] Contacts for the patient.
|
148
155
|
# @param general_practitioners [Array<CandidApiClient::PreEncounter::Common::Types::ExternalProvider>]
|
149
156
|
# @param filing_order [CandidApiClient::PreEncounter::Patients::V1::Types::FilingOrder]
|
157
|
+
# @param non_insurance_payers [Array<String>]
|
158
|
+
# @param guarantor [CandidApiClient::PreEncounter::Patients::V1::Types::Guarantor]
|
159
|
+
# @param self_pay [Boolean]
|
150
160
|
# @param additional_properties [OpenStruct] Additional properties unmapped to the current class definition
|
151
161
|
# @return [CandidApiClient::PreEncounter::Patients::V1::Types::Patient]
|
152
162
|
def initialize(id:, mrn:, organization_id:, deactivated:, version:, updated_at:, updating_user_id:, name:,
|
153
|
-
other_names:, birth_date:, biological_sex:, primary_address:, other_addresses:, primary_telecom:, other_telecoms:, contacts:, general_practitioners:, filing_order:, gender: OMIT, social_security_number: OMIT, sexual_orientation: OMIT, race: OMIT, ethnicity: OMIT, disability_status: OMIT, marital_status: OMIT, deceased: OMIT, multiple_birth: OMIT, email: OMIT, electronic_communication_opt_in: OMIT, photo: OMIT, language: OMIT, external_provenance: OMIT, additional_properties: nil)
|
163
|
+
other_names:, birth_date:, biological_sex:, primary_address:, other_addresses:, primary_telecom:, other_telecoms:, contacts:, general_practitioners:, filing_order:, gender: OMIT, social_security_number: OMIT, sexual_orientation: OMIT, race: OMIT, ethnicity: OMIT, disability_status: OMIT, marital_status: OMIT, deceased: OMIT, multiple_birth: OMIT, email: OMIT, electronic_communication_opt_in: OMIT, photo: OMIT, language: OMIT, external_provenance: OMIT, non_insurance_payers: OMIT, guarantor: OMIT, self_pay: OMIT, additional_properties: nil)
|
154
164
|
@id = id
|
155
165
|
@mrn = mrn
|
156
166
|
@organization_id = organization_id
|
@@ -185,6 +195,9 @@ module CandidApiClient
|
|
185
195
|
@contacts = contacts
|
186
196
|
@general_practitioners = general_practitioners
|
187
197
|
@filing_order = filing_order
|
198
|
+
@non_insurance_payers = non_insurance_payers if non_insurance_payers != OMIT
|
199
|
+
@guarantor = guarantor if guarantor != OMIT
|
200
|
+
@self_pay = self_pay if self_pay != OMIT
|
188
201
|
@additional_properties = additional_properties
|
189
202
|
@_field_set = {
|
190
203
|
"id": id,
|
@@ -218,7 +231,10 @@ module CandidApiClient
|
|
218
231
|
"external_provenance": external_provenance,
|
219
232
|
"contacts": contacts,
|
220
233
|
"general_practitioners": general_practitioners,
|
221
|
-
"filing_order": filing_order
|
234
|
+
"filing_order": filing_order,
|
235
|
+
"non_insurance_payers": non_insurance_payers,
|
236
|
+
"guarantor": guarantor,
|
237
|
+
"self_pay": self_pay
|
222
238
|
}.reject do |_k, v|
|
223
239
|
v == OMIT
|
224
240
|
end
|
@@ -303,6 +319,14 @@ module CandidApiClient
|
|
303
319
|
filing_order = parsed_json["filing_order"].to_json
|
304
320
|
filing_order = CandidApiClient::PreEncounter::Patients::V1::Types::FilingOrder.from_json(json_object: filing_order)
|
305
321
|
end
|
322
|
+
non_insurance_payers = struct["non_insurance_payers"]
|
323
|
+
if parsed_json["guarantor"].nil?
|
324
|
+
guarantor = nil
|
325
|
+
else
|
326
|
+
guarantor = parsed_json["guarantor"].to_json
|
327
|
+
guarantor = CandidApiClient::PreEncounter::Patients::V1::Types::Guarantor.from_json(json_object: guarantor)
|
328
|
+
end
|
329
|
+
self_pay = struct["self_pay"]
|
306
330
|
new(
|
307
331
|
id: id,
|
308
332
|
mrn: mrn,
|
@@ -336,6 +360,9 @@ module CandidApiClient
|
|
336
360
|
contacts: contacts,
|
337
361
|
general_practitioners: general_practitioners,
|
338
362
|
filing_order: filing_order,
|
363
|
+
non_insurance_payers: non_insurance_payers,
|
364
|
+
guarantor: guarantor,
|
365
|
+
self_pay: self_pay,
|
339
366
|
additional_properties: struct
|
340
367
|
)
|
341
368
|
end
|
@@ -386,6 +413,9 @@ module CandidApiClient
|
|
386
413
|
obj.contacts.is_a?(Array) != false || raise("Passed value for field obj.contacts is not the expected type, validation failed.")
|
387
414
|
obj.general_practitioners.is_a?(Array) != false || raise("Passed value for field obj.general_practitioners is not the expected type, validation failed.")
|
388
415
|
CandidApiClient::PreEncounter::Patients::V1::Types::FilingOrder.validate_raw(obj: obj.filing_order)
|
416
|
+
obj.non_insurance_payers&.is_a?(Array) != false || raise("Passed value for field obj.non_insurance_payers is not the expected type, validation failed.")
|
417
|
+
obj.guarantor.nil? || CandidApiClient::PreEncounter::Patients::V1::Types::Guarantor.validate_raw(obj: obj.guarantor)
|
418
|
+
obj.self_pay&.is_a?(Boolean) != false || raise("Passed value for field obj.self_pay is not the expected type, validation failed.")
|
389
419
|
end
|
390
420
|
end
|
391
421
|
end
|
@@ -0,0 +1,72 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require "ostruct"
|
4
|
+
require "json"
|
5
|
+
|
6
|
+
module CandidApiClient
|
7
|
+
module PreEncounter
|
8
|
+
module Patients
|
9
|
+
module V1
|
10
|
+
module Types
|
11
|
+
class PotentialDuplicatePatient
|
12
|
+
# @return [String]
|
13
|
+
attr_reader :existing_patient_id
|
14
|
+
# @return [String]
|
15
|
+
attr_reader :existing_patient_mrn
|
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 existing_patient_id [String]
|
25
|
+
# @param existing_patient_mrn [String]
|
26
|
+
# @param additional_properties [OpenStruct] Additional properties unmapped to the current class definition
|
27
|
+
# @return [CandidApiClient::PreEncounter::Patients::V1::Types::PotentialDuplicatePatient]
|
28
|
+
def initialize(existing_patient_id:, existing_patient_mrn:, additional_properties: nil)
|
29
|
+
@existing_patient_id = existing_patient_id
|
30
|
+
@existing_patient_mrn = existing_patient_mrn
|
31
|
+
@additional_properties = additional_properties
|
32
|
+
@_field_set = { "existing_patient_id": existing_patient_id, "existing_patient_mrn": existing_patient_mrn }
|
33
|
+
end
|
34
|
+
|
35
|
+
# Deserialize a JSON object to an instance of PotentialDuplicatePatient
|
36
|
+
#
|
37
|
+
# @param json_object [String]
|
38
|
+
# @return [CandidApiClient::PreEncounter::Patients::V1::Types::PotentialDuplicatePatient]
|
39
|
+
def self.from_json(json_object:)
|
40
|
+
struct = JSON.parse(json_object, object_class: OpenStruct)
|
41
|
+
existing_patient_id = struct["existing_patient_id"]
|
42
|
+
existing_patient_mrn = struct["existing_patient_mrn"]
|
43
|
+
new(
|
44
|
+
existing_patient_id: existing_patient_id,
|
45
|
+
existing_patient_mrn: existing_patient_mrn,
|
46
|
+
additional_properties: struct
|
47
|
+
)
|
48
|
+
end
|
49
|
+
|
50
|
+
# Serialize an instance of PotentialDuplicatePatient 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.existing_patient_id.is_a?(String) != false || raise("Passed value for field obj.existing_patient_id is not the expected type, validation failed.")
|
65
|
+
obj.existing_patient_mrn.is_a?(String) != false || raise("Passed value for field obj.existing_patient_mrn is not the expected type, validation failed.")
|
66
|
+
end
|
67
|
+
end
|
68
|
+
end
|
69
|
+
end
|
70
|
+
end
|
71
|
+
end
|
72
|
+
end
|
data/lib/candidhealth/pre_encounter/patients/v_1/types/potential_duplicate_patients_error_body.rb
ADDED
@@ -0,0 +1,84 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require_relative "potential_duplicate_patient"
|
4
|
+
require "ostruct"
|
5
|
+
require "json"
|
6
|
+
|
7
|
+
module CandidApiClient
|
8
|
+
module PreEncounter
|
9
|
+
module Patients
|
10
|
+
module V1
|
11
|
+
module Types
|
12
|
+
class PotentialDuplicatePatientsErrorBody
|
13
|
+
# @return [String]
|
14
|
+
attr_reader :code
|
15
|
+
# @return [Array<CandidApiClient::PreEncounter::Patients::V1::Types::PotentialDuplicatePatient>]
|
16
|
+
attr_reader :potential_duplicates
|
17
|
+
# @return [String]
|
18
|
+
attr_reader :message
|
19
|
+
# @return [OpenStruct] Additional properties unmapped to the current class definition
|
20
|
+
attr_reader :additional_properties
|
21
|
+
# @return [Object]
|
22
|
+
attr_reader :_field_set
|
23
|
+
protected :_field_set
|
24
|
+
|
25
|
+
OMIT = Object.new
|
26
|
+
|
27
|
+
# @param code [String]
|
28
|
+
# @param potential_duplicates [Array<CandidApiClient::PreEncounter::Patients::V1::Types::PotentialDuplicatePatient>]
|
29
|
+
# @param message [String]
|
30
|
+
# @param additional_properties [OpenStruct] Additional properties unmapped to the current class definition
|
31
|
+
# @return [CandidApiClient::PreEncounter::Patients::V1::Types::PotentialDuplicatePatientsErrorBody]
|
32
|
+
def initialize(code:, potential_duplicates:, message:, additional_properties: nil)
|
33
|
+
@code = code
|
34
|
+
@potential_duplicates = potential_duplicates
|
35
|
+
@message = message
|
36
|
+
@additional_properties = additional_properties
|
37
|
+
@_field_set = { "code": code, "potential_duplicates": potential_duplicates, "message": message }
|
38
|
+
end
|
39
|
+
|
40
|
+
# Deserialize a JSON object to an instance of PotentialDuplicatePatientsErrorBody
|
41
|
+
#
|
42
|
+
# @param json_object [String]
|
43
|
+
# @return [CandidApiClient::PreEncounter::Patients::V1::Types::PotentialDuplicatePatientsErrorBody]
|
44
|
+
def self.from_json(json_object:)
|
45
|
+
struct = JSON.parse(json_object, object_class: OpenStruct)
|
46
|
+
parsed_json = JSON.parse(json_object)
|
47
|
+
code = struct["code"]
|
48
|
+
potential_duplicates = parsed_json["potential_duplicates"]&.map do |item|
|
49
|
+
item = item.to_json
|
50
|
+
CandidApiClient::PreEncounter::Patients::V1::Types::PotentialDuplicatePatient.from_json(json_object: item)
|
51
|
+
end
|
52
|
+
message = struct["message"]
|
53
|
+
new(
|
54
|
+
code: code,
|
55
|
+
potential_duplicates: potential_duplicates,
|
56
|
+
message: message,
|
57
|
+
additional_properties: struct
|
58
|
+
)
|
59
|
+
end
|
60
|
+
|
61
|
+
# Serialize an instance of PotentialDuplicatePatientsErrorBody to a JSON object
|
62
|
+
#
|
63
|
+
# @return [String]
|
64
|
+
def to_json(*_args)
|
65
|
+
@_field_set&.to_json
|
66
|
+
end
|
67
|
+
|
68
|
+
# Leveraged for Union-type generation, validate_raw attempts to parse the given
|
69
|
+
# hash and check each fields type against the current object's property
|
70
|
+
# definitions.
|
71
|
+
#
|
72
|
+
# @param obj [Object]
|
73
|
+
# @return [Void]
|
74
|
+
def self.validate_raw(obj:)
|
75
|
+
obj.code.is_a?(String) != false || raise("Passed value for field obj.code is not the expected type, validation failed.")
|
76
|
+
obj.potential_duplicates.is_a?(Array) != false || raise("Passed value for field obj.potential_duplicates is not the expected type, validation failed.")
|
77
|
+
obj.message.is_a?(String) != false || raise("Passed value for field obj.message is not the expected type, validation failed.")
|
78
|
+
end
|
79
|
+
end
|
80
|
+
end
|
81
|
+
end
|
82
|
+
end
|
83
|
+
end
|
84
|
+
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.33.
|
46
|
+
headers = { "X-Fern-Language": "Ruby", "X-Fern-SDK-Name": "candidhealth", "X-Fern-SDK-Version": "0.33.1" }
|
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.33.
|
90
|
+
headers = { "X-Fern-Language": "Ruby", "X-Fern-SDK-Name": "candidhealth", "X-Fern-SDK-Version": "0.33.1" }
|
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
@@ -275,10 +275,8 @@ require_relative "candidhealth/x_12/v_1/types/remittance_advice_remark_code"
|
|
275
275
|
require_relative "candidhealth/x_12/v_1/types/carc"
|
276
276
|
require_relative "candidhealth/x_12/v_1/types/rarc"
|
277
277
|
require_relative "candidhealth/pre_encounter/appointments/v_1/types/appointment_work_queue"
|
278
|
-
require_relative "candidhealth/pre_encounter/appointments/v_1/types/appointment_sort_field"
|
279
278
|
require_relative "candidhealth/pre_encounter/appointments/v_1/types/universal_service_identifier"
|
280
|
-
require_relative "candidhealth/pre_encounter/appointments/v_1/types/
|
281
|
-
require_relative "candidhealth/pre_encounter/appointments/v_1/types/appointment_type"
|
279
|
+
require_relative "candidhealth/pre_encounter/appointments/v_1/types/appointment_status"
|
282
280
|
require_relative "candidhealth/pre_encounter/appointments/v_1/types/service"
|
283
281
|
require_relative "candidhealth/pre_encounter/appointments/v_1/types/mutable_appointment"
|
284
282
|
require_relative "candidhealth/pre_encounter/appointments/v_1/types/appointment"
|
@@ -293,6 +291,7 @@ require_relative "candidhealth/pre_encounter/coverages/v_1/types/plan_coverage_d
|
|
293
291
|
require_relative "candidhealth/pre_encounter/coverages/v_1/types/service_coverage"
|
294
292
|
require_relative "candidhealth/pre_encounter/coverages/v_1/types/service_coverage_details"
|
295
293
|
require_relative "candidhealth/pre_encounter/coverages/v_1/types/plan_metadata"
|
294
|
+
require_relative "candidhealth/pre_encounter/coverages/v_1/types/plan_date"
|
296
295
|
require_relative "candidhealth/pre_encounter/coverages/v_1/types/eligibility_status"
|
297
296
|
require_relative "candidhealth/pre_encounter/coverages/v_1/types/subscriber"
|
298
297
|
require_relative "candidhealth/pre_encounter/coverages/v_1/types/coverage_status"
|
@@ -302,6 +301,10 @@ require_relative "candidhealth/pre_encounter/coverages/v_1/types/mutable_coverag
|
|
302
301
|
require_relative "candidhealth/pre_encounter/coverages/v_1/types/coverage"
|
303
302
|
require_relative "candidhealth/pre_encounter/coverages/v_1/types/insurance_type_code"
|
304
303
|
require_relative "candidhealth/pre_encounter/coverages/v_1/types/service_type_code"
|
304
|
+
require_relative "candidhealth/pre_encounter/lists/v_1/types/patient_list_item"
|
305
|
+
require_relative "candidhealth/pre_encounter/lists/v_1/types/patient_list_page"
|
306
|
+
require_relative "candidhealth/pre_encounter/lists/v_1/types/appointment_list_item"
|
307
|
+
require_relative "candidhealth/pre_encounter/lists/v_1/types/appointment_list_page"
|
305
308
|
require_relative "candidhealth/pre_encounter/patients/v_1/types/marital_status"
|
306
309
|
require_relative "candidhealth/pre_encounter/patients/v_1/types/external_provenance"
|
307
310
|
require_relative "candidhealth/pre_encounter/patients/v_1/types/contact"
|
@@ -309,6 +312,9 @@ require_relative "candidhealth/pre_encounter/patients/v_1/types/filing_order"
|
|
309
312
|
require_relative "candidhealth/pre_encounter/patients/v_1/types/mutable_patient"
|
310
313
|
require_relative "candidhealth/pre_encounter/patients/v_1/types/patient"
|
311
314
|
require_relative "candidhealth/pre_encounter/patients/v_1/types/patient_page"
|
315
|
+
require_relative "candidhealth/pre_encounter/patients/v_1/types/potential_duplicate_patient"
|
316
|
+
require_relative "candidhealth/pre_encounter/patients/v_1/types/potential_duplicate_patients_error_body"
|
317
|
+
require_relative "candidhealth/pre_encounter/patients/v_1/types/guarantor"
|
312
318
|
require_relative "candidhealth/claims/types/claim"
|
313
319
|
require_relative "candidhealth/claims/types/claim_status"
|
314
320
|
require_relative "candidhealth/commons/types/primitive"
|
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.33.
|
4
|
+
version: 0.33.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- ''
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2024-09-
|
11
|
+
date: 2024-09-18 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: async-http-faraday
|
@@ -448,9 +448,7 @@ files:
|
|
448
448
|
- lib/candidhealth/pre_encounter/appointments/client.rb
|
449
449
|
- lib/candidhealth/pre_encounter/appointments/v_1/client.rb
|
450
450
|
- lib/candidhealth/pre_encounter/appointments/v_1/types/appointment.rb
|
451
|
-
- lib/candidhealth/pre_encounter/appointments/v_1/types/
|
452
|
-
- lib/candidhealth/pre_encounter/appointments/v_1/types/appointment_sort_field.rb
|
453
|
-
- lib/candidhealth/pre_encounter/appointments/v_1/types/appointment_type.rb
|
451
|
+
- lib/candidhealth/pre_encounter/appointments/v_1/types/appointment_status.rb
|
454
452
|
- lib/candidhealth/pre_encounter/appointments/v_1/types/appointment_work_queue.rb
|
455
453
|
- lib/candidhealth/pre_encounter/appointments/v_1/types/mutable_appointment.rb
|
456
454
|
- lib/candidhealth/pre_encounter/appointments/v_1/types/service.rb
|
@@ -494,20 +492,30 @@ files:
|
|
494
492
|
- lib/candidhealth/pre_encounter/coverages/v_1/types/network_type.rb
|
495
493
|
- lib/candidhealth/pre_encounter/coverages/v_1/types/plan_coverage.rb
|
496
494
|
- lib/candidhealth/pre_encounter/coverages/v_1/types/plan_coverage_details.rb
|
495
|
+
- lib/candidhealth/pre_encounter/coverages/v_1/types/plan_date.rb
|
497
496
|
- lib/candidhealth/pre_encounter/coverages/v_1/types/plan_metadata.rb
|
498
497
|
- lib/candidhealth/pre_encounter/coverages/v_1/types/service_coverage.rb
|
499
498
|
- lib/candidhealth/pre_encounter/coverages/v_1/types/service_coverage_details.rb
|
500
499
|
- lib/candidhealth/pre_encounter/coverages/v_1/types/service_type_code.rb
|
501
500
|
- lib/candidhealth/pre_encounter/coverages/v_1/types/subscriber.rb
|
501
|
+
- lib/candidhealth/pre_encounter/lists/client.rb
|
502
|
+
- lib/candidhealth/pre_encounter/lists/v_1/client.rb
|
503
|
+
- lib/candidhealth/pre_encounter/lists/v_1/types/appointment_list_item.rb
|
504
|
+
- lib/candidhealth/pre_encounter/lists/v_1/types/appointment_list_page.rb
|
505
|
+
- lib/candidhealth/pre_encounter/lists/v_1/types/patient_list_item.rb
|
506
|
+
- lib/candidhealth/pre_encounter/lists/v_1/types/patient_list_page.rb
|
502
507
|
- lib/candidhealth/pre_encounter/patients/client.rb
|
503
508
|
- lib/candidhealth/pre_encounter/patients/v_1/client.rb
|
504
509
|
- lib/candidhealth/pre_encounter/patients/v_1/types/contact.rb
|
505
510
|
- lib/candidhealth/pre_encounter/patients/v_1/types/external_provenance.rb
|
506
511
|
- lib/candidhealth/pre_encounter/patients/v_1/types/filing_order.rb
|
512
|
+
- lib/candidhealth/pre_encounter/patients/v_1/types/guarantor.rb
|
507
513
|
- lib/candidhealth/pre_encounter/patients/v_1/types/marital_status.rb
|
508
514
|
- lib/candidhealth/pre_encounter/patients/v_1/types/mutable_patient.rb
|
509
515
|
- lib/candidhealth/pre_encounter/patients/v_1/types/patient.rb
|
510
516
|
- lib/candidhealth/pre_encounter/patients/v_1/types/patient_page.rb
|
517
|
+
- lib/candidhealth/pre_encounter/patients/v_1/types/potential_duplicate_patient.rb
|
518
|
+
- lib/candidhealth/pre_encounter/patients/v_1/types/potential_duplicate_patients_error_body.rb
|
511
519
|
- lib/candidhealth/remits/v_1/types/payee.rb
|
512
520
|
- lib/candidhealth/remits/v_1/types/payee_identifier.rb
|
513
521
|
- lib/candidhealth/service_facility/client.rb
|
@@ -1,19 +0,0 @@
|
|
1
|
-
# frozen_string_literal: true
|
2
|
-
|
3
|
-
module CandidApiClient
|
4
|
-
module PreEncounter
|
5
|
-
module Appointments
|
6
|
-
module V1
|
7
|
-
module Types
|
8
|
-
class AppointmentReason
|
9
|
-
CHECKUP = "CHECKUP"
|
10
|
-
EMERGENCY = "EMERGENCY"
|
11
|
-
FOLLOWUP = "FOLLOWUP"
|
12
|
-
ROUTINE = "ROUTINE"
|
13
|
-
WALKIN = "WALKIN"
|
14
|
-
end
|
15
|
-
end
|
16
|
-
end
|
17
|
-
end
|
18
|
-
end
|
19
|
-
end
|
@@ -1,17 +0,0 @@
|
|
1
|
-
# frozen_string_literal: true
|
2
|
-
|
3
|
-
module CandidApiClient
|
4
|
-
module PreEncounter
|
5
|
-
module Appointments
|
6
|
-
module V1
|
7
|
-
module Types
|
8
|
-
class AppointmentType
|
9
|
-
COMPLETE = "Complete"
|
10
|
-
NORMAL = "Normal"
|
11
|
-
TENTATIVE = "Tentative"
|
12
|
-
end
|
13
|
-
end
|
14
|
-
end
|
15
|
-
end
|
16
|
-
end
|
17
|
-
end
|