Hi everyone,
I am currently setting up the OMOP CDM database in postgres.
I am focusing on vocabulary only at the moment, and I have added in respective tables, primary keys, constraints and indices.
However, when i try to populate the concept table, it raises issue that
ERROR: insert or update on table “concept” violates foreign key constraint “fpk_concept_domain_id”
DETAIL: Key (domain_id)=(Provider) is not present in table “domain”.
and when i try to populate the domain table , it raises this issue
ERROR: insert or update on table “domain” violates foreign key constraint “fpk_domain_domain_concept_id”
DETAIL: Key (domain_concept_id)=(581456) is not present in table “concept”.
This has become a chicken and egg problem, I am wondering how did you guys solved it?
Only importing the constraints , PKs, and indices after we populate the tables seems like the only way,
I’d like assistance in solving this issue, if there is any way we can solve this, without dropping constraints.
Thanks alot!