Hi dear colleagues!
We just started looking into OMOP CDM and I came across an issue. We’re creating the CDM structure with SQL queries. And while executing the queries, I had the following error:
Msg 1778, Level 16, State 0, Line 288
Column ‘.PERSON.person_id’ is not the same data type as referencing column ‘EPISODE.person_id’ in foreign key ‘fpk_EPISODE_person_id’.
Msg 1750, Level 16, State 1, Line 288
Could not create constraint or index. See previous errors.
I looked through the code and I saw that in EPISODE table person_id has a type bigint and in PERSON person_id is of type integer, as in all other tables except for EPISODE. Any reasons for that and how can I fix this problem?
Thank you!