Class: BloomApi::Specialty

Inherits:
Object
  • Object
show all
Defined in:
lib/bloom_api/specialty.rb

Overview

An class representing a provider specialty

Instance Method Summary collapse

Constructor Details

#initialize(raw_detail) ⇒ Specialty

Creates a new specialty

Parameters:

  • raw_detail (Hash)

    A hash representation of a json specialty object from the Bloom Api



9
10
11
# File 'lib/bloom_api/specialty.rb', line 9

def initialize raw_detail
  @raw_detail = raw_detail
end

Instance Method Details

#license_numberString

Returns the license number associated with the specialty.

Returns:

  • (String)

    the license number associated with the specialty



15
16
17
# File 'lib/bloom_api/specialty.rb', line 15

def license_number
  @raw_detail['license_number']
end

#license_number_stateString

Returns the U.S. state in which the specialty applies.

Returns:

  • (String)

    the U.S. state in which the specialty applies



21
22
23
# File 'lib/bloom_api/specialty.rb', line 21

def license_number_state
  @raw_detail['license_number_state']
end

#primary_specialty?boolean

Returns:

  • (boolean)

    true if this is the provider’s primary specialty

  • (boolean)

    false if this is not the provider’s primary specialty



27
28
29
30
31
32
33
34
35
36
# File 'lib/bloom_api/specialty.rb', line 27

def primary_specialty?
  case @raw_detail['taxonomy_switch']
  when 'yes'
    true
  when 'no'
    false
  else
    nil
  end
end

#specialty_codeString

Returns the specialty’s code.

Returns:

  • (String)

    the specialty’s code



39
40
41
# File 'lib/bloom_api/specialty.rb', line 39

def specialty_code
  @raw_detail['healthcare_taxonomy_code']
end