Class: BloomApi::Organization

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

Overview

A class representing an organizational provider

Instance Method Summary collapse

Methods inherited from Provider

#business_address, #deactivation_date, #deactivation_reason, #initialize, #npi, #other_identifiers, #other_name_type, #practice_address, #reactivation_date, #recorded_at, #replacement_npi, #sole_proprietor?, #specialties, #taxonomy_groups, #type, #updated_at

Constructor Details

This class inherits a constructor from BloomApi::Provider

Instance Method Details

#employer_identification_numberString

Returns the organization's employer identification number.

Returns:

  • (String)

    the organization's employer identification number


7
8
9
10
11
12
13
14
# File 'lib/bloom_api/organization.rb', line 7

def employer_identification_number
  case @raw_provider['employer_identification_number']
  when '<UNAVAIL>'
    nil
  else
    @raw_provider['employer_identification_number']
  end
end

#is_subpart?boolean

designates whether the organization is a part of another

Returns:

  • (boolean)

    true if part of another organization

  • (boolean)

    false if not part of another organization


19
20
21
22
23
24
25
26
27
28
# File 'lib/bloom_api/organization.rb', line 19

def is_subpart?
  case @raw_provider['organization_subpart']
  when 'yes'
    true
  when 'no'
    false
  else
    nil
  end
end

#nameString

Returns the business name of the organization.

Returns:

  • (String)

    the business name of the organization


31
32
33
# File 'lib/bloom_api/organization.rb', line 31

def name
  @raw_provider['business_name']
end

#officialOrganizationOfficial

Returns the organization's administrative official.

Returns:


36
37
38
39
40
# File 'lib/bloom_api/organization.rb', line 36

def official
  unless @raw_provider['organization_official'].nil?
    OrganizationOfficial.new(@raw_provider['organization_official'])
  end
end

#other_nameString

Returns an alternate name for the organization.

Returns:

  • (String)

    an alternate name for the organization


43
44
45
# File 'lib/bloom_api/organization.rb', line 43

def other_name
  @raw_provider['other_name']
end

#parent_organizationOrganization

Returns:

  • (Organization)

    if the provider has a parent organization

  • nil if there is no parent organization


49
50
51
52
53
# File 'lib/bloom_api/organization.rb', line 49

def parent_organization
  unless @raw_provider['parent_org'].nil?
    Organization.new(@raw_provider['parent_org'])
  end
end

#tax_identification_numberString

Returns the organization's tax identification number.

Returns:

  • (String)

    the organization's tax identification number


56
57
58
# File 'lib/bloom_api/organization.rb', line 56

def tax_identification_number
  @raw_provider['tax_identification_number']
end