OHDSI Home | Forums | Wiki | Github

Where are the CONCEPT entries for vocabularies?

Hello,

I downloaded the latest vocabulary this weekend from Athena (http://athena.ohdsi.org/) and it does not seem to be distributing entries in the CONCEPT table referenced by VOCABULARY.vocabulary_concept_id. The following query comes up with all entries in the VOCABULARY table:

select *
from vocabulary v
where not exists(
select 1
from concept c
where v.vocabulary_concept_id = c.concept_id
)

@mgurley:

Not sure what the problem is. Your query is trying to find those vocabularies that don’t have a equivalent Concept in the CONCEPT table. There aren’t any. Which is how it should be. All vocabs have a Concept for themselves.

Right, but for me it finds ALL of the entries in the VOCABULARY table. So the following constraint command fails:

ALTER TABLE vocabulary ADD CONSTRAINT fpk_vocabulary_concept FOREIGN KEY (vocabulary_concept_id) REFERENCES concept (concept_id);

Because none of following concepts are currently being included in the Athena download concept.csv (try it yourself right now, unless I am doing something wrong in how I am making a request in Athena );

45756746
44819117
44819100
44819234
44819233
44819127
581457
5029
44819153
44819135
44819151
44819147
44819126
44819134
44819108
44819101
44819098
5046
44819099
44819102
44819152
44819105
44819103
44819137
44819096
44819146
44819149
44819129
44819110
44819128
44819109
44819235
44819133
44819104
252
44819097
44819140
44819138
32045
32046
32047
32044
44819107
44819122
44819119
44819150
44819232

Never mind, dopey mistake on my part.

t