Class: VericredClient::Provider

Inherits:
Object
  • Object
show all
Defined in:
lib/vericred_client/models/provider.rb

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(attributes = {}) ⇒ Provider

Initializes the object

Parameters:

  • attributes (Hash) (defaults to: {})

    Model attributes in the form of hash



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
366
367
368
369
370
371
372
373
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
409
410
411
412
413
# File 'lib/vericred_client/models/provider.rb', line 291

def initialize(attributes = {})
  return unless attributes.is_a?(Hash)

  # convert string to symbol for hash key
  attributes = attributes.each_with_object({}){|(k,v), h| h[k.to_sym] = v}

  if attributes.has_key?(:'accepting_change_of_payor_patients')
    self.accepting_change_of_payor_patients = attributes[:'accepting_change_of_payor_patients']
  end

  if attributes.has_key?(:'accepting_medicaid_patients')
    self.accepting_medicaid_patients = attributes[:'accepting_medicaid_patients']
  end

  if attributes.has_key?(:'accepting_medicare_patients')
    self.accepting_medicare_patients = attributes[:'accepting_medicare_patients']
  end

  if attributes.has_key?(:'accepting_private_patients')
    self.accepting_private_patients = attributes[:'accepting_private_patients']
  end

  if attributes.has_key?(:'accepting_referral_patients')
    self.accepting_referral_patients = attributes[:'accepting_referral_patients']
  end

  if attributes.has_key?(:'city')
    self.city = attributes[:'city']
  end

  if attributes.has_key?(:'email')
    self.email = attributes[:'email']
  end

  if attributes.has_key?(:'gender')
    self.gender = attributes[:'gender']
  end

  if attributes.has_key?(:'first_name')
    self.first_name = attributes[:'first_name']
  end

  if attributes.has_key?(:'hios_ids')
    if (value = attributes[:'hios_ids']).is_a?(Array)
      self.hios_ids = value
    end
  end

  if attributes.has_key?(:'id')
    self.id = attributes[:'id']
  end

  if attributes.has_key?(:'last_name')
    self.last_name = attributes[:'last_name']
  end

  if attributes.has_key?(:'latitude')
    self.latitude = attributes[:'latitude']
  end

  if attributes.has_key?(:'longitude')
    self.longitude = attributes[:'longitude']
  end

  if attributes.has_key?(:'middle_name')
    self.middle_name = attributes[:'middle_name']
  end

  if attributes.has_key?(:'network_ids')
    if (value = attributes[:'network_ids']).is_a?(Array)
      self.network_ids = value
    end
  end

  if attributes.has_key?(:'personal_phone')
    self.personal_phone = attributes[:'personal_phone']
  end

  if attributes.has_key?(:'phone')
    self.phone = attributes[:'phone']
  end

  if attributes.has_key?(:'presentation_name')
    self.presentation_name = attributes[:'presentation_name']
  end

  if attributes.has_key?(:'specialty')
    self.specialty = attributes[:'specialty']
  end

  if attributes.has_key?(:'state')
    self.state = attributes[:'state']
  end

  if attributes.has_key?(:'state_id')
    self.state_id = attributes[:'state_id']
  end

  if attributes.has_key?(:'street_line_1')
    self.street_line_1 = attributes[:'street_line_1']
  end

  if attributes.has_key?(:'street_line_2')
    self.street_line_2 = attributes[:'street_line_2']
  end

  if attributes.has_key?(:'suffix')
    self.suffix = attributes[:'suffix']
  end

  if attributes.has_key?(:'title')
    self.title = attributes[:'title']
  end

  if attributes.has_key?(:'type')
    self.type = attributes[:'type']
  end

  if attributes.has_key?(:'zip_code')
    self.zip_code = attributes[:'zip_code']
  end

end

Instance Attribute Details

#accepting_change_of_payor_patientsObject

Is this provider accepting patients with a change of insurance?



137
138
139
# File 'lib/vericred_client/models/provider.rb', line 137

def accepting_change_of_payor_patients
  @accepting_change_of_payor_patients
end

#accepting_medicaid_patientsObject

Is this provider accepting new Medicaid patients?



140
141
142
# File 'lib/vericred_client/models/provider.rb', line 140

def accepting_medicaid_patients
  @accepting_medicaid_patients
end

#accepting_medicare_patientsObject

Is this provider accepting new Medicare patients?



143
144
145
# File 'lib/vericred_client/models/provider.rb', line 143

def accepting_medicare_patients
  @accepting_medicare_patients
end

#accepting_private_patientsObject

Is this provider accepting new patients with private insurance?



146
147
148
# File 'lib/vericred_client/models/provider.rb', line 146

def accepting_private_patients
  @accepting_private_patients
end

#accepting_referral_patientsObject

Is this provider accepting new patients via referrals?



149
150
151
# File 'lib/vericred_client/models/provider.rb', line 149

def accepting_referral_patients
  @accepting_referral_patients
end

#cityObject

City name (e.g. Springfield).



152
153
154
# File 'lib/vericred_client/models/provider.rb', line 152

def city
  @city
end

#emailObject

Primary email address to contact the provider.



155
156
157
# File 'lib/vericred_client/models/provider.rb', line 155

def email
  @email
end

#first_nameObject

Given name for the provider.



161
162
163
# File 'lib/vericred_client/models/provider.rb', line 161

def first_name
  @first_name
end

#genderObject

Provider’s gender (M or F)



158
159
160
# File 'lib/vericred_client/models/provider.rb', line 158

def gender
  @gender
end

#hios_idsObject

List of HIOS ids for this provider



164
165
166
# File 'lib/vericred_client/models/provider.rb', line 164

def hios_ids
  @hios_ids
end

#idObject

National Provider Index (NPI) number



167
168
169
# File 'lib/vericred_client/models/provider.rb', line 167

def id
  @id
end

#last_nameObject

Family name for the provider.



170
171
172
# File 'lib/vericred_client/models/provider.rb', line 170

def last_name
  @last_name
end

#latitudeObject

Latitude of provider



173
174
175
# File 'lib/vericred_client/models/provider.rb', line 173

def latitude
  @latitude
end

#longitudeObject

Longitude of provider



176
177
178
# File 'lib/vericred_client/models/provider.rb', line 176

def longitude
  @longitude
end

#middle_nameObject

Middle name for the provider.



179
180
181
# File 'lib/vericred_client/models/provider.rb', line 179

def middle_name
  @middle_name
end

#network_idsObject

Array of network ids



182
183
184
# File 'lib/vericred_client/models/provider.rb', line 182

def network_ids
  @network_ids
end

#personal_phoneObject

Personal contact phone for the provider.



185
186
187
# File 'lib/vericred_client/models/provider.rb', line 185

def personal_phone
  @personal_phone
end

#phoneObject

Office phone for the provider



188
189
190
# File 'lib/vericred_client/models/provider.rb', line 188

def phone
  @phone
end

#presentation_nameObject

Preferred name for display (e.g. Dr. Francis White may prefer Dr. Frank White)



191
192
193
# File 'lib/vericred_client/models/provider.rb', line 191

def presentation_name
  @presentation_name
end

#specialtyObject

Name of the primary Specialty



194
195
196
# File 'lib/vericred_client/models/provider.rb', line 194

def specialty
  @specialty
end

#stateObject

State code for the provider’s address (e.g. NY).



197
198
199
# File 'lib/vericred_client/models/provider.rb', line 197

def state
  @state
end

#state_idObject

Foreign key to States



200
201
202
# File 'lib/vericred_client/models/provider.rb', line 200

def state_id
  @state_id
end

#street_line_1Object

First line of the provider’s street address.



203
204
205
# File 'lib/vericred_client/models/provider.rb', line 203

def street_line_1
  @street_line_1
end

#street_line_2Object

Second line of the provider’s street address.



206
207
208
# File 'lib/vericred_client/models/provider.rb', line 206

def street_line_2
  @street_line_2
end

#suffixObject

Suffix for the provider’s name (e.g. Jr)



209
210
211
# File 'lib/vericred_client/models/provider.rb', line 209

def suffix
  @suffix
end

#titleObject

Professional title for the provider (e.g. Dr).



212
213
214
# File 'lib/vericred_client/models/provider.rb', line 212

def title
  @title
end

#typeObject

Type of NPI number (individual provider vs organization).



215
216
217
# File 'lib/vericred_client/models/provider.rb', line 215

def type
  @type
end

#zip_codeObject

Postal code for the provider’s address (e.g. 11215)



218
219
220
# File 'lib/vericred_client/models/provider.rb', line 218

def zip_code
  @zip_code
end

Class Method Details

.attribute_mapObject

Attribute mapping from ruby-style variable name to JSON key.



222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
# File 'lib/vericred_client/models/provider.rb', line 222

def self.attribute_map
  {
    :'accepting_change_of_payor_patients' => :'accepting_change_of_payor_patients',
    :'accepting_medicaid_patients' => :'accepting_medicaid_patients',
    :'accepting_medicare_patients' => :'accepting_medicare_patients',
    :'accepting_private_patients' => :'accepting_private_patients',
    :'accepting_referral_patients' => :'accepting_referral_patients',
    :'city' => :'city',
    :'email' => :'email',
    :'gender' => :'gender',
    :'first_name' => :'first_name',
    :'hios_ids' => :'hios_ids',
    :'id' => :'id',
    :'last_name' => :'last_name',
    :'latitude' => :'latitude',
    :'longitude' => :'longitude',
    :'middle_name' => :'middle_name',
    :'network_ids' => :'network_ids',
    :'personal_phone' => :'personal_phone',
    :'phone' => :'phone',
    :'presentation_name' => :'presentation_name',
    :'specialty' => :'specialty',
    :'state' => :'state',
    :'state_id' => :'state_id',
    :'street_line_1' => :'street_line_1',
    :'street_line_2' => :'street_line_2',
    :'suffix' => :'suffix',
    :'title' => :'title',
    :'type' => :'type',
    :'zip_code' => :'zip_code'
  }
end

.swagger_typesObject

Attribute type mapping.



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
# File 'lib/vericred_client/models/provider.rb', line 256

def self.swagger_types
  {
    :'accepting_change_of_payor_patients' => :'BOOLEAN',
    :'accepting_medicaid_patients' => :'BOOLEAN',
    :'accepting_medicare_patients' => :'BOOLEAN',
    :'accepting_private_patients' => :'BOOLEAN',
    :'accepting_referral_patients' => :'BOOLEAN',
    :'city' => :'String',
    :'email' => :'String',
    :'gender' => :'String',
    :'first_name' => :'String',
    :'hios_ids' => :'Array<String>',
    :'id' => :'Integer',
    :'last_name' => :'String',
    :'latitude' => :'Float',
    :'longitude' => :'Float',
    :'middle_name' => :'String',
    :'network_ids' => :'Array<Integer>',
    :'personal_phone' => :'String',
    :'phone' => :'String',
    :'presentation_name' => :'String',
    :'specialty' => :'String',
    :'state' => :'String',
    :'state_id' => :'Integer',
    :'street_line_1' => :'String',
    :'street_line_2' => :'String',
    :'suffix' => :'String',
    :'title' => :'String',
    :'type' => :'String',
    :'zip_code' => :'String'
  }
end

Instance Method Details

#==(o) ⇒ Object

Checks equality by comparing each attribute.

Parameters:

  • Object (Object)

    to be compared



430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
# File 'lib/vericred_client/models/provider.rb', line 430

def ==(o)
  return true if self.equal?(o)
  self.class == o.class &&
      accepting_change_of_payor_patients == o.accepting_change_of_payor_patients &&
      accepting_medicaid_patients == o.accepting_medicaid_patients &&
      accepting_medicare_patients == o.accepting_medicare_patients &&
      accepting_private_patients == o.accepting_private_patients &&
      accepting_referral_patients == o.accepting_referral_patients &&
      city == o.city &&
      email == o.email &&
      gender == o.gender &&
      first_name == o.first_name &&
      hios_ids == o.hios_ids &&
      id == o.id &&
      last_name == o.last_name &&
      latitude == o.latitude &&
      longitude == o.longitude &&
      middle_name == o.middle_name &&
      network_ids == o.network_ids &&
      personal_phone == o.personal_phone &&
      phone == o.phone &&
      presentation_name == o.presentation_name &&
      specialty == o.specialty &&
      state == o.state &&
      state_id == o.state_id &&
      street_line_1 == o.street_line_1 &&
      street_line_2 == o.street_line_2 &&
      suffix == o.suffix &&
      title == o.title &&
      type == o.type &&
      zip_code == o.zip_code
end

#_deserialize(type, value) ⇒ Object

Deserializes the data based on type

Parameters:

  • string

    type Data type

  • string

    value Value to be deserialized

Returns:

  • (Object)

    Deserialized data



499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
# File 'lib/vericred_client/models/provider.rb', line 499

def _deserialize(type, value)
  case type.to_sym
  when :DateTime
    DateTime.parse(value)
  when :Date
    Date.parse(value)
  when :String
    value.to_s
  when :Integer
    value.to_i
  when :Float
    value.to_f
  when :BOOLEAN
    if value.to_s =~ /^(true|t|yes|y|1)$/i
      true
    else
      false
    end
  when :Object
    # generic object (usually a Hash), return directly
    value
  when /\AArray<(?<inner_type>.+)>\z/
    inner_type = Regexp.last_match[:inner_type]
    value.map { |v| _deserialize(inner_type, v) }
  when /\AHash<(?<k_type>.+), (?<v_type>.+)>\z/
    k_type = Regexp.last_match[:k_type]
    v_type = Regexp.last_match[:v_type]
    {}.tap do |hash|
      value.each do |k, v|
        hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
      end
    end
  else # model
    temp_model = VericredClient.const_get(type).new
    temp_model.build_from_hash(value)
  end
end

#_to_hash(value) ⇒ Hash

Outputs non-array value in the form of hash For object, use to_hash. Otherwise, just return the value

Parameters:

  • value (Object)

    Any valid value

Returns:

  • (Hash)

    Returns the value in the form of hash



565
566
567
568
569
570
571
572
573
574
575
576
577
# File 'lib/vericred_client/models/provider.rb', line 565

def _to_hash(value)
  if value.is_a?(Array)
    value.compact.map{ |v| _to_hash(v) }
  elsif value.is_a?(Hash)
    {}.tap do |hash|
      value.each { |k, v| hash[k] = _to_hash(v) }
    end
  elsif value.respond_to? :to_hash
    value.to_hash
  else
    value
  end
end

#build_from_hash(attributes) ⇒ Object

Builds the object from hash

Parameters:

  • attributes (Hash)

    Model attributes in the form of hash

Returns:

  • (Object)

    Returns the model itself



478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
# File 'lib/vericred_client/models/provider.rb', line 478

def build_from_hash(attributes)
  return nil unless attributes.is_a?(Hash)
  self.class.swagger_types.each_pair do |key, type|
    if type =~ /^Array<(.*)>/i
      # check to ensure the input is an array given that the the attribute
      # is documented as an array but the input is not
      if attributes[self.class.attribute_map[key]].is_a?(Array)
        self.send("#{key}=", attributes[self.class.attribute_map[key]].map{ |v| _deserialize($1, v) } )
      end
    elsif !attributes[self.class.attribute_map[key]].nil?
      self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
    end # or else data not found in attributes(hash), not an issue as the data can be optional
  end

  self
end

#eql?(o) ⇒ Boolean

Parameters:

  • Object (Object)

    to be compared

Returns:

  • (Boolean)

See Also:

  • `==` method


465
466
467
# File 'lib/vericred_client/models/provider.rb', line 465

def eql?(o)
  self == o
end

#hashFixnum

Calculates hash code according to all attributes.

Returns:

  • (Fixnum)

    Hash code



471
472
473
# File 'lib/vericred_client/models/provider.rb', line 471

def hash
  [accepting_change_of_payor_patients, accepting_medicaid_patients, accepting_medicare_patients, accepting_private_patients, accepting_referral_patients, city, email, gender, first_name, hios_ids, id, last_name, latitude, longitude, middle_name, network_ids, personal_phone, phone, presentation_name, specialty, state, state_id, street_line_1, street_line_2, suffix, title, type, zip_code].hash
end

#list_invalid_propertiesObject

Show invalid properties with the reasons. Usually used together with valid?

Returns:

  • Array for valid properies with the reasons



417
418
419
420
# File 'lib/vericred_client/models/provider.rb', line 417

def list_invalid_properties
  invalid_properties = Array.new
  return invalid_properties
end

#to_bodyHash

to_body is an alias to to_hash (backward compatibility)

Returns:

  • (Hash)

    Returns the object in the form of hash



545
546
547
# File 'lib/vericred_client/models/provider.rb', line 545

def to_body
  to_hash
end

#to_hashHash

Returns the object in the form of hash

Returns:

  • (Hash)

    Returns the object in the form of hash



551
552
553
554
555
556
557
558
559
# File 'lib/vericred_client/models/provider.rb', line 551

def to_hash
  hash = {}
  self.class.attribute_map.each_pair do |attr, param|
    value = self.send(attr)
    next if value.nil?
    hash[param] = _to_hash(value)
  end
  hash
end

#to_sString

Returns the string representation of the object

Returns:

  • (String)

    String presentation of the object



539
540
541
# File 'lib/vericred_client/models/provider.rb', line 539

def to_s
  to_hash.to_s
end

#valid?Boolean

Check to see if the all the properties in the model are valid

Returns:

  • (Boolean)

    true if the model is valid



424
425
426
# File 'lib/vericred_client/models/provider.rb', line 424

def valid?
  return true
end