OHDSI Home | Forums | Wiki | Github

Detect OMOP version

Hi -

Is there a query I can run to detect OMOP version? Working with an existing database.

Thanks,
Brian

Hello @Brian_Fox,

Assuming that CDM_SOURCE table is populated properly:

SELECT cdm_version FROM cdm_source

and if this is about the vocabulary version you are using, the link that @rookie_crewkie provided also solves that mystery:

SELECT vocabulary_version from vocabulary where vocabulary_id = ‘None’

Hi thanks! Yeah, as luck would have it, it’s not populated. The table is empty.

You can just check the presence of fields that are specific to a version. You could look into the change list and pick something from there.

t