claim_provider_view
Materialized: false
Definition
SELECT cp.claim_id,
cp.provider_index,
cp.provider_type,
cp.tpa_tax_id_suffix,
cp.tpa_specialty_code,
cp.taxonomy,
cp.foreign_currency_identifier,
ps.provider_seen_id,
ps.entity_type,
ps.name_last_or_organization,
ps.name_first,
ps.name_middle,
ps.name_prefix,
ps.name_suffix,
ps.primary_id_qualifier,
ps.address_id,
ps.npi,
ps.tax_id,
ps.state_license_number,
ps.unique_provider_identification_number,
ps.provider_commercial_number,
ps.location_number,
ps.contact_name,
ps.email_address_id,
ps.fax_number_id,
ps.phone_number_id,
ps.phone_extension,
ps.relationship_to_npi,
ps.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.claim_provider cp
JOIN claims.provider_seen ps USING (provider_seen_id)
LEFT JOIN claims.address_seen a USING (address_id)
LEFT JOIN claims.phone ph ON ph.phone_id = ps.phone_number_id
LEFT JOIN claims.fax ON fax.fax_id = ps.fax_number_id
LEFT JOIN claims.email email ON email.email_id = ps.email_address_id;
| Column | Data Type | Indexed |
|---|---|---|
claim_id | bigint | No |
provider_index | smallint | No |
provider_type | entity_identifier_type | No |
tpa_tax_id_suffix | text | No |
tpa_specialty_code | text | No |
taxonomy | text | No |
foreign_currency_identifier | text | No |
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 |