This is possibly a trivial question but hoping there may be a simple solution.
We are looking to record the versions of the vocabularies that we have been using and to be able to check these programmatically.
We want to use these as a git tag so no spaces allowed which means “v5.0 27-FEB-25” doesn’t work.
v20250227 would be good but I couldn’t find it in the tables to be able to check programmatically.
I could replace the space in the first one. Or do a date manipulation to get from the long to the short one, but both feel a bit hacky. Suggestions ? Thanks
If you need the actual versions of the vocabulary versions you may parse vocabulary_version field from the vocabulary table using, for example, SUBSTRING() function.
Roughly, you can use max(valid_start_date) for the specific vocabularies in the concept table. But in some cases it doesn’t fully match with the source-asserted date.
27-FEB-25 is actually not a vocabulary version, but a release date, and I don’t see the way to find it in the tables.
Maybe I’m being overly pedantic. It’s the overall version of the standardised vocabularies that we want to record and it seemed to me that the current version identifier is “v5.0 27-FEB-25”
vocabulary_version : Version of the OMOP standardised vocabularies loaded You can find the version of your Vocabulary using the query: SELECT vocabulary_version from vocabulary where vocabulary_id = 'None'
The slight uncertainty on what the actual identifier is just makes it a little trickier to check for it programmatically.
Ah, sorry, it’s totally my cognitive distortion: looking at the vocabularies from the developer’s point
Anyway, the tag v20250227 is created for the release report published on GitHub, it doesn’t exist in the tables. I would manipulate with ‘v5.0 27-FEB-25’ string.
But let’s see what the folks will say.
Thanks Masha
We can work with that. Happy if anyone else has a contribution.
It’s not essential, but if the opportunity comes up to make the documentation of the vocab version identifiers a little more explicit that may save this confusion for others.
Exactly right.
For the full tag we use this code.
For the short tag you’d remove the second part and replace the current date with the date from the vocabulary table.