Permalink
Browse files

table definitions

  • Loading branch information...
1 parent 712a774 commit a105bd9e59beaa9f522cf56744d87beec8ea77c7 @johnistan committed Mar 13, 2012
Showing with 356 additions and 0 deletions.
  1. +356 −0 npi/npi_ddl.sql
View
@@ -0,0 +1,356 @@
+CREATE TABLE "acustream"."npi_registry" (
+ "npi" varchar,
+ "entity_type_code" varchar,
+ "replacement_npi" varchar,
+ "employer_identification_number_ein" varchar,
+ "provider_organization_name_legal_business_name" varchar,
+ "provider_last_name_legal_name" varchar,
+ "provider_first_name" varchar,
+ "provider_middle_name" varchar,
+ "provider_name_prefix_text" varchar,
+ "provider_name_suffix_text" varchar,
+ "provider_credential_text" varchar,
+ "provider_other_organization_name" varchar,
+ "provider_other_organization_name_type_code" varchar,
+ "provider_other_last_name" varchar,
+ "provider_other_first_name" varchar,
+ "provider_other_middle_name" varchar,
+ "provider_other_name_prefix_text" varchar,
+ "provider_other_name_suffix_text" varchar,
+ "provider_other_credential_text" varchar,
+ "provider_other_last_name_type_code" varchar,
+ "provider_first_line_business_mailing_address" varchar,
+ "provider_second_line_business_mailing_address" varchar,
+ "provider_business_mailing_address_city_name" varchar,
+ "provider_business_mailing_address_state_name" varchar,
+ "provider_business_mailing_address_postal_code" varchar,
+ "provider_business_mailing_address_country_code_if_outside_us" varchar,
+ "provider_business_mailing_address_telephone_number" varchar,
+ "provider_business_mailing_address_fax_number" varchar,
+ "provider_first_line_business_practice_location_address" varchar,
+ "provider_second_line_business_practice_location_address" varchar,
+ "provider_business_practice_location_address_city_name" varchar,
+ "provider_business_practice_location_address_state_name" varchar,
+ "provider_business_practice_location_address_postal_code" varchar,
+ "provider_business_practice_location_address_country_code_if_out" varchar,
+ "provider_business_practice_location_address_telephone_number" varchar,
+ "provider_business_practice_location_address_fax_number" varchar,
+ "provider_enumeration_date" varchar,
+ "last_update_date" varchar,
+ "npi_deactivation_reason_code" varchar,
+ "npi_deactivation_date" varchar,
+ "npi_reactivation_date" varchar,
+ "provider_gender_code" varchar,
+ "authorized_official_last_name" varchar,
+ "authorized_official_first_name" varchar,
+ "authorized_official_middle_name" varchar,
+ "authorized_official_title_or_position" varchar,
+ "authorized_official_telephone_number" varchar,
+ "healthcare_provider_taxonomy_code_1" varchar,
+ "provider_license_number_1" varchar,
+ "provider_license_number_state_code_1" varchar,
+ "healthcare_provider_primary_taxonomy_switch_1" varchar,
+ "healthcare_provider_taxonomy_code_2" varchar,
+ "provider_license_number_2" varchar,
+ "provider_license_number_state_code_2" varchar,
+ "healthcare_provider_primary_taxonomy_switch_2" varchar,
+ "healthcare_provider_taxonomy_code_3" varchar,
+ "provider_license_number_3" varchar,
+ "provider_license_number_state_code_3" varchar,
+ "healthcare_provider_primary_taxonomy_switch_3" varchar,
+ "healthcare_provider_taxonomy_code_4" varchar,
+ "provider_license_number_4" varchar,
+ "provider_license_number_state_code_4" varchar,
+ "healthcare_provider_primary_taxonomy_switch_4" varchar,
+ "healthcare_provider_taxonomy_code_5" varchar,
+ "provider_license_number_5" varchar,
+ "provider_license_number_state_code_5" varchar,
+ "healthcare_provider_primary_taxonomy_switch_5" varchar,
+ "healthcare_provider_taxonomy_code_6" varchar,
+ "provider_license_number_6" varchar,
+ "provider_license_number_state_code_6" varchar,
+ "healthcare_provider_primary_taxonomy_switch_6" varchar,
+ "healthcare_provider_taxonomy_code_7" varchar,
+ "provider_license_number_7" varchar,
+ "provider_license_number_state_code_7" varchar,
+ "healthcare_provider_primary_taxonomy_switch_7" varchar,
+ "healthcare_provider_taxonomy_code_8" varchar,
+ "provider_license_number_8" varchar,
+ "provider_license_number_state_code_8" varchar,
+ "healthcare_provider_primary_taxonomy_switch_8" varchar,
+ "healthcare_provider_taxonomy_code_9" varchar,
+ "provider_license_number_9" varchar,
+ "provider_license_number_state_code_9" varchar,
+ "healthcare_provider_primary_taxonomy_switch_9" varchar,
+ "healthcare_provider_taxonomy_code_10" varchar,
+ "provider_license_number_10" varchar,
+ "provider_license_number_state_code_10" varchar,
+ "healthcare_provider_primary_taxonomy_switch_10" varchar,
+ "healthcare_provider_taxonomy_code_11" varchar,
+ "provider_license_number_11" varchar,
+ "provider_license_number_state_code_11" varchar,
+ "healthcare_provider_primary_taxonomy_switch_11" varchar,
+ "healthcare_provider_taxonomy_code_12" varchar,
+ "provider_license_number_12" varchar,
+ "provider_license_number_state_code_12" varchar,
+ "healthcare_provider_primary_taxonomy_switch_12" varchar,
+ "healthcare_provider_taxonomy_code_13" varchar,
+ "provider_license_number_13" varchar,
+ "provider_license_number_state_code_13" varchar,
+ "healthcare_provider_primary_taxonomy_switch_13" varchar,
+ "healthcare_provider_taxonomy_code_14" varchar,
+ "provider_license_number_14" varchar,
+ "provider_license_number_state_code_14" varchar,
+ "healthcare_provider_primary_taxonomy_switch_14" varchar,
+ "healthcare_provider_taxonomy_code_15" varchar,
+ "provider_license_number_15" varchar,
+ "provider_license_number_state_code_15" varchar,
+ "healthcare_provider_primary_taxonomy_switch_15" varchar,
+ "other_provider_identifier_1" varchar,
+ "other_provider_identifier_type_code_1" varchar,
+ "other_provider_identifier_state_1" varchar,
+ "other_provider_identifier_issuer_1" varchar,
+ "other_provider_identifier_2" varchar,
+ "other_provider_identifier_type_code_2" varchar,
+ "other_provider_identifier_state_2" varchar,
+ "other_provider_identifier_issuer_2" varchar,
+ "other_provider_identifier_3" varchar,
+ "other_provider_identifier_type_code_3" varchar,
+ "other_provider_identifier_state_3" varchar,
+ "other_provider_identifier_issuer_3" varchar,
+ "other_provider_identifier_4" varchar,
+ "other_provider_identifier_type_code_4" varchar,
+ "other_provider_identifier_state_4" varchar,
+ "other_provider_identifier_issuer_4" varchar,
+ "other_provider_identifier_5" varchar,
+ "other_provider_identifier_type_code_5" varchar,
+ "other_provider_identifier_state_5" varchar,
+ "other_provider_identifier_issuer_5" varchar,
+ "other_provider_identifier_6" varchar,
+ "other_provider_identifier_type_code_6" varchar,
+ "other_provider_identifier_state_6" varchar,
+ "other_provider_identifier_issuer_6" varchar,
+ "other_provider_identifier_7" varchar,
+ "other_provider_identifier_type_code_7" varchar,
+ "other_provider_identifier_state_7" varchar,
+ "other_provider_identifier_issuer_7" varchar,
+ "other_provider_identifier_8" varchar,
+ "other_provider_identifier_type_code_8" varchar,
+ "other_provider_identifier_state_8" varchar,
+ "other_provider_identifier_issuer_8" varchar,
+ "other_provider_identifier_9" varchar,
+ "other_provider_identifier_type_code_9" varchar,
+ "other_provider_identifier_state_9" varchar,
+ "other_provider_identifier_issuer_9" varchar,
+ "other_provider_identifier_10" varchar,
+ "other_provider_identifier_type_code_10" varchar,
+ "other_provider_identifier_state_10" varchar,
+ "other_provider_identifier_issuer_10" varchar,
+ "other_provider_identifier_11" varchar,
+ "other_provider_identifier_type_code_11" varchar,
+ "other_provider_identifier_state_11" varchar,
+ "other_provider_identifier_issuer_11" varchar,
+ "other_provider_identifier_12" varchar,
+ "other_provider_identifier_type_code_12" varchar,
+ "other_provider_identifier_state_12" varchar,
+ "other_provider_identifier_issuer_12" varchar,
+ "other_provider_identifier_13" varchar,
+ "other_provider_identifier_type_code_13" varchar,
+ "other_provider_identifier_state_13" varchar,
+ "other_provider_identifier_issuer_13" varchar,
+ "other_provider_identifier_14" varchar,
+ "other_provider_identifier_type_code_14" varchar,
+ "other_provider_identifier_state_14" varchar,
+ "other_provider_identifier_issuer_14" varchar,
+ "other_provider_identifier_15" varchar,
+ "other_provider_identifier_type_code_15" varchar,
+ "other_provider_identifier_state_15" varchar,
+ "other_provider_identifier_issuer_15" varchar,
+ "other_provider_identifier_16" varchar,
+ "other_provider_identifier_type_code_16" varchar,
+ "other_provider_identifier_state_16" varchar,
+ "other_provider_identifier_issuer_16" varchar,
+ "other_provider_identifier_17" varchar,
+ "other_provider_identifier_type_code_17" varchar,
+ "other_provider_identifier_state_17" varchar,
+ "other_provider_identifier_issuer_17" varchar,
+ "other_provider_identifier_18" varchar,
+ "other_provider_identifier_type_code_18" varchar,
+ "other_provider_identifier_state_18" varchar,
+ "other_provider_identifier_issuer_18" varchar,
+ "other_provider_identifier_19" varchar,
+ "other_provider_identifier_type_code_19" varchar,
+ "other_provider_identifier_state_19" varchar,
+ "other_provider_identifier_issuer_19" varchar,
+ "other_provider_identifier_20" varchar,
+ "other_provider_identifier_type_code_20" varchar,
+ "other_provider_identifier_state_20" varchar,
+ "other_provider_identifier_issuer_20" varchar,
+ "other_provider_identifier_21" varchar,
+ "other_provider_identifier_type_code_21" varchar,
+ "other_provider_identifier_state_21" varchar,
+ "other_provider_identifier_issuer_21" varchar,
+ "other_provider_identifier_22" varchar,
+ "other_provider_identifier_type_code_22" varchar,
+ "other_provider_identifier_state_22" varchar,
+ "other_provider_identifier_issuer_22" varchar,
+ "other_provider_identifier_23" varchar,
+ "other_provider_identifier_type_code_23" varchar,
+ "other_provider_identifier_state_23" varchar,
+ "other_provider_identifier_issuer_23" varchar,
+ "other_provider_identifier_24" varchar,
+ "other_provider_identifier_type_code_24" varchar,
+ "other_provider_identifier_state_24" varchar,
+ "other_provider_identifier_issuer_24" varchar,
+ "other_provider_identifier_25" varchar,
+ "other_provider_identifier_type_code_25" varchar,
+ "other_provider_identifier_state_25" varchar,
+ "other_provider_identifier_issuer_25" varchar,
+ "other_provider_identifier_26" varchar,
+ "other_provider_identifier_type_code_26" varchar,
+ "other_provider_identifier_state_26" varchar,
+ "other_provider_identifier_issuer_26" varchar,
+ "other_provider_identifier_27" varchar,
+ "other_provider_identifier_type_code_27" varchar,
+ "other_provider_identifier_state_27" varchar,
+ "other_provider_identifier_issuer_27" varchar,
+ "other_provider_identifier_28" varchar,
+ "other_provider_identifier_type_code_28" varchar,
+ "other_provider_identifier_state_28" varchar,
+ "other_provider_identifier_issuer_28" varchar,
+ "other_provider_identifier_29" varchar,
+ "other_provider_identifier_type_code_29" varchar,
+ "other_provider_identifier_state_29" varchar,
+ "other_provider_identifier_issuer_29" varchar,
+ "other_provider_identifier_30" varchar,
+ "other_provider_identifier_type_code_30" varchar,
+ "other_provider_identifier_state_30" varchar,
+ "other_provider_identifier_issuer_30" varchar,
+ "other_provider_identifier_31" varchar,
+ "other_provider_identifier_type_code_31" varchar,
+ "other_provider_identifier_state_31" varchar,
+ "other_provider_identifier_issuer_31" varchar,
+ "other_provider_identifier_32" varchar,
+ "other_provider_identifier_type_code_32" varchar,
+ "other_provider_identifier_state_32" varchar,
+ "other_provider_identifier_issuer_32" varchar,
+ "other_provider_identifier_33" varchar,
+ "other_provider_identifier_type_code_33" varchar,
+ "other_provider_identifier_state_33" varchar,
+ "other_provider_identifier_issuer_33" varchar,
+ "other_provider_identifier_34" varchar,
+ "other_provider_identifier_type_code_34" varchar,
+ "other_provider_identifier_state_34" varchar,
+ "other_provider_identifier_issuer_34" varchar,
+ "other_provider_identifier_35" varchar,
+ "other_provider_identifier_type_code_35" varchar,
+ "other_provider_identifier_state_35" varchar,
+ "other_provider_identifier_issuer_35" varchar,
+ "other_provider_identifier_36" varchar,
+ "other_provider_identifier_type_code_36" varchar,
+ "other_provider_identifier_state_36" varchar,
+ "other_provider_identifier_issuer_36" varchar,
+ "other_provider_identifier_37" varchar,
+ "other_provider_identifier_type_code_37" varchar,
+ "other_provider_identifier_state_37" varchar,
+ "other_provider_identifier_issuer_37" varchar,
+ "other_provider_identifier_38" varchar,
+ "other_provider_identifier_type_code_38" varchar,
+ "other_provider_identifier_state_38" varchar,
+ "other_provider_identifier_issuer_38" varchar,
+ "other_provider_identifier_39" varchar,
+ "other_provider_identifier_type_code_39" varchar,
+ "other_provider_identifier_state_39" varchar,
+ "other_provider_identifier_issuer_39" varchar,
+ "other_provider_identifier_40" varchar,
+ "other_provider_identifier_type_code_40" varchar,
+ "other_provider_identifier_state_40" varchar,
+ "other_provider_identifier_issuer_40" varchar,
+ "other_provider_identifier_41" varchar,
+ "other_provider_identifier_type_code_41" varchar,
+ "other_provider_identifier_state_41" varchar,
+ "other_provider_identifier_issuer_41" varchar,
+ "other_provider_identifier_42" varchar,
+ "other_provider_identifier_type_code_42" varchar,
+ "other_provider_identifier_state_42" varchar,
+ "other_provider_identifier_issuer_42" varchar,
+ "other_provider_identifier_43" varchar,
+ "other_provider_identifier_type_code_43" varchar,
+ "other_provider_identifier_state_43" varchar,
+ "other_provider_identifier_issuer_43" varchar,
+ "other_provider_identifier_44" varchar,
+ "other_provider_identifier_type_code_44" varchar,
+ "other_provider_identifier_state_44" varchar,
+ "other_provider_identifier_issuer_44" varchar,
+ "other_provider_identifier_45" varchar,
+ "other_provider_identifier_type_code_45" varchar,
+ "other_provider_identifier_state_45" varchar,
+ "other_provider_identifier_issuer_45" varchar,
+ "other_provider_identifier_46" varchar,
+ "other_provider_identifier_type_code_46" varchar,
+ "other_provider_identifier_state_46" varchar,
+ "other_provider_identifier_issuer_46" varchar,
+ "other_provider_identifier_47" varchar,
+ "other_provider_identifier_type_code_47" varchar,
+ "other_provider_identifier_state_47" varchar,
+ "other_provider_identifier_issuer_47" varchar,
+ "other_provider_identifier_48" varchar,
+ "other_provider_identifier_type_code_48" varchar,
+ "other_provider_identifier_state_48" varchar,
+ "other_provider_identifier_issuer_48" varchar,
+ "other_provider_identifier_49" varchar,
+ "other_provider_identifier_type_code_49" varchar,
+ "other_provider_identifier_state_49" varchar,
+ "other_provider_identifier_issuer_49" varchar,
+ "other_provider_identifier_50" varchar,
+ "other_provider_identifier_type_code_50" varchar,
+ "other_provider_identifier_state_50" varchar,
+ "other_provider_identifier_issuer_50" varchar,
+ "is_sole_proprietor" varchar,
+ "is_organization_subpart" varchar,
+ "parent_organization_lbn" varchar,
+ "parent_organization_tin" varchar,
+ "authorized_official_name_prefix_text" varchar,
+ "authorized_official_name_suffix_text" varchar,
+ "authorized_official_credential_text" varchar,
+ "healthcare_provider_taxonomy_group_1" varchar,
+ "healthcare_provider_taxonomy_group_2" varchar,
+ "healthcare_provider_taxonomy_group_3" varchar,
+ "healthcare_provider_taxonomy_group_4" varchar,
+ "healthcare_provider_taxonomy_group_5" varchar,
+ "healthcare_provider_taxonomy_group_6" varchar,
+ "healthcare_provider_taxonomy_group_7" varchar,
+ "healthcare_provider_taxonomy_group_8" varchar,
+ "healthcare_provider_taxonomy_group_9" varchar,
+ "healthcare_provider_taxonomy_group_10" varchar,
+ "healthcare_provider_taxonomy_group_11" varchar,
+ "healthcare_provider_taxonomy_group_12" varchar,
+ "healthcare_provider_taxonomy_group_13" varchar,
+ "healthcare_provider_taxonomy_group_14" varchar,
+ "healthcare_provider_taxonomy_group_15" varchar
+)
+WITH (OIDS=FALSE)
+;
+
+
+CREATE INDEX "npi_index" ON "acustream"."npi_registry" USING btree ("npi");
+
+
+CREATE TABLE "acustream"."npi_registry_info" (
+ "npi" varchar,
+ "entity_type_code" varchar,
+ "description" text,
+ "provider_first_line_business_mailing_address" varchar,
+ "provider_second_line_business_mailing_address" varchar,
+ "provider_business_mailing_address_state_name" varchar,
+ "provider_business_mailing_address_postal_code" varchar,
+ "provider_business_practice_location_address_city_name" varchar,
+ "healthcare_provider_taxonomy_code_1" varchar,
+ "healthcare_provider_taxonomy_code_2" varchar,
+ "healthcare_provider_taxonomy_code_3" varchar
+)
+WITH (OIDS=FALSE)
+;
+
+
+CREATE INDEX "npi_info_index" ON "acustream"."npi_registry_info" USING btree ("npi");

0 comments on commit a105bd9

Please sign in to comment.