candidhealth 0.35.0 → 0.35.1
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/exports/v_3/client.rb +6 -4
- data/lib/candidhealth/guarantor/v_1/types/guarantor.rb +3 -3
- data/lib/candidhealth/guarantor/v_1/types/guarantor_base.rb +3 -3
- data/lib/candidhealth/guarantor/v_1/types/guarantor_create.rb +4 -4
- data/lib/candidhealth/insurance_adjudications/v_1/client.rb +4 -2
- data/lib/candidhealth/insurance_adjudications/v_1/types/insurance_adjudication_create.rb +10 -2
- data/lib/candidhealth/pre_encounter/appointments/v_1/types/appointment_work_queue.rb +1 -0
- data/lib/candidhealth/pre_encounter/common/types/external_provider.rb +2 -2
- data/lib/candidhealth/pre_encounter/coverages/v_1/client.rb +4 -0
- data/lib/candidhealth/pre_encounter/coverages/v_1/types/coverage_benefits.rb +11 -2
- data/lib/candidhealth/pre_encounter/lists/v_1/client.rb +4 -6
- data/lib/candidhealth/pre_encounter/lists/v_1/types/appointment_list_item.rb +12 -2
- data/lib/candidhealth/pre_encounter/patients/v_1/client.rb +239 -4
- data/lib/candidhealth/pre_encounter/patients/v_1/types/do_not_invoice_reason.rb +18 -0
- data/lib/candidhealth/pre_encounter/patients/v_1/types/invalid_mrn_error_body.rb +72 -0
- data/lib/candidhealth/pre_encounter/patients/v_1/types/mutable_patient.rb +11 -2
- data/lib/candidhealth/pre_encounter/patients/v_1/types/mutable_patient_with_mrn.rb +421 -0
- data/lib/candidhealth/pre_encounter/patients/v_1/types/patient.rb +11 -2
- data/lib/candidhealth/x_12/v_1/types/rarc.rb +6 -0
- data/lib/requests.rb +2 -2
- data/lib/types_export.rb +3 -0
- metadata +5 -2
@@ -0,0 +1,421 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require_relative "../../../common/types/human_name"
|
4
|
+
require_relative "../../../common/types/gender"
|
5
|
+
require "date"
|
6
|
+
require_relative "../../../common/types/sex"
|
7
|
+
require_relative "../../../common/types/sexual_orientation"
|
8
|
+
require_relative "../../../common/types/race"
|
9
|
+
require_relative "../../../common/types/ethnicity"
|
10
|
+
require_relative "../../../common/types/disability_status"
|
11
|
+
require_relative "marital_status"
|
12
|
+
require_relative "../../../common/types/address"
|
13
|
+
require_relative "../../../common/types/contact_point"
|
14
|
+
require_relative "external_provenance"
|
15
|
+
require_relative "contact"
|
16
|
+
require_relative "../../../common/types/external_provider"
|
17
|
+
require_relative "filing_order"
|
18
|
+
require_relative "../../../common/types/canonical_non_insurance_payer_association"
|
19
|
+
require_relative "guarantor"
|
20
|
+
require_relative "authorization"
|
21
|
+
require_relative "referral"
|
22
|
+
require_relative "do_not_invoice_reason"
|
23
|
+
require "ostruct"
|
24
|
+
require "json"
|
25
|
+
|
26
|
+
module CandidApiClient
|
27
|
+
module PreEncounter
|
28
|
+
module Patients
|
29
|
+
module V1
|
30
|
+
module Types
|
31
|
+
class MutablePatientWithMrn
|
32
|
+
# @return [String] The medical record number for the patient.
|
33
|
+
attr_reader :mrn
|
34
|
+
# @return [CandidApiClient::PreEncounter::Common::Types::HumanName]
|
35
|
+
attr_reader :name
|
36
|
+
# @return [Array<CandidApiClient::PreEncounter::Common::Types::HumanName>] Other names for the patient.
|
37
|
+
attr_reader :other_names
|
38
|
+
# @return [CandidApiClient::PreEncounter::Common::Types::Gender]
|
39
|
+
attr_reader :gender
|
40
|
+
# @return [Date]
|
41
|
+
attr_reader :birth_date
|
42
|
+
# @return [String]
|
43
|
+
attr_reader :social_security_number
|
44
|
+
# @return [CandidApiClient::PreEncounter::Common::Types::Sex] The biological sex of the patient. This corresponds to the HL7
|
45
|
+
# AdministrativeGender
|
46
|
+
# https://www.hl7.org/fhir/valueset-administrative-gender.html
|
47
|
+
attr_reader :biological_sex
|
48
|
+
# @return [CandidApiClient::PreEncounter::Common::Types::SexualOrientation] The sexual orientation of the patient.
|
49
|
+
attr_reader :sexual_orientation
|
50
|
+
# @return [CandidApiClient::PreEncounter::Common::Types::Race]
|
51
|
+
attr_reader :race
|
52
|
+
# @return [CandidApiClient::PreEncounter::Common::Types::Ethnicity]
|
53
|
+
attr_reader :ethnicity
|
54
|
+
# @return [CandidApiClient::PreEncounter::Common::Types::DisabilityStatus]
|
55
|
+
attr_reader :disability_status
|
56
|
+
# @return [CandidApiClient::PreEncounter::Patients::V1::Types::MaritalStatus]
|
57
|
+
attr_reader :marital_status
|
58
|
+
# @return [DateTime] Time of death for the patient. Leave unset if the patient is not deceased.
|
59
|
+
attr_reader :deceased
|
60
|
+
# @return [Integer] The number of siblings the patient was born with. Leave unset if the patient was
|
61
|
+
# not part of a multiple birth.
|
62
|
+
attr_reader :multiple_birth
|
63
|
+
# @return [CandidApiClient::PreEncounter::Common::Types::Address] The primary address for the patient.
|
64
|
+
attr_reader :primary_address
|
65
|
+
# @return [Array<CandidApiClient::PreEncounter::Common::Types::Address>] Other addresses for the patient.
|
66
|
+
attr_reader :other_addresses
|
67
|
+
# @return [CandidApiClient::PreEncounter::Common::Types::ContactPoint] The primary phone number for the patient.
|
68
|
+
attr_reader :primary_telecom
|
69
|
+
# @return [Array<CandidApiClient::PreEncounter::Common::Types::ContactPoint>] Other phone numbers for the patient.
|
70
|
+
attr_reader :other_telecoms
|
71
|
+
# @return [String]
|
72
|
+
attr_reader :email
|
73
|
+
# @return [Boolean]
|
74
|
+
attr_reader :electronic_communication_opt_in
|
75
|
+
# @return [String]
|
76
|
+
attr_reader :photo
|
77
|
+
# @return [String]
|
78
|
+
attr_reader :language
|
79
|
+
# @return [CandidApiClient::PreEncounter::Patients::V1::Types::ExternalProvenance] Information about the upstream system that owns this patient data. Leave unset
|
80
|
+
# if Candid owns patient data.
|
81
|
+
attr_reader :external_provenance
|
82
|
+
# @return [Array<CandidApiClient::PreEncounter::Patients::V1::Types::Contact>] Contacts for the patient.
|
83
|
+
attr_reader :contacts
|
84
|
+
# @return [Array<CandidApiClient::PreEncounter::Common::Types::ExternalProvider>]
|
85
|
+
attr_reader :general_practitioners
|
86
|
+
# @return [CandidApiClient::PreEncounter::Patients::V1::Types::FilingOrder]
|
87
|
+
attr_reader :filing_order
|
88
|
+
# @return [Array<String>]
|
89
|
+
attr_reader :non_insurance_payers
|
90
|
+
# @return [Array<CandidApiClient::PreEncounter::Common::Types::CanonicalNonInsurancePayerAssociation>]
|
91
|
+
attr_reader :non_insurance_payer_associations
|
92
|
+
# @return [CandidApiClient::PreEncounter::Patients::V1::Types::Guarantor]
|
93
|
+
attr_reader :guarantor
|
94
|
+
# @return [Boolean]
|
95
|
+
attr_reader :self_pay
|
96
|
+
# @return [Array<CandidApiClient::PreEncounter::Patients::V1::Types::Authorization>]
|
97
|
+
attr_reader :authorizations
|
98
|
+
# @return [Array<CandidApiClient::PreEncounter::Patients::V1::Types::Referral>]
|
99
|
+
attr_reader :referrals
|
100
|
+
# @return [String]
|
101
|
+
attr_reader :primary_service_facility_id
|
102
|
+
# @return [CandidApiClient::PreEncounter::Patients::V1::Types::DoNotInvoiceReason] If this value is defined, the customer will not be invoiced.
|
103
|
+
attr_reader :do_not_invoice_reason
|
104
|
+
# @return [OpenStruct] Additional properties unmapped to the current class definition
|
105
|
+
attr_reader :additional_properties
|
106
|
+
# @return [Object]
|
107
|
+
attr_reader :_field_set
|
108
|
+
protected :_field_set
|
109
|
+
|
110
|
+
OMIT = Object.new
|
111
|
+
|
112
|
+
# @param mrn [String] The medical record number for the patient.
|
113
|
+
# @param name [CandidApiClient::PreEncounter::Common::Types::HumanName]
|
114
|
+
# @param other_names [Array<CandidApiClient::PreEncounter::Common::Types::HumanName>] Other names for the patient.
|
115
|
+
# @param gender [CandidApiClient::PreEncounter::Common::Types::Gender]
|
116
|
+
# @param birth_date [Date]
|
117
|
+
# @param social_security_number [String]
|
118
|
+
# @param biological_sex [CandidApiClient::PreEncounter::Common::Types::Sex] The biological sex of the patient. This corresponds to the HL7
|
119
|
+
# AdministrativeGender
|
120
|
+
# https://www.hl7.org/fhir/valueset-administrative-gender.html
|
121
|
+
# @param sexual_orientation [CandidApiClient::PreEncounter::Common::Types::SexualOrientation] The sexual orientation of the patient.
|
122
|
+
# @param race [CandidApiClient::PreEncounter::Common::Types::Race]
|
123
|
+
# @param ethnicity [CandidApiClient::PreEncounter::Common::Types::Ethnicity]
|
124
|
+
# @param disability_status [CandidApiClient::PreEncounter::Common::Types::DisabilityStatus]
|
125
|
+
# @param marital_status [CandidApiClient::PreEncounter::Patients::V1::Types::MaritalStatus]
|
126
|
+
# @param deceased [DateTime] Time of death for the patient. Leave unset if the patient is not deceased.
|
127
|
+
# @param multiple_birth [Integer] The number of siblings the patient was born with. Leave unset if the patient was
|
128
|
+
# not part of a multiple birth.
|
129
|
+
# @param primary_address [CandidApiClient::PreEncounter::Common::Types::Address] The primary address for the patient.
|
130
|
+
# @param other_addresses [Array<CandidApiClient::PreEncounter::Common::Types::Address>] Other addresses for the patient.
|
131
|
+
# @param primary_telecom [CandidApiClient::PreEncounter::Common::Types::ContactPoint] The primary phone number for the patient.
|
132
|
+
# @param other_telecoms [Array<CandidApiClient::PreEncounter::Common::Types::ContactPoint>] Other phone numbers for the patient.
|
133
|
+
# @param email [String]
|
134
|
+
# @param electronic_communication_opt_in [Boolean]
|
135
|
+
# @param photo [String]
|
136
|
+
# @param language [String]
|
137
|
+
# @param external_provenance [CandidApiClient::PreEncounter::Patients::V1::Types::ExternalProvenance] Information about the upstream system that owns this patient data. Leave unset
|
138
|
+
# if Candid owns patient data.
|
139
|
+
# @param contacts [Array<CandidApiClient::PreEncounter::Patients::V1::Types::Contact>] Contacts for the patient.
|
140
|
+
# @param general_practitioners [Array<CandidApiClient::PreEncounter::Common::Types::ExternalProvider>]
|
141
|
+
# @param filing_order [CandidApiClient::PreEncounter::Patients::V1::Types::FilingOrder]
|
142
|
+
# @param non_insurance_payers [Array<String>]
|
143
|
+
# @param non_insurance_payer_associations [Array<CandidApiClient::PreEncounter::Common::Types::CanonicalNonInsurancePayerAssociation>]
|
144
|
+
# @param guarantor [CandidApiClient::PreEncounter::Patients::V1::Types::Guarantor]
|
145
|
+
# @param self_pay [Boolean]
|
146
|
+
# @param authorizations [Array<CandidApiClient::PreEncounter::Patients::V1::Types::Authorization>]
|
147
|
+
# @param referrals [Array<CandidApiClient::PreEncounter::Patients::V1::Types::Referral>]
|
148
|
+
# @param primary_service_facility_id [String]
|
149
|
+
# @param do_not_invoice_reason [CandidApiClient::PreEncounter::Patients::V1::Types::DoNotInvoiceReason] If this value is defined, the customer will not be invoiced.
|
150
|
+
# @param additional_properties [OpenStruct] Additional properties unmapped to the current class definition
|
151
|
+
# @return [CandidApiClient::PreEncounter::Patients::V1::Types::MutablePatientWithMrn]
|
152
|
+
def initialize(mrn:, name:, other_names:, birth_date:, biological_sex:, primary_address:, other_addresses:,
|
153
|
+
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, non_insurance_payer_associations: OMIT, guarantor: OMIT, self_pay: OMIT, authorizations: OMIT, referrals: OMIT, primary_service_facility_id: OMIT, do_not_invoice_reason: OMIT, additional_properties: nil)
|
154
|
+
@mrn = mrn
|
155
|
+
@name = name
|
156
|
+
@other_names = other_names
|
157
|
+
@gender = gender if gender != OMIT
|
158
|
+
@birth_date = birth_date
|
159
|
+
@social_security_number = social_security_number if social_security_number != OMIT
|
160
|
+
@biological_sex = biological_sex
|
161
|
+
@sexual_orientation = sexual_orientation if sexual_orientation != OMIT
|
162
|
+
@race = race if race != OMIT
|
163
|
+
@ethnicity = ethnicity if ethnicity != OMIT
|
164
|
+
@disability_status = disability_status if disability_status != OMIT
|
165
|
+
@marital_status = marital_status if marital_status != OMIT
|
166
|
+
@deceased = deceased if deceased != OMIT
|
167
|
+
@multiple_birth = multiple_birth if multiple_birth != OMIT
|
168
|
+
@primary_address = primary_address
|
169
|
+
@other_addresses = other_addresses
|
170
|
+
@primary_telecom = primary_telecom
|
171
|
+
@other_telecoms = other_telecoms
|
172
|
+
@email = email if email != OMIT
|
173
|
+
if electronic_communication_opt_in != OMIT
|
174
|
+
@electronic_communication_opt_in = electronic_communication_opt_in
|
175
|
+
end
|
176
|
+
@photo = photo if photo != OMIT
|
177
|
+
@language = language if language != OMIT
|
178
|
+
@external_provenance = external_provenance if external_provenance != OMIT
|
179
|
+
@contacts = contacts
|
180
|
+
@general_practitioners = general_practitioners
|
181
|
+
@filing_order = filing_order
|
182
|
+
@non_insurance_payers = non_insurance_payers if non_insurance_payers != OMIT
|
183
|
+
if non_insurance_payer_associations != OMIT
|
184
|
+
@non_insurance_payer_associations = non_insurance_payer_associations
|
185
|
+
end
|
186
|
+
@guarantor = guarantor if guarantor != OMIT
|
187
|
+
@self_pay = self_pay if self_pay != OMIT
|
188
|
+
@authorizations = authorizations if authorizations != OMIT
|
189
|
+
@referrals = referrals if referrals != OMIT
|
190
|
+
@primary_service_facility_id = primary_service_facility_id if primary_service_facility_id != OMIT
|
191
|
+
@do_not_invoice_reason = do_not_invoice_reason if do_not_invoice_reason != OMIT
|
192
|
+
@additional_properties = additional_properties
|
193
|
+
@_field_set = {
|
194
|
+
"mrn": mrn,
|
195
|
+
"name": name,
|
196
|
+
"other_names": other_names,
|
197
|
+
"gender": gender,
|
198
|
+
"birth_date": birth_date,
|
199
|
+
"social_security_number": social_security_number,
|
200
|
+
"biological_sex": biological_sex,
|
201
|
+
"sexual_orientation": sexual_orientation,
|
202
|
+
"race": race,
|
203
|
+
"ethnicity": ethnicity,
|
204
|
+
"disability_status": disability_status,
|
205
|
+
"marital_status": marital_status,
|
206
|
+
"deceased": deceased,
|
207
|
+
"multiple_birth": multiple_birth,
|
208
|
+
"primary_address": primary_address,
|
209
|
+
"other_addresses": other_addresses,
|
210
|
+
"primary_telecom": primary_telecom,
|
211
|
+
"other_telecoms": other_telecoms,
|
212
|
+
"email": email,
|
213
|
+
"electronic_communication_opt_in": electronic_communication_opt_in,
|
214
|
+
"photo": photo,
|
215
|
+
"language": language,
|
216
|
+
"external_provenance": external_provenance,
|
217
|
+
"contacts": contacts,
|
218
|
+
"general_practitioners": general_practitioners,
|
219
|
+
"filing_order": filing_order,
|
220
|
+
"non_insurance_payers": non_insurance_payers,
|
221
|
+
"non_insurance_payer_associations": non_insurance_payer_associations,
|
222
|
+
"guarantor": guarantor,
|
223
|
+
"self_pay": self_pay,
|
224
|
+
"authorizations": authorizations,
|
225
|
+
"referrals": referrals,
|
226
|
+
"primary_service_facility_id": primary_service_facility_id,
|
227
|
+
"do_not_invoice_reason": do_not_invoice_reason
|
228
|
+
}.reject do |_k, v|
|
229
|
+
v == OMIT
|
230
|
+
end
|
231
|
+
end
|
232
|
+
|
233
|
+
# Deserialize a JSON object to an instance of MutablePatientWithMrn
|
234
|
+
#
|
235
|
+
# @param json_object [String]
|
236
|
+
# @return [CandidApiClient::PreEncounter::Patients::V1::Types::MutablePatientWithMrn]
|
237
|
+
def self.from_json(json_object:)
|
238
|
+
struct = JSON.parse(json_object, object_class: OpenStruct)
|
239
|
+
parsed_json = JSON.parse(json_object)
|
240
|
+
mrn = struct["mrn"]
|
241
|
+
if parsed_json["name"].nil?
|
242
|
+
name = nil
|
243
|
+
else
|
244
|
+
name = parsed_json["name"].to_json
|
245
|
+
name = CandidApiClient::PreEncounter::Common::Types::HumanName.from_json(json_object: name)
|
246
|
+
end
|
247
|
+
other_names = parsed_json["other_names"]&.map do |item|
|
248
|
+
item = item.to_json
|
249
|
+
CandidApiClient::PreEncounter::Common::Types::HumanName.from_json(json_object: item)
|
250
|
+
end
|
251
|
+
gender = struct["gender"]
|
252
|
+
birth_date = (Date.parse(parsed_json["birth_date"]) unless parsed_json["birth_date"].nil?)
|
253
|
+
social_security_number = struct["social_security_number"]
|
254
|
+
biological_sex = struct["biological_sex"]
|
255
|
+
sexual_orientation = struct["sexual_orientation"]
|
256
|
+
race = struct["race"]
|
257
|
+
ethnicity = struct["ethnicity"]
|
258
|
+
disability_status = struct["disability_status"]
|
259
|
+
marital_status = struct["marital_status"]
|
260
|
+
deceased = (DateTime.parse(parsed_json["deceased"]) unless parsed_json["deceased"].nil?)
|
261
|
+
multiple_birth = struct["multiple_birth"]
|
262
|
+
if parsed_json["primary_address"].nil?
|
263
|
+
primary_address = nil
|
264
|
+
else
|
265
|
+
primary_address = parsed_json["primary_address"].to_json
|
266
|
+
primary_address = CandidApiClient::PreEncounter::Common::Types::Address.from_json(json_object: primary_address)
|
267
|
+
end
|
268
|
+
other_addresses = parsed_json["other_addresses"]&.map do |item|
|
269
|
+
item = item.to_json
|
270
|
+
CandidApiClient::PreEncounter::Common::Types::Address.from_json(json_object: item)
|
271
|
+
end
|
272
|
+
if parsed_json["primary_telecom"].nil?
|
273
|
+
primary_telecom = nil
|
274
|
+
else
|
275
|
+
primary_telecom = parsed_json["primary_telecom"].to_json
|
276
|
+
primary_telecom = CandidApiClient::PreEncounter::Common::Types::ContactPoint.from_json(json_object: primary_telecom)
|
277
|
+
end
|
278
|
+
other_telecoms = parsed_json["other_telecoms"]&.map do |item|
|
279
|
+
item = item.to_json
|
280
|
+
CandidApiClient::PreEncounter::Common::Types::ContactPoint.from_json(json_object: item)
|
281
|
+
end
|
282
|
+
email = struct["email"]
|
283
|
+
electronic_communication_opt_in = struct["electronic_communication_opt_in"]
|
284
|
+
photo = struct["photo"]
|
285
|
+
language = struct["language"]
|
286
|
+
if parsed_json["external_provenance"].nil?
|
287
|
+
external_provenance = nil
|
288
|
+
else
|
289
|
+
external_provenance = parsed_json["external_provenance"].to_json
|
290
|
+
external_provenance = CandidApiClient::PreEncounter::Patients::V1::Types::ExternalProvenance.from_json(json_object: external_provenance)
|
291
|
+
end
|
292
|
+
contacts = parsed_json["contacts"]&.map do |item|
|
293
|
+
item = item.to_json
|
294
|
+
CandidApiClient::PreEncounter::Patients::V1::Types::Contact.from_json(json_object: item)
|
295
|
+
end
|
296
|
+
general_practitioners = parsed_json["general_practitioners"]&.map do |item|
|
297
|
+
item = item.to_json
|
298
|
+
CandidApiClient::PreEncounter::Common::Types::ExternalProvider.from_json(json_object: item)
|
299
|
+
end
|
300
|
+
if parsed_json["filing_order"].nil?
|
301
|
+
filing_order = nil
|
302
|
+
else
|
303
|
+
filing_order = parsed_json["filing_order"].to_json
|
304
|
+
filing_order = CandidApiClient::PreEncounter::Patients::V1::Types::FilingOrder.from_json(json_object: filing_order)
|
305
|
+
end
|
306
|
+
non_insurance_payers = struct["non_insurance_payers"]
|
307
|
+
non_insurance_payer_associations = parsed_json["non_insurance_payer_associations"]&.map do |item|
|
308
|
+
item = item.to_json
|
309
|
+
CandidApiClient::PreEncounter::Common::Types::CanonicalNonInsurancePayerAssociation.from_json(json_object: item)
|
310
|
+
end
|
311
|
+
if parsed_json["guarantor"].nil?
|
312
|
+
guarantor = nil
|
313
|
+
else
|
314
|
+
guarantor = parsed_json["guarantor"].to_json
|
315
|
+
guarantor = CandidApiClient::PreEncounter::Patients::V1::Types::Guarantor.from_json(json_object: guarantor)
|
316
|
+
end
|
317
|
+
self_pay = struct["self_pay"]
|
318
|
+
authorizations = parsed_json["authorizations"]&.map do |item|
|
319
|
+
item = item.to_json
|
320
|
+
CandidApiClient::PreEncounter::Patients::V1::Types::Authorization.from_json(json_object: item)
|
321
|
+
end
|
322
|
+
referrals = parsed_json["referrals"]&.map do |item|
|
323
|
+
item = item.to_json
|
324
|
+
CandidApiClient::PreEncounter::Patients::V1::Types::Referral.from_json(json_object: item)
|
325
|
+
end
|
326
|
+
primary_service_facility_id = struct["primary_service_facility_id"]
|
327
|
+
do_not_invoice_reason = struct["do_not_invoice_reason"]
|
328
|
+
new(
|
329
|
+
mrn: mrn,
|
330
|
+
name: name,
|
331
|
+
other_names: other_names,
|
332
|
+
gender: gender,
|
333
|
+
birth_date: birth_date,
|
334
|
+
social_security_number: social_security_number,
|
335
|
+
biological_sex: biological_sex,
|
336
|
+
sexual_orientation: sexual_orientation,
|
337
|
+
race: race,
|
338
|
+
ethnicity: ethnicity,
|
339
|
+
disability_status: disability_status,
|
340
|
+
marital_status: marital_status,
|
341
|
+
deceased: deceased,
|
342
|
+
multiple_birth: multiple_birth,
|
343
|
+
primary_address: primary_address,
|
344
|
+
other_addresses: other_addresses,
|
345
|
+
primary_telecom: primary_telecom,
|
346
|
+
other_telecoms: other_telecoms,
|
347
|
+
email: email,
|
348
|
+
electronic_communication_opt_in: electronic_communication_opt_in,
|
349
|
+
photo: photo,
|
350
|
+
language: language,
|
351
|
+
external_provenance: external_provenance,
|
352
|
+
contacts: contacts,
|
353
|
+
general_practitioners: general_practitioners,
|
354
|
+
filing_order: filing_order,
|
355
|
+
non_insurance_payers: non_insurance_payers,
|
356
|
+
non_insurance_payer_associations: non_insurance_payer_associations,
|
357
|
+
guarantor: guarantor,
|
358
|
+
self_pay: self_pay,
|
359
|
+
authorizations: authorizations,
|
360
|
+
referrals: referrals,
|
361
|
+
primary_service_facility_id: primary_service_facility_id,
|
362
|
+
do_not_invoice_reason: do_not_invoice_reason,
|
363
|
+
additional_properties: struct
|
364
|
+
)
|
365
|
+
end
|
366
|
+
|
367
|
+
# Serialize an instance of MutablePatientWithMrn to a JSON object
|
368
|
+
#
|
369
|
+
# @return [String]
|
370
|
+
def to_json(*_args)
|
371
|
+
@_field_set&.to_json
|
372
|
+
end
|
373
|
+
|
374
|
+
# Leveraged for Union-type generation, validate_raw attempts to parse the given
|
375
|
+
# hash and check each fields type against the current object's property
|
376
|
+
# definitions.
|
377
|
+
#
|
378
|
+
# @param obj [Object]
|
379
|
+
# @return [Void]
|
380
|
+
def self.validate_raw(obj:)
|
381
|
+
obj.mrn.is_a?(String) != false || raise("Passed value for field obj.mrn is not the expected type, validation failed.")
|
382
|
+
CandidApiClient::PreEncounter::Common::Types::HumanName.validate_raw(obj: obj.name)
|
383
|
+
obj.other_names.is_a?(Array) != false || raise("Passed value for field obj.other_names is not the expected type, validation failed.")
|
384
|
+
obj.gender&.is_a?(CandidApiClient::PreEncounter::Common::Types::Gender) != false || raise("Passed value for field obj.gender is not the expected type, validation failed.")
|
385
|
+
obj.birth_date.is_a?(Date) != false || raise("Passed value for field obj.birth_date is not the expected type, validation failed.")
|
386
|
+
obj.social_security_number&.is_a?(String) != false || raise("Passed value for field obj.social_security_number is not the expected type, validation failed.")
|
387
|
+
obj.biological_sex.is_a?(CandidApiClient::PreEncounter::Common::Types::Sex) != false || raise("Passed value for field obj.biological_sex is not the expected type, validation failed.")
|
388
|
+
obj.sexual_orientation&.is_a?(CandidApiClient::PreEncounter::Common::Types::SexualOrientation) != false || raise("Passed value for field obj.sexual_orientation is not the expected type, validation failed.")
|
389
|
+
obj.race&.is_a?(CandidApiClient::PreEncounter::Common::Types::Race) != false || raise("Passed value for field obj.race is not the expected type, validation failed.")
|
390
|
+
obj.ethnicity&.is_a?(CandidApiClient::PreEncounter::Common::Types::Ethnicity) != false || raise("Passed value for field obj.ethnicity is not the expected type, validation failed.")
|
391
|
+
obj.disability_status&.is_a?(CandidApiClient::PreEncounter::Common::Types::DisabilityStatus) != false || raise("Passed value for field obj.disability_status is not the expected type, validation failed.")
|
392
|
+
obj.marital_status&.is_a?(CandidApiClient::PreEncounter::Patients::V1::Types::MaritalStatus) != false || raise("Passed value for field obj.marital_status is not the expected type, validation failed.")
|
393
|
+
obj.deceased&.is_a?(DateTime) != false || raise("Passed value for field obj.deceased is not the expected type, validation failed.")
|
394
|
+
obj.multiple_birth&.is_a?(Integer) != false || raise("Passed value for field obj.multiple_birth is not the expected type, validation failed.")
|
395
|
+
CandidApiClient::PreEncounter::Common::Types::Address.validate_raw(obj: obj.primary_address)
|
396
|
+
obj.other_addresses.is_a?(Array) != false || raise("Passed value for field obj.other_addresses is not the expected type, validation failed.")
|
397
|
+
CandidApiClient::PreEncounter::Common::Types::ContactPoint.validate_raw(obj: obj.primary_telecom)
|
398
|
+
obj.other_telecoms.is_a?(Array) != false || raise("Passed value for field obj.other_telecoms is not the expected type, validation failed.")
|
399
|
+
obj.email&.is_a?(String) != false || raise("Passed value for field obj.email is not the expected type, validation failed.")
|
400
|
+
obj.electronic_communication_opt_in&.is_a?(Boolean) != false || raise("Passed value for field obj.electronic_communication_opt_in is not the expected type, validation failed.")
|
401
|
+
obj.photo&.is_a?(String) != false || raise("Passed value for field obj.photo is not the expected type, validation failed.")
|
402
|
+
obj.language&.is_a?(String) != false || raise("Passed value for field obj.language is not the expected type, validation failed.")
|
403
|
+
obj.external_provenance.nil? || CandidApiClient::PreEncounter::Patients::V1::Types::ExternalProvenance.validate_raw(obj: obj.external_provenance)
|
404
|
+
obj.contacts.is_a?(Array) != false || raise("Passed value for field obj.contacts is not the expected type, validation failed.")
|
405
|
+
obj.general_practitioners.is_a?(Array) != false || raise("Passed value for field obj.general_practitioners is not the expected type, validation failed.")
|
406
|
+
CandidApiClient::PreEncounter::Patients::V1::Types::FilingOrder.validate_raw(obj: obj.filing_order)
|
407
|
+
obj.non_insurance_payers&.is_a?(Array) != false || raise("Passed value for field obj.non_insurance_payers is not the expected type, validation failed.")
|
408
|
+
obj.non_insurance_payer_associations&.is_a?(Array) != false || raise("Passed value for field obj.non_insurance_payer_associations is not the expected type, validation failed.")
|
409
|
+
obj.guarantor.nil? || CandidApiClient::PreEncounter::Patients::V1::Types::Guarantor.validate_raw(obj: obj.guarantor)
|
410
|
+
obj.self_pay&.is_a?(Boolean) != false || raise("Passed value for field obj.self_pay is not the expected type, validation failed.")
|
411
|
+
obj.authorizations&.is_a?(Array) != false || raise("Passed value for field obj.authorizations is not the expected type, validation failed.")
|
412
|
+
obj.referrals&.is_a?(Array) != false || raise("Passed value for field obj.referrals is not the expected type, validation failed.")
|
413
|
+
obj.primary_service_facility_id&.is_a?(String) != false || raise("Passed value for field obj.primary_service_facility_id is not the expected type, validation failed.")
|
414
|
+
obj.do_not_invoice_reason&.is_a?(CandidApiClient::PreEncounter::Patients::V1::Types::DoNotInvoiceReason) != false || raise("Passed value for field obj.do_not_invoice_reason is not the expected type, validation failed.")
|
415
|
+
end
|
416
|
+
end
|
417
|
+
end
|
418
|
+
end
|
419
|
+
end
|
420
|
+
end
|
421
|
+
end
|
@@ -19,6 +19,7 @@ require_relative "../../../common/types/canonical_non_insurance_payer_associatio
|
|
19
19
|
require_relative "guarantor"
|
20
20
|
require_relative "authorization"
|
21
21
|
require_relative "referral"
|
22
|
+
require_relative "do_not_invoice_reason"
|
22
23
|
require "ostruct"
|
23
24
|
require "json"
|
24
25
|
|
@@ -116,6 +117,8 @@ module CandidApiClient
|
|
116
117
|
attr_reader :referrals
|
117
118
|
# @return [String]
|
118
119
|
attr_reader :primary_service_facility_id
|
120
|
+
# @return [CandidApiClient::PreEncounter::Patients::V1::Types::DoNotInvoiceReason] If this value is defined, the customer will not be invoiced.
|
121
|
+
attr_reader :do_not_invoice_reason
|
119
122
|
# @return [OpenStruct] Additional properties unmapped to the current class definition
|
120
123
|
attr_reader :additional_properties
|
121
124
|
# @return [Object]
|
@@ -172,10 +175,11 @@ module CandidApiClient
|
|
172
175
|
# @param authorizations [Array<CandidApiClient::PreEncounter::Patients::V1::Types::Authorization>]
|
173
176
|
# @param referrals [Array<CandidApiClient::PreEncounter::Patients::V1::Types::Referral>]
|
174
177
|
# @param primary_service_facility_id [String]
|
178
|
+
# @param do_not_invoice_reason [CandidApiClient::PreEncounter::Patients::V1::Types::DoNotInvoiceReason] If this value is defined, the customer will not be invoiced.
|
175
179
|
# @param additional_properties [OpenStruct] Additional properties unmapped to the current class definition
|
176
180
|
# @return [CandidApiClient::PreEncounter::Patients::V1::Types::Patient]
|
177
181
|
def initialize(id:, mrn:, organization_id:, deactivated:, version:, updated_at:, updating_user_id:, name:,
|
178
|
-
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, non_insurance_payer_associations: OMIT, guarantor: OMIT, self_pay: OMIT, authorizations: OMIT, referrals: OMIT, primary_service_facility_id: OMIT, additional_properties: nil)
|
182
|
+
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, non_insurance_payer_associations: OMIT, guarantor: OMIT, self_pay: OMIT, authorizations: OMIT, referrals: OMIT, primary_service_facility_id: OMIT, do_not_invoice_reason: OMIT, additional_properties: nil)
|
179
183
|
@id = id
|
180
184
|
@mrn = mrn
|
181
185
|
@organization_id = organization_id
|
@@ -219,6 +223,7 @@ module CandidApiClient
|
|
219
223
|
@authorizations = authorizations if authorizations != OMIT
|
220
224
|
@referrals = referrals if referrals != OMIT
|
221
225
|
@primary_service_facility_id = primary_service_facility_id if primary_service_facility_id != OMIT
|
226
|
+
@do_not_invoice_reason = do_not_invoice_reason if do_not_invoice_reason != OMIT
|
222
227
|
@additional_properties = additional_properties
|
223
228
|
@_field_set = {
|
224
229
|
"id": id,
|
@@ -259,7 +264,8 @@ module CandidApiClient
|
|
259
264
|
"self_pay": self_pay,
|
260
265
|
"authorizations": authorizations,
|
261
266
|
"referrals": referrals,
|
262
|
-
"primary_service_facility_id": primary_service_facility_id
|
267
|
+
"primary_service_facility_id": primary_service_facility_id,
|
268
|
+
"do_not_invoice_reason": do_not_invoice_reason
|
263
269
|
}.reject do |_k, v|
|
264
270
|
v == OMIT
|
265
271
|
end
|
@@ -365,6 +371,7 @@ module CandidApiClient
|
|
365
371
|
CandidApiClient::PreEncounter::Patients::V1::Types::Referral.from_json(json_object: item)
|
366
372
|
end
|
367
373
|
primary_service_facility_id = struct["primary_service_facility_id"]
|
374
|
+
do_not_invoice_reason = struct["do_not_invoice_reason"]
|
368
375
|
new(
|
369
376
|
id: id,
|
370
377
|
mrn: mrn,
|
@@ -405,6 +412,7 @@ module CandidApiClient
|
|
405
412
|
authorizations: authorizations,
|
406
413
|
referrals: referrals,
|
407
414
|
primary_service_facility_id: primary_service_facility_id,
|
415
|
+
do_not_invoice_reason: do_not_invoice_reason,
|
408
416
|
additional_properties: struct
|
409
417
|
)
|
410
418
|
end
|
@@ -462,6 +470,7 @@ module CandidApiClient
|
|
462
470
|
obj.authorizations&.is_a?(Array) != false || raise("Passed value for field obj.authorizations is not the expected type, validation failed.")
|
463
471
|
obj.referrals&.is_a?(Array) != false || raise("Passed value for field obj.referrals is not the expected type, validation failed.")
|
464
472
|
obj.primary_service_facility_id&.is_a?(String) != false || raise("Passed value for field obj.primary_service_facility_id is not the expected type, validation failed.")
|
473
|
+
obj.do_not_invoice_reason&.is_a?(CandidApiClient::PreEncounter::Patients::V1::Types::DoNotInvoiceReason) != false || raise("Passed value for field obj.do_not_invoice_reason is not the expected type, validation failed.")
|
465
474
|
end
|
466
475
|
end
|
467
476
|
end
|
@@ -104,6 +104,7 @@ module CandidApiClient
|
|
104
104
|
M_115 = "M115"
|
105
105
|
M_116 = "M116"
|
106
106
|
M_117 = "M117"
|
107
|
+
M_119 = "M119"
|
107
108
|
M_121 = "M121"
|
108
109
|
M_122 = "M122"
|
109
110
|
M_123 = "M123"
|
@@ -210,6 +211,7 @@ module CandidApiClient
|
|
210
211
|
MA_97 = "MA97"
|
211
212
|
MA_99 = "MA99"
|
212
213
|
MA_100 = "MA100"
|
214
|
+
MA_102 = "MA102"
|
213
215
|
MA_103 = "MA103"
|
214
216
|
MA_106 = "MA106"
|
215
217
|
MA_107 = "MA107"
|
@@ -249,6 +251,7 @@ module CandidApiClient
|
|
249
251
|
N_11 = "N11"
|
250
252
|
N_12 = "N12"
|
251
253
|
N_13 = "N13"
|
254
|
+
N_14 = "N14"
|
252
255
|
N_15 = "N15"
|
253
256
|
N_16 = "N16"
|
254
257
|
N_19 = "N19"
|
@@ -579,6 +582,7 @@ module CandidApiClient
|
|
579
582
|
N_362 = "N362"
|
580
583
|
N_363 = "N363"
|
581
584
|
N_364 = "N364"
|
585
|
+
N_365 = "N365"
|
582
586
|
N_366 = "N366"
|
583
587
|
N_367 = "N367"
|
584
588
|
N_368 = "N368"
|
@@ -1066,6 +1070,8 @@ module CandidApiClient
|
|
1066
1070
|
N_858 = "N858"
|
1067
1071
|
N_859 = "N859"
|
1068
1072
|
N_860 = "N860"
|
1073
|
+
N_880 = "N880"
|
1074
|
+
N_887 = "N887"
|
1069
1075
|
end
|
1070
1076
|
end
|
1071
1077
|
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.35.
|
46
|
+
headers = { "X-Fern-Language": "Ruby", "X-Fern-SDK-Name": "candidhealth", "X-Fern-SDK-Version": "0.35.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.35.
|
90
|
+
headers = { "X-Fern-Language": "Ruby", "X-Fern-SDK-Name": "candidhealth", "X-Fern-SDK-Version": "0.35.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
@@ -307,11 +307,14 @@ require_relative "candidhealth/pre_encounter/patients/v_1/types/marital_status"
|
|
307
307
|
require_relative "candidhealth/pre_encounter/patients/v_1/types/external_provenance"
|
308
308
|
require_relative "candidhealth/pre_encounter/patients/v_1/types/contact"
|
309
309
|
require_relative "candidhealth/pre_encounter/patients/v_1/types/filing_order"
|
310
|
+
require_relative "candidhealth/pre_encounter/patients/v_1/types/do_not_invoice_reason"
|
310
311
|
require_relative "candidhealth/pre_encounter/patients/v_1/types/mutable_patient"
|
312
|
+
require_relative "candidhealth/pre_encounter/patients/v_1/types/mutable_patient_with_mrn"
|
311
313
|
require_relative "candidhealth/pre_encounter/patients/v_1/types/patient"
|
312
314
|
require_relative "candidhealth/pre_encounter/patients/v_1/types/patient_page"
|
313
315
|
require_relative "candidhealth/pre_encounter/patients/v_1/types/potential_duplicate_patient"
|
314
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/invalid_mrn_error_body"
|
315
318
|
require_relative "candidhealth/pre_encounter/patients/v_1/types/authorization_unit"
|
316
319
|
require_relative "candidhealth/pre_encounter/patients/v_1/types/authorization"
|
317
320
|
require_relative "candidhealth/pre_encounter/patients/v_1/types/referral"
|
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.35.
|
4
|
+
version: 0.35.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- ''
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2024-
|
11
|
+
date: 2024-11-18 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: async-http-faraday
|
@@ -530,11 +530,14 @@ files:
|
|
530
530
|
- lib/candidhealth/pre_encounter/patients/v_1/types/authorization.rb
|
531
531
|
- lib/candidhealth/pre_encounter/patients/v_1/types/authorization_unit.rb
|
532
532
|
- lib/candidhealth/pre_encounter/patients/v_1/types/contact.rb
|
533
|
+
- lib/candidhealth/pre_encounter/patients/v_1/types/do_not_invoice_reason.rb
|
533
534
|
- lib/candidhealth/pre_encounter/patients/v_1/types/external_provenance.rb
|
534
535
|
- lib/candidhealth/pre_encounter/patients/v_1/types/filing_order.rb
|
535
536
|
- lib/candidhealth/pre_encounter/patients/v_1/types/guarantor.rb
|
537
|
+
- lib/candidhealth/pre_encounter/patients/v_1/types/invalid_mrn_error_body.rb
|
536
538
|
- lib/candidhealth/pre_encounter/patients/v_1/types/marital_status.rb
|
537
539
|
- lib/candidhealth/pre_encounter/patients/v_1/types/mutable_patient.rb
|
540
|
+
- lib/candidhealth/pre_encounter/patients/v_1/types/mutable_patient_with_mrn.rb
|
538
541
|
- lib/candidhealth/pre_encounter/patients/v_1/types/patient.rb
|
539
542
|
- lib/candidhealth/pre_encounter/patients/v_1/types/patient_page.rb
|
540
543
|
- lib/candidhealth/pre_encounter/patients/v_1/types/potential_duplicate_patient.rb
|