Class: CandidApiClient::PreEncounter::Patients::V1::Types::MutablePatient

Inherits:
Object
  • Object
show all
Defined in:
lib/candidhealth/pre_encounter/patients/v_1/types/mutable_patient.rb

Overview

An object representing patient demographics information.

Constant Summary collapse

OMIT =
Object.new

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(name:, 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) ⇒ CandidApiClient::PreEncounter::Patients::V1::Types::MutablePatient

Parameters:



150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
# File 'lib/candidhealth/pre_encounter/patients/v_1/types/mutable_patient.rb', line 150

def initialize(name:, 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)
  @name = name
  @other_names = other_names
  @gender = gender if gender != OMIT
  @birth_date = birth_date
  @social_security_number = social_security_number if social_security_number != OMIT
  @biological_sex = biological_sex
  @sexual_orientation = sexual_orientation if sexual_orientation != OMIT
  @race = race if race != OMIT
  @ethnicity = ethnicity if ethnicity != OMIT
  @disability_status = disability_status if disability_status != OMIT
  @marital_status = marital_status if marital_status != OMIT
  @deceased = deceased if deceased != OMIT
  @multiple_birth = multiple_birth if multiple_birth != OMIT
  @primary_address = primary_address
  @other_addresses = other_addresses
  @primary_telecom = primary_telecom
  @other_telecoms = other_telecoms
  @email = email if email != OMIT
  if electronic_communication_opt_in != OMIT
    @electronic_communication_opt_in = electronic_communication_opt_in
  end
  @photo = photo if photo != OMIT
  @language = language if language != OMIT
  @external_provenance = external_provenance if external_provenance != OMIT
  @contacts = contacts
  @general_practitioners = general_practitioners
  @filing_order = filing_order
  @non_insurance_payers = non_insurance_payers if non_insurance_payers != OMIT
  if non_insurance_payer_associations != OMIT
    @non_insurance_payer_associations = non_insurance_payer_associations
  end
  @guarantor = guarantor if guarantor != OMIT
  @self_pay = self_pay if self_pay != OMIT
  @authorizations = authorizations if authorizations != OMIT
  @referrals = referrals if referrals != OMIT
  @primary_service_facility_id = primary_service_facility_id if primary_service_facility_id != OMIT
  @do_not_invoice_reason = do_not_invoice_reason if do_not_invoice_reason != OMIT
  @additional_properties = additional_properties
  @_field_set = {
    "name": name,
    "other_names": other_names,
    "gender": gender,
    "birth_date": birth_date,
    "social_security_number": social_security_number,
    "biological_sex": biological_sex,
    "sexual_orientation": sexual_orientation,
    "race": race,
    "ethnicity": ethnicity,
    "disability_status": disability_status,
    "marital_status": marital_status,
    "deceased": deceased,
    "multiple_birth": multiple_birth,
    "primary_address": primary_address,
    "other_addresses": other_addresses,
    "primary_telecom": primary_telecom,
    "other_telecoms": other_telecoms,
    "email": email,
    "electronic_communication_opt_in": electronic_communication_opt_in,
    "photo": photo,
    "language": language,
    "external_provenance": external_provenance,
    "contacts": contacts,
    "general_practitioners": general_practitioners,
    "filing_order": filing_order,
    "non_insurance_payers": non_insurance_payers,
    "non_insurance_payer_associations": non_insurance_payer_associations,
    "guarantor": guarantor,
    "self_pay": self_pay,
    "authorizations": authorizations,
    "referrals": referrals,
    "primary_service_facility_id": primary_service_facility_id,
    "do_not_invoice_reason": do_not_invoice_reason
  }.reject do |_k, v|
    v == OMIT
  end
end

Instance Attribute Details

#additional_propertiesOpenStruct (readonly)

Returns Additional properties unmapped to the current class definition.

Returns:

  • (OpenStruct)

    Additional properties unmapped to the current class definition



104
105
106
# File 'lib/candidhealth/pre_encounter/patients/v_1/types/mutable_patient.rb', line 104

def additional_properties
  @additional_properties
end

#authorizationsArray<CandidApiClient::PreEncounter::Patients::V1::Types::Authorization> (readonly)



96
97
98
# File 'lib/candidhealth/pre_encounter/patients/v_1/types/mutable_patient.rb', line 96

def authorizations
  @authorizations
end

#biological_sexCandidApiClient::PreEncounter::Common::Types::Sex (readonly)

Returns The biological sex of the patient. This corresponds to the HL7 AdministrativeGender www.hl7.org/fhir/valueset-administrative-gender.html.

Returns:



46
47
48
# File 'lib/candidhealth/pre_encounter/patients/v_1/types/mutable_patient.rb', line 46

def biological_sex
  @biological_sex
end

#birth_dateDate (readonly)

Returns:

  • (Date)


40
41
42
# File 'lib/candidhealth/pre_encounter/patients/v_1/types/mutable_patient.rb', line 40

def birth_date
  @birth_date
end

#contactsArray<CandidApiClient::PreEncounter::Patients::V1::Types::Contact> (readonly)

Returns Contacts for the patient.

Returns:



82
83
84
# File 'lib/candidhealth/pre_encounter/patients/v_1/types/mutable_patient.rb', line 82

def contacts
  @contacts
end

#deceasedDateTime (readonly)

Returns Time of death for the patient. Leave unset if the patient is not deceased.

Returns:

  • (DateTime)

    Time of death for the patient. Leave unset if the patient is not deceased.



58
59
60
# File 'lib/candidhealth/pre_encounter/patients/v_1/types/mutable_patient.rb', line 58

def deceased
  @deceased
end

#disability_statusCandidApiClient::PreEncounter::Common::Types::DisabilityStatus (readonly)



54
55
56
# File 'lib/candidhealth/pre_encounter/patients/v_1/types/mutable_patient.rb', line 54

def disability_status
  @disability_status
end

#do_not_invoice_reasonCandidApiClient::PreEncounter::Patients::V1::Types::DoNotInvoiceReason (readonly)

Returns If this value is defined, the customer will not be invoiced.

Returns:



102
103
104
# File 'lib/candidhealth/pre_encounter/patients/v_1/types/mutable_patient.rb', line 102

def do_not_invoice_reason
  @do_not_invoice_reason
end

#electronic_communication_opt_inBoolean (readonly)

Returns:

  • (Boolean)


73
74
75
# File 'lib/candidhealth/pre_encounter/patients/v_1/types/mutable_patient.rb', line 73

def electronic_communication_opt_in
  @electronic_communication_opt_in
end

#emailString (readonly)

Returns:

  • (String)


71
72
73
# File 'lib/candidhealth/pre_encounter/patients/v_1/types/mutable_patient.rb', line 71

def email
  @email
end

#ethnicityCandidApiClient::PreEncounter::Common::Types::Ethnicity (readonly)



52
53
54
# File 'lib/candidhealth/pre_encounter/patients/v_1/types/mutable_patient.rb', line 52

def ethnicity
  @ethnicity
end

#external_provenanceCandidApiClient::PreEncounter::Patients::V1::Types::ExternalProvenance (readonly)

Returns Information about the upstream system that owns this patient data. Leave unset if Candid owns patient data.

Returns:



80
81
82
# File 'lib/candidhealth/pre_encounter/patients/v_1/types/mutable_patient.rb', line 80

def external_provenance
  @external_provenance
end

#filing_orderCandidApiClient::PreEncounter::Patients::V1::Types::FilingOrder (readonly)



86
87
88
# File 'lib/candidhealth/pre_encounter/patients/v_1/types/mutable_patient.rb', line 86

def filing_order
  @filing_order
end

#genderCandidApiClient::PreEncounter::Common::Types::Gender (readonly)



38
39
40
# File 'lib/candidhealth/pre_encounter/patients/v_1/types/mutable_patient.rb', line 38

def gender
  @gender
end

#general_practitionersArray<CandidApiClient::PreEncounter::Common::Types::ExternalProvider> (readonly)



84
85
86
# File 'lib/candidhealth/pre_encounter/patients/v_1/types/mutable_patient.rb', line 84

def general_practitioners
  @general_practitioners
end

#guarantorCandidApiClient::PreEncounter::Patients::V1::Types::Guarantor (readonly)



92
93
94
# File 'lib/candidhealth/pre_encounter/patients/v_1/types/mutable_patient.rb', line 92

def guarantor
  @guarantor
end

#languageString (readonly)

Returns:

  • (String)


77
78
79
# File 'lib/candidhealth/pre_encounter/patients/v_1/types/mutable_patient.rb', line 77

def language
  @language
end

#marital_statusCandidApiClient::PreEncounter::Patients::V1::Types::MaritalStatus (readonly)



56
57
58
# File 'lib/candidhealth/pre_encounter/patients/v_1/types/mutable_patient.rb', line 56

def marital_status
  @marital_status
end

#multiple_birthInteger (readonly)

Returns The number of siblings the patient was born with. Leave unset if the patient was not part of a multiple birth.

Returns:

  • (Integer)

    The number of siblings the patient was born with. Leave unset if the patient was not part of a multiple birth.



61
62
63
# File 'lib/candidhealth/pre_encounter/patients/v_1/types/mutable_patient.rb', line 61

def multiple_birth
  @multiple_birth
end

#nameCandidApiClient::PreEncounter::Common::Types::HumanName (readonly)



34
35
36
# File 'lib/candidhealth/pre_encounter/patients/v_1/types/mutable_patient.rb', line 34

def name
  @name
end

#non_insurance_payer_associationsArray<CandidApiClient::PreEncounter::Common::Types::CanonicalNonInsurancePayerAssociation> (readonly)



90
91
92
# File 'lib/candidhealth/pre_encounter/patients/v_1/types/mutable_patient.rb', line 90

def non_insurance_payer_associations
  @non_insurance_payer_associations
end

#non_insurance_payersArray<String> (readonly)

Returns:

  • (Array<String>)


88
89
90
# File 'lib/candidhealth/pre_encounter/patients/v_1/types/mutable_patient.rb', line 88

def non_insurance_payers
  @non_insurance_payers
end

#other_addressesArray<CandidApiClient::PreEncounter::Common::Types::Address> (readonly)

Returns Other addresses for the patient.

Returns:



65
66
67
# File 'lib/candidhealth/pre_encounter/patients/v_1/types/mutable_patient.rb', line 65

def other_addresses
  @other_addresses
end

#other_namesArray<CandidApiClient::PreEncounter::Common::Types::HumanName> (readonly)

Returns Other names for the patient.

Returns:



36
37
38
# File 'lib/candidhealth/pre_encounter/patients/v_1/types/mutable_patient.rb', line 36

def other_names
  @other_names
end

#other_telecomsArray<CandidApiClient::PreEncounter::Common::Types::ContactPoint> (readonly)

Returns Other phone numbers for the patient.

Returns:



69
70
71
# File 'lib/candidhealth/pre_encounter/patients/v_1/types/mutable_patient.rb', line 69

def other_telecoms
  @other_telecoms
end

#photoString (readonly)

Returns:

  • (String)


75
76
77
# File 'lib/candidhealth/pre_encounter/patients/v_1/types/mutable_patient.rb', line 75

def photo
  @photo
end

#primary_addressCandidApiClient::PreEncounter::Common::Types::Address (readonly)

Returns The primary address for the patient.

Returns:



63
64
65
# File 'lib/candidhealth/pre_encounter/patients/v_1/types/mutable_patient.rb', line 63

def primary_address
  @primary_address
end

#primary_service_facility_idString (readonly)

Returns:

  • (String)


100
101
102
# File 'lib/candidhealth/pre_encounter/patients/v_1/types/mutable_patient.rb', line 100

def primary_service_facility_id
  @primary_service_facility_id
end

#primary_telecomCandidApiClient::PreEncounter::Common::Types::ContactPoint (readonly)

Returns The primary phone number for the patient.

Returns:



67
68
69
# File 'lib/candidhealth/pre_encounter/patients/v_1/types/mutable_patient.rb', line 67

def primary_telecom
  @primary_telecom
end

#raceCandidApiClient::PreEncounter::Common::Types::Race (readonly)



50
51
52
# File 'lib/candidhealth/pre_encounter/patients/v_1/types/mutable_patient.rb', line 50

def race
  @race
end

#referralsArray<CandidApiClient::PreEncounter::Patients::V1::Types::Referral> (readonly)



98
99
100
# File 'lib/candidhealth/pre_encounter/patients/v_1/types/mutable_patient.rb', line 98

def referrals
  @referrals
end

#self_payBoolean (readonly)

Returns:

  • (Boolean)


94
95
96
# File 'lib/candidhealth/pre_encounter/patients/v_1/types/mutable_patient.rb', line 94

def self_pay
  @self_pay
end

#sexual_orientationCandidApiClient::PreEncounter::Common::Types::SexualOrientation (readonly)

Returns The sexual orientation of the patient.

Returns:



48
49
50
# File 'lib/candidhealth/pre_encounter/patients/v_1/types/mutable_patient.rb', line 48

def sexual_orientation
  @sexual_orientation
end

#social_security_numberString (readonly)

Returns:

  • (String)


42
43
44
# File 'lib/candidhealth/pre_encounter/patients/v_1/types/mutable_patient.rb', line 42

def social_security_number
  @social_security_number
end

Class Method Details

.from_json(json_object:) ⇒ CandidApiClient::PreEncounter::Patients::V1::Types::MutablePatient

Deserialize a JSON object to an instance of MutablePatient

Parameters:

  • json_object (String)

Returns:



233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
# File 'lib/candidhealth/pre_encounter/patients/v_1/types/mutable_patient.rb', line 233

def self.from_json(json_object:)
  struct = JSON.parse(json_object, object_class: OpenStruct)
  parsed_json = JSON.parse(json_object)
  if parsed_json["name"].nil?
    name = nil
  else
    name = parsed_json["name"].to_json
    name = CandidApiClient::PreEncounter::Common::Types::HumanName.from_json(json_object: name)
  end
  other_names = parsed_json["other_names"]&.map do |item|
    item = item.to_json
    CandidApiClient::PreEncounter::Common::Types::HumanName.from_json(json_object: item)
  end
  gender = struct["gender"]
  birth_date = (Date.parse(parsed_json["birth_date"]) unless parsed_json["birth_date"].nil?)
  social_security_number = struct["social_security_number"]
  biological_sex = struct["biological_sex"]
  sexual_orientation = struct["sexual_orientation"]
  race = struct["race"]
  ethnicity = struct["ethnicity"]
  disability_status = struct["disability_status"]
  marital_status = struct["marital_status"]
  deceased = (DateTime.parse(parsed_json["deceased"]) unless parsed_json["deceased"].nil?)
  multiple_birth = struct["multiple_birth"]
  if parsed_json["primary_address"].nil?
    primary_address = nil
  else
    primary_address = parsed_json["primary_address"].to_json
    primary_address = CandidApiClient::PreEncounter::Common::Types::Address.from_json(json_object: primary_address)
  end
  other_addresses = parsed_json["other_addresses"]&.map do |item|
    item = item.to_json
    CandidApiClient::PreEncounter::Common::Types::Address.from_json(json_object: item)
  end
  if parsed_json["primary_telecom"].nil?
    primary_telecom = nil
  else
    primary_telecom = parsed_json["primary_telecom"].to_json
    primary_telecom = CandidApiClient::PreEncounter::Common::Types::ContactPoint.from_json(json_object: primary_telecom)
  end
  other_telecoms = parsed_json["other_telecoms"]&.map do |item|
    item = item.to_json
    CandidApiClient::PreEncounter::Common::Types::ContactPoint.from_json(json_object: item)
  end
  email = struct["email"]
  electronic_communication_opt_in = struct["electronic_communication_opt_in"]
  photo = struct["photo"]
  language = struct["language"]
  if parsed_json["external_provenance"].nil?
    external_provenance = nil
  else
    external_provenance = parsed_json["external_provenance"].to_json
    external_provenance = CandidApiClient::PreEncounter::Patients::V1::Types::ExternalProvenance.from_json(json_object: external_provenance)
  end
  contacts = parsed_json["contacts"]&.map do |item|
    item = item.to_json
    CandidApiClient::PreEncounter::Patients::V1::Types::Contact.from_json(json_object: item)
  end
  general_practitioners = parsed_json["general_practitioners"]&.map do |item|
    item = item.to_json
    CandidApiClient::PreEncounter::Common::Types::ExternalProvider.from_json(json_object: item)
  end
  if parsed_json["filing_order"].nil?
    filing_order = nil
  else
    filing_order = parsed_json["filing_order"].to_json
    filing_order = CandidApiClient::PreEncounter::Patients::V1::Types::FilingOrder.from_json(json_object: filing_order)
  end
  non_insurance_payers = struct["non_insurance_payers"]
  non_insurance_payer_associations = parsed_json["non_insurance_payer_associations"]&.map do |item|
    item = item.to_json
    CandidApiClient::PreEncounter::Common::Types::CanonicalNonInsurancePayerAssociation.from_json(json_object: item)
  end
  if parsed_json["guarantor"].nil?
    guarantor = nil
  else
    guarantor = parsed_json["guarantor"].to_json
    guarantor = CandidApiClient::PreEncounter::Patients::V1::Types::Guarantor.from_json(json_object: guarantor)
  end
  self_pay = struct["self_pay"]
  authorizations = parsed_json["authorizations"]&.map do |item|
    item = item.to_json
    CandidApiClient::PreEncounter::Patients::V1::Types::Authorization.from_json(json_object: item)
  end
  referrals = parsed_json["referrals"]&.map do |item|
    item = item.to_json
    CandidApiClient::PreEncounter::Patients::V1::Types::Referral.from_json(json_object: item)
  end
  primary_service_facility_id = struct["primary_service_facility_id"]
  do_not_invoice_reason = struct["do_not_invoice_reason"]
  new(
    name: name,
    other_names: other_names,
    gender: gender,
    birth_date: birth_date,
    social_security_number: social_security_number,
    biological_sex: biological_sex,
    sexual_orientation: sexual_orientation,
    race: race,
    ethnicity: ethnicity,
    disability_status: disability_status,
    marital_status: marital_status,
    deceased: deceased,
    multiple_birth: multiple_birth,
    primary_address: primary_address,
    other_addresses: other_addresses,
    primary_telecom: primary_telecom,
    other_telecoms: other_telecoms,
    email: email,
    electronic_communication_opt_in: electronic_communication_opt_in,
    photo: photo,
    language: language,
    external_provenance: external_provenance,
    contacts: contacts,
    general_practitioners: general_practitioners,
    filing_order: filing_order,
    non_insurance_payers: non_insurance_payers,
    non_insurance_payer_associations: non_insurance_payer_associations,
    guarantor: guarantor,
    self_pay: self_pay,
    authorizations: authorizations,
    referrals: referrals,
    primary_service_facility_id: primary_service_facility_id,
    do_not_invoice_reason: do_not_invoice_reason,
    additional_properties: struct
  )
end

.validate_raw(obj:) ⇒ Void

Leveraged for Union-type generation, validate_raw attempts to parse the given

hash and check each fields type against the current object's property
definitions.

Parameters:

  • obj (Object)

Returns:

  • (Void)


374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
# File 'lib/candidhealth/pre_encounter/patients/v_1/types/mutable_patient.rb', line 374

def self.validate_raw(obj:)
  CandidApiClient::PreEncounter::Common::Types::HumanName.validate_raw(obj: obj.name)
  obj.other_names.is_a?(Array) != false || raise("Passed value for field obj.other_names is not the expected type, validation failed.")
  obj.gender&.is_a?(CandidApiClient::PreEncounter::Common::Types::Gender) != false || raise("Passed value for field obj.gender is not the expected type, validation failed.")
  obj.birth_date.is_a?(Date) != false || raise("Passed value for field obj.birth_date is not the expected type, validation failed.")
  obj.social_security_number&.is_a?(String) != false || raise("Passed value for field obj.social_security_number is not the expected type, validation failed.")
  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.")
  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.")
  obj.race&.is_a?(CandidApiClient::PreEncounter::Common::Types::Race) != false || raise("Passed value for field obj.race is not the expected type, validation failed.")
  obj.ethnicity&.is_a?(CandidApiClient::PreEncounter::Common::Types::Ethnicity) != false || raise("Passed value for field obj.ethnicity is not the expected type, validation failed.")
  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.")
  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.")
  obj.deceased&.is_a?(DateTime) != false || raise("Passed value for field obj.deceased is not the expected type, validation failed.")
  obj.multiple_birth&.is_a?(Integer) != false || raise("Passed value for field obj.multiple_birth is not the expected type, validation failed.")
  CandidApiClient::PreEncounter::Common::Types::Address.validate_raw(obj: obj.primary_address)
  obj.other_addresses.is_a?(Array) != false || raise("Passed value for field obj.other_addresses is not the expected type, validation failed.")
  CandidApiClient::PreEncounter::Common::Types::ContactPoint.validate_raw(obj: obj.primary_telecom)
  obj.other_telecoms.is_a?(Array) != false || raise("Passed value for field obj.other_telecoms is not the expected type, validation failed.")
  obj.email&.is_a?(String) != false || raise("Passed value for field obj.email is not the expected type, validation failed.")
  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.")
  obj.photo&.is_a?(String) != false || raise("Passed value for field obj.photo is not the expected type, validation failed.")
  obj.language&.is_a?(String) != false || raise("Passed value for field obj.language is not the expected type, validation failed.")
  obj.external_provenance.nil? || CandidApiClient::PreEncounter::Patients::V1::Types::ExternalProvenance.validate_raw(obj: obj.external_provenance)
  obj.contacts.is_a?(Array) != false || raise("Passed value for field obj.contacts is not the expected type, validation failed.")
  obj.general_practitioners.is_a?(Array) != false || raise("Passed value for field obj.general_practitioners is not the expected type, validation failed.")
  CandidApiClient::PreEncounter::Patients::V1::Types::FilingOrder.validate_raw(obj: obj.filing_order)
  obj.non_insurance_payers&.is_a?(Array) != false || raise("Passed value for field obj.non_insurance_payers is not the expected type, validation failed.")
  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.")
  obj.guarantor.nil? || CandidApiClient::PreEncounter::Patients::V1::Types::Guarantor.validate_raw(obj: obj.guarantor)
  obj.self_pay&.is_a?(Boolean) != false || raise("Passed value for field obj.self_pay is not the expected type, validation failed.")
  obj.authorizations&.is_a?(Array) != false || raise("Passed value for field obj.authorizations is not the expected type, validation failed.")
  obj.referrals&.is_a?(Array) != false || raise("Passed value for field obj.referrals is not the expected type, validation failed.")
  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.")
  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.")
end

Instance Method Details

#to_json(*_args) ⇒ String

Serialize an instance of MutablePatient to a JSON object

Returns:

  • (String)


364
365
366
# File 'lib/candidhealth/pre_encounter/patients/v_1/types/mutable_patient.rb', line 364

def to_json(*_args)
  @_field_set&.to_json
end