diff --git a/inst/csv/OMOP_CDMv5.4_Field_Level.csv b/inst/csv/OMOP_CDMv5.4_Field_Level.csv index 070ba82..9f3b9f8 100644 --- a/inst/csv/OMOP_CDMv5.4_Field_Level.csv +++ b/inst/csv/OMOP_CDMv5.4_Field_Level.csv @@ -293,7 +293,7 @@ PROVIDER,specialty_source_value,No,varchar(50),"This is the kind of provider or PROVIDER,specialty_source_concept_id,No,integer,This is often zero as many sites use proprietary codes to store physician speciality.,If the source data codes provider specialty in an OMOP supported vocabulary store the concept_id here.,No,Yes,CONCEPT,CONCEPT_ID,,, PROVIDER,gender_source_value,No,varchar(50),This is provider's gender as it appears in the source data.,Put the provider's gender as it appears in the source data. This field is up to the discretion of the ETL-er as to whether this should be the coded value from the source or the text description of the lookup value.,No,No,,,,, PROVIDER,gender_source_concept_id,No,integer,This is often zero as many sites use proprietary codes to store provider gender.,If the source data codes provider gender in an OMOP supported vocabulary store the concept_id here.,No,Yes,CONCEPT,CONCEPT_ID,,, -PAYER_PLAN_PERIOD,payer_plan_period_id,Yes,integer,"A unique identifier for each unique combination of a Person, Payer, Plan, and Period of time.",,Yes,Yes,PERSON,PERSON_ID,,, +PAYER_PLAN_PERIOD,payer_plan_period_id,Yes,integer,"A unique identifier for each unique combination of a Person, Payer, Plan, and Period of time.",,Yes,No,,,,, PAYER_PLAN_PERIOD,person_id,Yes,integer,The Person covered by the Plan.,"A single Person can have multiple, overlapping, PAYER_PLAN_PERIOD records",No,Yes,PERSON,PERSON_ID,,, PAYER_PLAN_PERIOD,payer_plan_period_start_date,Yes,date,Start date of Plan coverage.,,No,No,,,,, PAYER_PLAN_PERIOD,payer_plan_period_end_date,Yes,date,End date of Plan coverage.,,No,No,,,,, diff --git a/inst/ddl/5.4/bigquery/OMOPCDM_bigquery_5.4_constraints.sql b/inst/ddl/5.4/bigquery/OMOPCDM_bigquery_5.4_constraints.sql index e02920f..e851844 100644 --- a/inst/ddl/5.4/bigquery/OMOPCDM_bigquery_5.4_constraints.sql +++ b/inst/ddl/5.4/bigquery/OMOPCDM_bigquery_5.4_constraints.sql @@ -240,8 +240,6 @@ alter table @cdmDatabaseSchema.provider add constraint fpk_provider_specialty_so alter table @cdmDatabaseSchema.provider add constraint fpk_provider_gender_source_concept_id foreign key (gender_source_concept_id) references @cdmDatabaseSchema.concept (concept_id); -alter table @cdmDatabaseSchema.payer_plan_period add constraint fpk_payer_plan_period_payer_plan_period_id foreign key (payer_plan_period_id) references @cdmDatabaseSchema.person (person_id); - alter table @cdmDatabaseSchema.payer_plan_period add constraint fpk_payer_plan_period_person_id foreign key (person_id) references @cdmDatabaseSchema.person (person_id); alter table @cdmDatabaseSchema.payer_plan_period add constraint fpk_payer_plan_period_payer_concept_id foreign key (payer_concept_id) references @cdmDatabaseSchema.concept (concept_id); diff --git a/inst/ddl/5.4/impala/OMOPCDM_impala_5.4_constraints.sql b/inst/ddl/5.4/impala/OMOPCDM_impala_5.4_constraints.sql index 56cbc39..aa0ea25 100644 --- a/inst/ddl/5.4/impala/OMOPCDM_impala_5.4_constraints.sql +++ b/inst/ddl/5.4/impala/OMOPCDM_impala_5.4_constraints.sql @@ -240,8 +240,6 @@ ALTER TABLE @cdmDatabaseSchema.PROVIDER ADD CONSTRAINT fpk_PROVIDER_specialty_so ALTER TABLE @cdmDatabaseSchema.PROVIDER ADD CONSTRAINT fpk_PROVIDER_gender_source_concept_id FOREIGN KEY (gender_source_concept_id) REFERENCES @cdmDatabaseSchema.CONCEPT (CONCEPT_ID); -ALTER TABLE @cdmDatabaseSchema.PAYER_PLAN_PERIOD ADD CONSTRAINT fpk_PAYER_PLAN_PERIOD_payer_plan_period_id FOREIGN KEY (payer_plan_period_id) REFERENCES @cdmDatabaseSchema.PERSON (PERSON_ID); - ALTER TABLE @cdmDatabaseSchema.PAYER_PLAN_PERIOD ADD CONSTRAINT fpk_PAYER_PLAN_PERIOD_person_id FOREIGN KEY (person_id) REFERENCES @cdmDatabaseSchema.PERSON (PERSON_ID); ALTER TABLE @cdmDatabaseSchema.PAYER_PLAN_PERIOD ADD CONSTRAINT fpk_PAYER_PLAN_PERIOD_payer_concept_id FOREIGN KEY (payer_concept_id) REFERENCES @cdmDatabaseSchema.CONCEPT (CONCEPT_ID); diff --git a/inst/ddl/5.4/netezza/OMOPCDM_netezza_5.4_constraints.sql b/inst/ddl/5.4/netezza/OMOPCDM_netezza_5.4_constraints.sql index 20a4e0b..dd4ec54 100644 --- a/inst/ddl/5.4/netezza/OMOPCDM_netezza_5.4_constraints.sql +++ b/inst/ddl/5.4/netezza/OMOPCDM_netezza_5.4_constraints.sql @@ -240,8 +240,6 @@ ALTER TABLE @cdmDatabaseSchema.PROVIDER ADD CONSTRAINT fpk_PROVIDER_specialty_so ALTER TABLE @cdmDatabaseSchema.PROVIDER ADD CONSTRAINT fpk_PROVIDER_gender_source_concept_id FOREIGN KEY (gender_source_concept_id) REFERENCES @cdmDatabaseSchema.CONCEPT (CONCEPT_ID); -ALTER TABLE @cdmDatabaseSchema.PAYER_PLAN_PERIOD ADD CONSTRAINT fpk_PAYER_PLAN_PERIOD_payer_plan_period_id FOREIGN KEY (payer_plan_period_id) REFERENCES @cdmDatabaseSchema.PERSON (PERSON_ID); - ALTER TABLE @cdmDatabaseSchema.PAYER_PLAN_PERIOD ADD CONSTRAINT fpk_PAYER_PLAN_PERIOD_person_id FOREIGN KEY (person_id) REFERENCES @cdmDatabaseSchema.PERSON (PERSON_ID); ALTER TABLE @cdmDatabaseSchema.PAYER_PLAN_PERIOD ADD CONSTRAINT fpk_PAYER_PLAN_PERIOD_payer_concept_id FOREIGN KEY (payer_concept_id) REFERENCES @cdmDatabaseSchema.CONCEPT (CONCEPT_ID); diff --git a/inst/ddl/5.4/oracle/OMOPCDM_oracle_5.4_constraints.sql b/inst/ddl/5.4/oracle/OMOPCDM_oracle_5.4_constraints.sql index c4f1f22..ab9b2a8 100644 --- a/inst/ddl/5.4/oracle/OMOPCDM_oracle_5.4_constraints.sql +++ b/inst/ddl/5.4/oracle/OMOPCDM_oracle_5.4_constraints.sql @@ -240,8 +240,6 @@ ALTER TABLE @cdmDatabaseSchema.PROVIDER ADD CONSTRAINT fpk_PROVIDER_specialty_so ALTER TABLE @cdmDatabaseSchema.PROVIDER ADD CONSTRAINT fpk_PROVIDER_gender_source_concept_id FOREIGN KEY (gender_source_concept_id) REFERENCES @cdmDatabaseSchema.CONCEPT (CONCEPT_ID); -ALTER TABLE @cdmDatabaseSchema.PAYER_PLAN_PERIOD ADD CONSTRAINT fpk_PAYER_PLAN_PERIOD_payer_plan_period_id FOREIGN KEY (payer_plan_period_id) REFERENCES @cdmDatabaseSchema.PERSON (PERSON_ID); - ALTER TABLE @cdmDatabaseSchema.PAYER_PLAN_PERIOD ADD CONSTRAINT fpk_PAYER_PLAN_PERIOD_person_id FOREIGN KEY (person_id) REFERENCES @cdmDatabaseSchema.PERSON (PERSON_ID); ALTER TABLE @cdmDatabaseSchema.PAYER_PLAN_PERIOD ADD CONSTRAINT fpk_PAYER_PLAN_PERIOD_payer_concept_id FOREIGN KEY (payer_concept_id) REFERENCES @cdmDatabaseSchema.CONCEPT (CONCEPT_ID); diff --git a/inst/ddl/5.4/pdw/OMOPCDM_pdw_5.4_constraints.sql b/inst/ddl/5.4/pdw/OMOPCDM_pdw_5.4_constraints.sql index 6b1d862..90e52a9 100644 --- a/inst/ddl/5.4/pdw/OMOPCDM_pdw_5.4_constraints.sql +++ b/inst/ddl/5.4/pdw/OMOPCDM_pdw_5.4_constraints.sql @@ -240,8 +240,6 @@ ALTER TABLE @cdmDatabaseSchema.PROVIDER ADD CONSTRAINT fpk_PROVIDER_specialty_so ALTER TABLE @cdmDatabaseSchema.PROVIDER ADD CONSTRAINT fpk_PROVIDER_gender_source_concept_id FOREIGN KEY (gender_source_concept_id) REFERENCES @cdmDatabaseSchema.CONCEPT (CONCEPT_ID); -ALTER TABLE @cdmDatabaseSchema.PAYER_PLAN_PERIOD ADD CONSTRAINT fpk_PAYER_PLAN_PERIOD_payer_plan_period_id FOREIGN KEY (payer_plan_period_id) REFERENCES @cdmDatabaseSchema.PERSON (PERSON_ID); - ALTER TABLE @cdmDatabaseSchema.PAYER_PLAN_PERIOD ADD CONSTRAINT fpk_PAYER_PLAN_PERIOD_person_id FOREIGN KEY (person_id) REFERENCES @cdmDatabaseSchema.PERSON (PERSON_ID); ALTER TABLE @cdmDatabaseSchema.PAYER_PLAN_PERIOD ADD CONSTRAINT fpk_PAYER_PLAN_PERIOD_payer_concept_id FOREIGN KEY (payer_concept_id) REFERENCES @cdmDatabaseSchema.CONCEPT (CONCEPT_ID); diff --git a/inst/ddl/5.4/postgresql/OMOPCDM_postgresql_5.4_constraints.sql b/inst/ddl/5.4/postgresql/OMOPCDM_postgresql_5.4_constraints.sql index 52c5e69..763a0f7 100644 --- a/inst/ddl/5.4/postgresql/OMOPCDM_postgresql_5.4_constraints.sql +++ b/inst/ddl/5.4/postgresql/OMOPCDM_postgresql_5.4_constraints.sql @@ -240,8 +240,6 @@ ALTER TABLE @cdmDatabaseSchema.PROVIDER ADD CONSTRAINT fpk_PROVIDER_specialty_so ALTER TABLE @cdmDatabaseSchema.PROVIDER ADD CONSTRAINT fpk_PROVIDER_gender_source_concept_id FOREIGN KEY (gender_source_concept_id) REFERENCES @cdmDatabaseSchema.CONCEPT (CONCEPT_ID); -ALTER TABLE @cdmDatabaseSchema.PAYER_PLAN_PERIOD ADD CONSTRAINT fpk_PAYER_PLAN_PERIOD_payer_plan_period_id FOREIGN KEY (payer_plan_period_id) REFERENCES @cdmDatabaseSchema.PERSON (PERSON_ID); - ALTER TABLE @cdmDatabaseSchema.PAYER_PLAN_PERIOD ADD CONSTRAINT fpk_PAYER_PLAN_PERIOD_person_id FOREIGN KEY (person_id) REFERENCES @cdmDatabaseSchema.PERSON (PERSON_ID); ALTER TABLE @cdmDatabaseSchema.PAYER_PLAN_PERIOD ADD CONSTRAINT fpk_PAYER_PLAN_PERIOD_payer_concept_id FOREIGN KEY (payer_concept_id) REFERENCES @cdmDatabaseSchema.CONCEPT (CONCEPT_ID); diff --git a/inst/ddl/5.4/redshift/OMOPCDM_redshift_5.4_constraints.sql b/inst/ddl/5.4/redshift/OMOPCDM_redshift_5.4_constraints.sql index e9649e1..f22043d 100644 --- a/inst/ddl/5.4/redshift/OMOPCDM_redshift_5.4_constraints.sql +++ b/inst/ddl/5.4/redshift/OMOPCDM_redshift_5.4_constraints.sql @@ -240,8 +240,6 @@ ALTER TABLE @cdmDatabaseSchema.PROVIDER ADD CONSTRAINT fpk_PROVIDER_specialty_so ALTER TABLE @cdmDatabaseSchema.PROVIDER ADD CONSTRAINT fpk_PROVIDER_gender_source_concept_id FOREIGN KEY (gender_source_concept_id) REFERENCES @cdmDatabaseSchema.CONCEPT (CONCEPT_ID); -ALTER TABLE @cdmDatabaseSchema.PAYER_PLAN_PERIOD ADD CONSTRAINT fpk_PAYER_PLAN_PERIOD_payer_plan_period_id FOREIGN KEY (payer_plan_period_id) REFERENCES @cdmDatabaseSchema.PERSON (PERSON_ID); - ALTER TABLE @cdmDatabaseSchema.PAYER_PLAN_PERIOD ADD CONSTRAINT fpk_PAYER_PLAN_PERIOD_person_id FOREIGN KEY (person_id) REFERENCES @cdmDatabaseSchema.PERSON (PERSON_ID); ALTER TABLE @cdmDatabaseSchema.PAYER_PLAN_PERIOD ADD CONSTRAINT fpk_PAYER_PLAN_PERIOD_payer_concept_id FOREIGN KEY (payer_concept_id) REFERENCES @cdmDatabaseSchema.CONCEPT (CONCEPT_ID); diff --git a/inst/ddl/5.4/spark/OMOPCDM_spark_5.4_constraints.sql b/inst/ddl/5.4/spark/OMOPCDM_spark_5.4_constraints.sql index ee57cb2..879d4a4 100644 --- a/inst/ddl/5.4/spark/OMOPCDM_spark_5.4_constraints.sql +++ b/inst/ddl/5.4/spark/OMOPCDM_spark_5.4_constraints.sql @@ -118,7 +118,6 @@ ALTER TABLE @cdmDatabaseSchema.PROVIDER ADD CONSTRAINT fpk_PROVIDER_care_site_id ALTER TABLE @cdmDatabaseSchema.PROVIDER ADD CONSTRAINT fpk_PROVIDER_gender_concept_id FOREIGN KEY (gender_concept_id) REFERENCES @cdmDatabaseSchema.CONCEPT (CONCEPT_ID); ALTER TABLE @cdmDatabaseSchema.PROVIDER ADD CONSTRAINT fpk_PROVIDER_specialty_source_concept_id FOREIGN KEY (specialty_source_concept_id) REFERENCES @cdmDatabaseSchema.CONCEPT (CONCEPT_ID); ALTER TABLE @cdmDatabaseSchema.PROVIDER ADD CONSTRAINT fpk_PROVIDER_gender_source_concept_id FOREIGN KEY (gender_source_concept_id) REFERENCES @cdmDatabaseSchema.CONCEPT (CONCEPT_ID); -ALTER TABLE @cdmDatabaseSchema.PAYER_PLAN_PERIOD ADD CONSTRAINT fpk_PAYER_PLAN_PERIOD_payer_plan_period_id FOREIGN KEY (payer_plan_period_id) REFERENCES @cdmDatabaseSchema.PERSON (PERSON_ID); ALTER TABLE @cdmDatabaseSchema.PAYER_PLAN_PERIOD ADD CONSTRAINT fpk_PAYER_PLAN_PERIOD_person_id FOREIGN KEY (person_id) REFERENCES @cdmDatabaseSchema.PERSON (PERSON_ID); ALTER TABLE @cdmDatabaseSchema.PAYER_PLAN_PERIOD ADD CONSTRAINT fpk_PAYER_PLAN_PERIOD_payer_concept_id FOREIGN KEY (payer_concept_id) REFERENCES @cdmDatabaseSchema.CONCEPT (CONCEPT_ID); ALTER TABLE @cdmDatabaseSchema.PAYER_PLAN_PERIOD ADD CONSTRAINT fpk_PAYER_PLAN_PERIOD_payer_source_concept_id FOREIGN KEY (payer_source_concept_id) REFERENCES @cdmDatabaseSchema.CONCEPT (CONCEPT_ID); diff --git a/inst/ddl/5.4/sql_server/OMOPCDM_sql_server_5.4_constraints.sql b/inst/ddl/5.4/sql_server/OMOPCDM_sql_server_5.4_constraints.sql index f23f830..8b42f34 100644 --- a/inst/ddl/5.4/sql_server/OMOPCDM_sql_server_5.4_constraints.sql +++ b/inst/ddl/5.4/sql_server/OMOPCDM_sql_server_5.4_constraints.sql @@ -240,8 +240,6 @@ ALTER TABLE @cdmDatabaseSchema.PROVIDER ADD CONSTRAINT fpk_PROVIDER_specialty_so ALTER TABLE @cdmDatabaseSchema.PROVIDER ADD CONSTRAINT fpk_PROVIDER_gender_source_concept_id FOREIGN KEY (gender_source_concept_id) REFERENCES @cdmDatabaseSchema.CONCEPT (CONCEPT_ID); -ALTER TABLE @cdmDatabaseSchema.PAYER_PLAN_PERIOD ADD CONSTRAINT fpk_PAYER_PLAN_PERIOD_payer_plan_period_id FOREIGN KEY (payer_plan_period_id) REFERENCES @cdmDatabaseSchema.PERSON (PERSON_ID); - ALTER TABLE @cdmDatabaseSchema.PAYER_PLAN_PERIOD ADD CONSTRAINT fpk_PAYER_PLAN_PERIOD_person_id FOREIGN KEY (person_id) REFERENCES @cdmDatabaseSchema.PERSON (PERSON_ID); ALTER TABLE @cdmDatabaseSchema.PAYER_PLAN_PERIOD ADD CONSTRAINT fpk_PAYER_PLAN_PERIOD_payer_concept_id FOREIGN KEY (payer_concept_id) REFERENCES @cdmDatabaseSchema.CONCEPT (CONCEPT_ID);