OHDSI / Vocabulary-v5.0

Build process for the OHDSI Standardized Vocabularies. Currently not available as independent release.
The Unlicense
222 stars 75 forks source link

building contraints error missing concept_id in table concept #904

Closed theompm closed 1 year ago

theompm commented 1 year ago

Describe the problem in content or desired feature hey team ohdsi

i have a problem builing constraints after inserting inserting vocabulary (from athena)

cdm version 5.4.1

  1. creating tables - dll
  2. inserting vocabulary rxnorm from athena (2023-10-23)
  3. buildung primary keys
  4. buildung indices
  5. ERROR while building constraints

ERROR: (psycopg2.errors.ForeignKeyViolation) insert or update on table "concept_synonym" violates foreign key constraint "fpk_concept_synonym_language_concept_id" DETAIL: Key (language_concept_id)=(4175771) is not present in table "concept".

[SQL: --postgresql CDM Foreign Key Constraints for OMOP Common Data Model 5.4

TinyRickC137 commented 1 year ago

You also need to import SNOMED. Concept_synonym table references snomed concepts for Languages.

In general, I would recommend you to download and import at least all pre-checked vocabularies to avoid potential errors.

If you have other questions, not issues on our side, please ask questions on the Forum.