Class: CandidApiClient::PreEncounter::Patients::V1::Types::MutablePatientWithMrn

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

Constant Summary collapse

OMIT =
Object.new

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(mrn:, 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::MutablePatientWithMrn

Parameters:



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
228
229
230
231
# File 'lib/candidhealth/pre_encounter/patients/v_1/types/mutable_patient_with_mrn.rb', line 152

def initialize(mrn:, 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)
  @mrn = mrn
  @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 = {
    "mrn": mrn,
    "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



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

def additional_properties
  @additional_properties
end

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



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

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:



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

def biological_sex
  @biological_sex
end

#birth_dateDate (readonly)

Returns:

  • (Date)


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

def birth_date
  @birth_date
end

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

Returns Contacts for the patient.

Returns:



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

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.



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

def deceased
  @deceased
end

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



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

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:



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

def do_not_invoice_reason
  @do_not_invoice_reason
end

#electronic_communication_opt_inBoolean (readonly)

Returns:

  • (Boolean)


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

def electronic_communication_opt_in
  @electronic_communication_opt_in
end

#emailString (readonly)

Returns:

  • (String)


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

def email
  @email
end

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



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

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:



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

def external_provenance
  @external_provenance
end

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



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

def filing_order
  @filing_order
end

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



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

def gender
  @gender
end

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



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

def general_practitioners
  @general_practitioners
end

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



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

def guarantor
  @guarantor
end

#languageString (readonly)

Returns:

  • (String)


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

def language
  @language
end

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



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

def marital_status
  @marital_status
end

#mrnString (readonly)

Returns The medical record number for the patient.

Returns:

  • (String)

    The medical record number for the patient.



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

def mrn
  @mrn
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.



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

def multiple_birth
  @multiple_birth
end

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



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

def name
  @name
end

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



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

def non_insurance_payer_associations
  @non_insurance_payer_associations
end

#non_insurance_payersArray<String> (readonly)

Returns:

  • (Array<String>)


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

def non_insurance_payers
  @non_insurance_payers
end

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

Returns Other addresses for the patient.

Returns:



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

def other_addresses
  @other_addresses
end

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

Returns Other names for the patient.

Returns:



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

def other_names
  @other_names
end

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

Returns Other phone numbers for the patient.

Returns:



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

def other_telecoms
  @other_telecoms
end

#photoString (readonly)

Returns:

  • (String)


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

def photo
  @photo
end

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

Returns The primary address for the patient.

Returns:



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

def primary_address
  @primary_address
end

#primary_service_facility_idString (readonly)

Returns:

  • (String)


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

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:



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

def primary_telecom
  @primary_telecom
end

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



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

def race
  @race
end

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



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

def referrals
  @referrals
end

#self_payBoolean (readonly)

Returns:

  • (Boolean)


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

def self_pay
  @self_pay
end

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

Returns The sexual orientation of the patient.

Returns:



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

def sexual_orientation
  @sexual_orientation
end

#social_security_numberString (readonly)

Returns:

  • (String)


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

def social_security_number
  @social_security_number
end

Class Method Details

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

Deserialize a JSON object to an instance of MutablePatientWithMrn



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
360
361
362
363
364
365
# File 'lib/candidhealth/pre_encounter/patients/v_1/types/mutable_patient_with_mrn.rb', line 237

def self.from_json(json_object:)
  struct = JSON.parse(json_object, object_class: OpenStruct)
  parsed_json = JSON.parse(json_object)
  mrn = struct["mrn"]
  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(
    mrn: mrn,
    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)


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
409
410
411
412
413
414
415
# File 'lib/candidhealth/pre_encounter/patients/v_1/types/mutable_patient_with_mrn.rb', line 380

def self.validate_raw(obj:)
  obj.mrn.is_a?(String) != false || raise("Passed value for field obj.mrn is not the expected type, validation failed.")
  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 MutablePatientWithMrn to a JSON object

Returns:

  • (String)


370
371
372
# File 'lib/candidhealth/pre_encounter/patients/v_1/types/mutable_patient_with_mrn.rb', line 370

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