OHDSI Home | Forums | Wiki | Github

Source_values longer than 50 characters


I’m mapping data where we have source codes longer than 50 characters and therefore upload to the database fails as DDLs set the length to 50. Is there another table that I should be adding source values and including a key in the core tables to link to or how should we manage this?

Thanks for the help

There’s nothing in the OMOP standard. You could add a table with a 1:1 relationship, although it’s usually better to just add an additional column. Less work involved all round.

The SOURCE_VALUE type fields are only there for reference anyway (to provide provenance) so a couple of options would be to 1) add an additional field to the end as large as you need for the full source code, and truncate the standard SOURCE_VALUE field, or 2) just make the SOURCE_VALUE field large enough for your values. In case 2, you’d have to remember to truncate the field if you ever share your data with an OMOP network.


Thanks Roger for the quick response, yes I think the additional field and truncate the source value will be the better of the options

Roger has it right, you can increase the size of the columns as needed.