provider_seen_view
Materialized: false
Definition
SELECT p.provider_seen_id,
p.entity_type,
p.name_last_or_organization,
p.name_first,
p.name_middle,
p.name_prefix,
p.name_suffix,
p.primary_id_qualifier,
p.address_id,
p.npi,
p.tax_id,
p.state_license_number,
p.unique_provider_identification_number,
p.provider_commercial_number,
p.location_number,
p.contact_name,
p.email_address_id,
p.fax_number_id,
p.phone_number_id,
p.phone_extension,
p.relationship_to_npi,
p.corrected_npi,
a.canonical_address_id,
a.canonical_primary_address_only_id,
a.is_invalid_address,
a.address1,
a.address2,
a.city,
a.state_or_province,
a.postal_code,
a.country_code,
a.country_subdivision,
ph.phone_number,
fax.fax_number,
email.email_address
FROM claims.provider_seen p
LEFT JOIN claims.address_seen a ON a.address_id = p.address_id
LEFT JOIN claims.phone ph ON ph.phone_id = p.phone_number_id
LEFT JOIN claims.fax ON fax.fax_id = p.fax_number_id
LEFT JOIN claims.email email ON email.email_id = p.email_address_id;
| Column | Data Type | Indexed |
|---|---|---|
provider_seen_id | bigint | No |
entity_type | entity_type | No |
name_last_or_organization | text | No |
name_first | text | No |
name_middle | text | No |
name_prefix | text | No |
name_suffix | text | No |
primary_id_qualifier | identification_type | No |
address_id | bigint | No |
npi | bigint | No |
tax_id | text | No |
state_license_number | text | No |
unique_provider_identification_number | text | No |
provider_commercial_number | text | No |
location_number | text | No |
contact_name | text | No |
email_address_id | bigint | No |
fax_number_id | bigint | No |
phone_number_id | bigint | No |
phone_extension | text | No |
relationship_to_npi | provider_relationship_type | No |
corrected_npi | bigint | No |
canonical_address_id | bigint | No |
canonical_primary_address_only_id | bigint | No |
is_invalid_address | boolean | No |
address1 | text | No |
address2 | text | No |
city | text | No |
state_or_province | text | No |
postal_code | text | No |
country_code | text | No |
country_subdivision | text | No |
phone_number | text | No |
fax_number | text | No |
email_address | text | No |