Class: CandidApiClient::OrganizationProviders::V2::Types::OrganizationProvider
- Inherits:
-
Object
- Object
- CandidApiClient::OrganizationProviders::V2::Types::OrganizationProvider
- Defined in:
- lib/candidhealth/organization_providers/v_2/types/organization_provider.rb
Constant Summary collapse
- OMIT =
Object.new
Instance Attribute Summary collapse
-
#additional_properties ⇒ OpenStruct
readonly
Additional properties unmapped to the current class definition.
-
#addresses ⇒ Array<CandidApiClient::OrganizationProviders::V2::Types::OrganizationProviderAddress>
readonly
The addresses associated with this provider.
-
#employment_start_date ⇒ String
readonly
The employment start date for the provider.
-
#employment_status ⇒ CandidApiClient::OrganizationProviders::V2::Types::EmploymentStatus
readonly
The employment status for the provider.
-
#employment_termination_date ⇒ String
readonly
The employment termination date for the provider.
-
#first_name ⇒ String
readonly
The first name of the provider, if the provider is an individual.
-
#is_billing ⇒ Boolean
readonly
Whether the provider can be used to bill services.
-
#is_rendering ⇒ Boolean
readonly
Whether the provider can be used to render services.
-
#last_name ⇒ String
readonly
The last name of the provider, if the provider is an individual.
-
#license_type ⇒ CandidApiClient::OrganizationProviders::V2::Types::LicenseType
readonly
The type of license that the provider holds.
-
#medicaid_provider_id ⇒ String
readonly
The medicaid provider ID for the provider.
-
#npi ⇒ String
readonly
The NPI of the provider.
-
#organization_name ⇒ String
readonly
The name of the provider, if the provider is an organization.
-
#organization_provider_id ⇒ String
readonly
Auto-generated ID set on creation.
-
#provider_type ⇒ CandidApiClient::OrganizationProviders::V2::Types::ProviderType
readonly
Whether the provider is an individual (NPPES Type 1) or organization (NPPES Type 2) provider.
-
#ptan ⇒ String
readonly
The Provider Transaction Access Number for the provider.
-
#tax_id ⇒ String
readonly
If the provider has a contract with insurance, this must be the same tax ID given to the payer on an IRS W-9 form completed during contracting.
-
#taxonomy_code ⇒ String
readonly
A code designating classification and specialization.
Class Method Summary collapse
-
.from_json(json_object:) ⇒ CandidApiClient::OrganizationProviders::V2::Types::OrganizationProvider
Deserialize a JSON object to an instance of OrganizationProvider.
-
.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.
Instance Method Summary collapse
- #initialize(organization_provider_id:, employment_status:, npi:, is_rendering:, is_billing:, provider_type:, license_type:, employment_start_date: OMIT, employment_termination_date: OMIT, first_name: OMIT, last_name: OMIT, organization_name: OMIT, tax_id: OMIT, taxonomy_code: OMIT, ptan: OMIT, medicaid_provider_id: OMIT, addresses: OMIT, additional_properties: nil) ⇒ CandidApiClient::OrganizationProviders::V2::Types::OrganizationProvider constructor
-
#to_json(*_args) ⇒ String
Serialize an instance of OrganizationProvider to a JSON object.
Constructor Details
#initialize(organization_provider_id:, employment_status:, npi:, is_rendering:, is_billing:, provider_type:, license_type:, employment_start_date: OMIT, employment_termination_date: OMIT, first_name: OMIT, last_name: OMIT, organization_name: OMIT, tax_id: OMIT, taxonomy_code: OMIT, ptan: OMIT, medicaid_provider_id: OMIT, addresses: OMIT, additional_properties: nil) ⇒ CandidApiClient::OrganizationProviders::V2::Types::OrganizationProvider
82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 |
# File 'lib/candidhealth/organization_providers/v_2/types/organization_provider.rb', line 82 def initialize(organization_provider_id:, employment_status:, npi:, is_rendering:, is_billing:, provider_type:, license_type:, employment_start_date: OMIT, employment_termination_date: OMIT, first_name: OMIT, last_name: OMIT, organization_name: OMIT, tax_id: OMIT, taxonomy_code: OMIT, ptan: OMIT, medicaid_provider_id: OMIT, addresses: OMIT, additional_properties: nil) @organization_provider_id = organization_provider_id @employment_status = employment_status @employment_start_date = employment_start_date if employment_start_date != OMIT @employment_termination_date = employment_termination_date if employment_termination_date != OMIT @npi = npi @is_rendering = is_rendering @is_billing = is_billing @first_name = first_name if first_name != OMIT @last_name = last_name if last_name != OMIT @organization_name = organization_name if organization_name != OMIT @provider_type = provider_type @tax_id = tax_id if tax_id != OMIT @taxonomy_code = taxonomy_code if taxonomy_code != OMIT @license_type = license_type @ptan = ptan if ptan != OMIT @medicaid_provider_id = medicaid_provider_id if medicaid_provider_id != OMIT @addresses = addresses if addresses != OMIT @additional_properties = additional_properties @_field_set = { "organization_provider_id": organization_provider_id, "employment_status": employment_status, "employment_start_date": employment_start_date, "employment_termination_date": employment_termination_date, "npi": npi, "is_rendering": is_rendering, "is_billing": is_billing, "first_name": first_name, "last_name": last_name, "organization_name": organization_name, "provider_type": provider_type, "tax_id": tax_id, "taxonomy_code": taxonomy_code, "license_type": license_type, "ptan": ptan, "medicaid_provider_id": medicaid_provider_id, "addresses": addresses }.reject do |_k, v| v == OMIT end end |
Instance Attribute Details
#additional_properties ⇒ OpenStruct (readonly)
Returns Additional properties unmapped to the current class definition.
53 54 55 |
# File 'lib/candidhealth/organization_providers/v_2/types/organization_provider.rb', line 53 def additional_properties @additional_properties end |
#addresses ⇒ Array<CandidApiClient::OrganizationProviders::V2::Types::OrganizationProviderAddress> (readonly)
Returns The addresses associated with this provider.
51 52 53 |
# File 'lib/candidhealth/organization_providers/v_2/types/organization_provider.rb', line 51 def addresses @addresses end |
#employment_start_date ⇒ String (readonly)
Returns The employment start date for the provider.
20 21 22 |
# File 'lib/candidhealth/organization_providers/v_2/types/organization_provider.rb', line 20 def employment_start_date @employment_start_date end |
#employment_status ⇒ CandidApiClient::OrganizationProviders::V2::Types::EmploymentStatus (readonly)
Returns The employment status for the provider.
18 19 20 |
# File 'lib/candidhealth/organization_providers/v_2/types/organization_provider.rb', line 18 def employment_status @employment_status end |
#employment_termination_date ⇒ String (readonly)
Returns The employment termination date for the provider.
22 23 24 |
# File 'lib/candidhealth/organization_providers/v_2/types/organization_provider.rb', line 22 def employment_termination_date @employment_termination_date end |
#first_name ⇒ String (readonly)
Returns The first name of the provider, if the provider is an individual.
31 32 33 |
# File 'lib/candidhealth/organization_providers/v_2/types/organization_provider.rb', line 31 def first_name @first_name end |
#is_billing ⇒ Boolean (readonly)
Returns Whether the provider can be used to bill services.
29 30 31 |
# File 'lib/candidhealth/organization_providers/v_2/types/organization_provider.rb', line 29 def is_billing @is_billing end |
#is_rendering ⇒ Boolean (readonly)
Returns Whether the provider can be used to render services.
27 28 29 |
# File 'lib/candidhealth/organization_providers/v_2/types/organization_provider.rb', line 27 def is_rendering @is_rendering end |
#last_name ⇒ String (readonly)
Returns The last name of the provider, if the provider is an individual.
33 34 35 |
# File 'lib/candidhealth/organization_providers/v_2/types/organization_provider.rb', line 33 def last_name @last_name end |
#license_type ⇒ CandidApiClient::OrganizationProviders::V2::Types::LicenseType (readonly)
Returns The type of license that the provider holds.
45 46 47 |
# File 'lib/candidhealth/organization_providers/v_2/types/organization_provider.rb', line 45 def license_type @license_type end |
#medicaid_provider_id ⇒ String (readonly)
Returns The medicaid provider ID for the provider.
49 50 51 |
# File 'lib/candidhealth/organization_providers/v_2/types/organization_provider.rb', line 49 def medicaid_provider_id @medicaid_provider_id end |
#npi ⇒ String (readonly)
Returns The NPI of the provider. This must be all digits [0-9] and exactly 10 characters long.
25 26 27 |
# File 'lib/candidhealth/organization_providers/v_2/types/organization_provider.rb', line 25 def npi @npi end |
#organization_name ⇒ String (readonly)
Returns The name of the provider, if the provider is an organization.
35 36 37 |
# File 'lib/candidhealth/organization_providers/v_2/types/organization_provider.rb', line 35 def organization_name @organization_name end |
#organization_provider_id ⇒ String (readonly)
Returns Auto-generated ID set on creation.
16 17 18 |
# File 'lib/candidhealth/organization_providers/v_2/types/organization_provider.rb', line 16 def organization_provider_id @organization_provider_id end |
#provider_type ⇒ CandidApiClient::OrganizationProviders::V2::Types::ProviderType (readonly)
Returns Whether the provider is an individual (NPPES Type 1) or organization (NPPES Type 2) provider.
38 39 40 |
# File 'lib/candidhealth/organization_providers/v_2/types/organization_provider.rb', line 38 def provider_type @provider_type end |
#ptan ⇒ String (readonly)
Returns The Provider Transaction Access Number for the provider.
47 48 49 |
# File 'lib/candidhealth/organization_providers/v_2/types/organization_provider.rb', line 47 def ptan @ptan end |
#tax_id ⇒ String (readonly)
Returns If the provider has a contract with insurance, this must be the same tax ID given to the payer on an IRS W-9 form completed during contracting.
41 42 43 |
# File 'lib/candidhealth/organization_providers/v_2/types/organization_provider.rb', line 41 def tax_id @tax_id end |
#taxonomy_code ⇒ String (readonly)
Returns A code designating classification and specialization.
43 44 45 |
# File 'lib/candidhealth/organization_providers/v_2/types/organization_provider.rb', line 43 def taxonomy_code @taxonomy_code end |
Class Method Details
.from_json(json_object:) ⇒ CandidApiClient::OrganizationProviders::V2::Types::OrganizationProvider
Deserialize a JSON object to an instance of OrganizationProvider
129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 |
# File 'lib/candidhealth/organization_providers/v_2/types/organization_provider.rb', line 129 def self.from_json(json_object:) struct = JSON.parse(json_object, object_class: OpenStruct) parsed_json = JSON.parse(json_object) organization_provider_id = struct["organization_provider_id"] employment_status = struct["employment_status"] employment_start_date = struct["employment_start_date"] employment_termination_date = struct["employment_termination_date"] npi = struct["npi"] is_rendering = struct["is_rendering"] is_billing = struct["is_billing"] first_name = struct["first_name"] last_name = struct["last_name"] organization_name = struct["organization_name"] provider_type = struct["provider_type"] tax_id = struct["tax_id"] taxonomy_code = struct["taxonomy_code"] license_type = struct["license_type"] ptan = struct["ptan"] medicaid_provider_id = struct["medicaid_provider_id"] addresses = parsed_json["addresses"]&.map do |item| item = item.to_json CandidApiClient::OrganizationProviders::V2::Types::OrganizationProviderAddress.from_json(json_object: item) end new( organization_provider_id: organization_provider_id, employment_status: employment_status, employment_start_date: employment_start_date, employment_termination_date: employment_termination_date, npi: npi, is_rendering: is_rendering, is_billing: is_billing, first_name: first_name, last_name: last_name, organization_name: organization_name, provider_type: provider_type, tax_id: tax_id, taxonomy_code: taxonomy_code, license_type: license_type, ptan: ptan, medicaid_provider_id: medicaid_provider_id, addresses: addresses, 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.
187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 |
# File 'lib/candidhealth/organization_providers/v_2/types/organization_provider.rb', line 187 def self.validate_raw(obj:) obj.organization_provider_id.is_a?(String) != false || raise("Passed value for field obj.organization_provider_id is not the expected type, validation failed.") obj.employment_status.is_a?(CandidApiClient::OrganizationProviders::V2::Types::EmploymentStatus) != false || raise("Passed value for field obj.employment_status is not the expected type, validation failed.") obj.employment_start_date&.is_a?(String) != false || raise("Passed value for field obj.employment_start_date is not the expected type, validation failed.") obj.employment_termination_date&.is_a?(String) != false || raise("Passed value for field obj.employment_termination_date is not the expected type, validation failed.") obj.npi.is_a?(String) != false || raise("Passed value for field obj.npi is not the expected type, validation failed.") obj.is_rendering.is_a?(Boolean) != false || raise("Passed value for field obj.is_rendering is not the expected type, validation failed.") obj.is_billing.is_a?(Boolean) != false || raise("Passed value for field obj.is_billing is not the expected type, validation failed.") obj.first_name&.is_a?(String) != false || raise("Passed value for field obj.first_name is not the expected type, validation failed.") obj.last_name&.is_a?(String) != false || raise("Passed value for field obj.last_name is not the expected type, validation failed.") obj.organization_name&.is_a?(String) != false || raise("Passed value for field obj.organization_name is not the expected type, validation failed.") obj.provider_type.is_a?(CandidApiClient::OrganizationProviders::V2::Types::ProviderType) != false || raise("Passed value for field obj.provider_type is not the expected type, validation failed.") obj.tax_id&.is_a?(String) != false || raise("Passed value for field obj.tax_id is not the expected type, validation failed.") obj.taxonomy_code&.is_a?(String) != false || raise("Passed value for field obj.taxonomy_code is not the expected type, validation failed.") obj.license_type.is_a?(CandidApiClient::OrganizationProviders::V2::Types::LicenseType) != false || raise("Passed value for field obj.license_type is not the expected type, validation failed.") obj.ptan&.is_a?(String) != false || raise("Passed value for field obj.ptan is not the expected type, validation failed.") obj.medicaid_provider_id&.is_a?(String) != false || raise("Passed value for field obj.medicaid_provider_id is not the expected type, validation failed.") obj.addresses&.is_a?(Array) != false || raise("Passed value for field obj.addresses is not the expected type, validation failed.") end |
Instance Method Details
#to_json(*_args) ⇒ String
Serialize an instance of OrganizationProvider to a JSON object
177 178 179 |
# File 'lib/candidhealth/organization_providers/v_2/types/organization_provider.rb', line 177 def to_json(*_args) @_field_set&.to_json end |