OHDSI Home | Forums | Wiki | Github

Caring for orphans


(Gerald Pulver) #1

This afternoon, while building a local copy of the concept file, I created Foreign keys linked to the CONCEPT table rather than just create indexes on CONCEPT_ANCESTOR and CONCEPT_RELATIONSHIP.

When I ran my code, I encountered a couple of exceptions, suggesting that there may be orphan values in those tables.

  • Is this sort of thing worth reporting, OR
  • should I assume that OHDSI’s DQ processes will find them soon and there’s no need to point them out, OR
  • am I misunderstanding the CDM?

Gerry

66 IC CREATE FOREIGN KEY (concept_ID_1) REFERENCES CONCEPT ;
ERROR: Creation of foreign key failed because key value “44816479” was not found in data set
V5_LOCAL.CONCEPT.DATA.
67 IC CREATE FOREIGN KEY (concept_ID_2) REFERENCES CONCEPT ;
68 index create relationship_ID ;
69 modify concept_ancestor ;
NOTE: Statements not processed because of errors noted above.
70 IC CREATE FOREIGN KEY (ancestor_concept_ID) REFERENCES CONCEPT ;
ERROR: Creation of foreign key failed because key value “45888206” was not found in data set
V5_LOCAL.CONCEPT.DATA.


t