OHDSI Home | Forums | Wiki | Github

Help with OMOP CDM setup + Medical Images Extension

Good afternoon, and I wish you all a happy 2024!

I’m trying to implement a PostgreSQL DB following the OMOP CDM schema for a research project. I ran into a couple of issues, mainly due to the fact that my background is mostly in biomedical engineering and I need some guidance on the software development side.

I already defined all the OMOP CDM tables thanks to the DDL file on github.

I already downloaded the necessary vocabularies from the Athena website, and ran the cpt4.jar necessary to update the CONCEPT.csv.

My first doubt is the following:
1) The cpt4.jar, other than updating the (CONCEPT.csv) file also generated a (CONCEPT_CPT4.csv) file, that is not addressed by (OMOP CDM vocabulary load - PostgreSQL.sql). Am I supposed to do something with that file, or is it just a byproduct of cpt4.jar?

After I’ll have correctly setup the OMOP schema with your help, the project I’m working on will need a way to handle images saved on a computer, by using their filepath as a table attribute to be used by a Python interface. I found this file produced by a OHDSI WG.

My second doubt is:
2) I couldn’t locate an SQL file for the automatic implementation of this OMOP CDM extension. Am I required to implement the tables manually?

Thank you for any help you can provide.

P.S.: I’m sorry, I couldn’t find any link for the .sql file I cited in my first question. I tried to attach the SQL script as a .txt file, but a message told me that I’m not allowed to do so as a new forum user.

I can’t speak on the image stuff, but the CONCEPT_CPT4 file is not needed in the Vocab, it is a byproduct as you stated.

1 Like

Thank you for your precious feedback. While I’m at it, I’d like to make sure that I’m using the sql scripts provided to set up the OMOP schema in the correct order.

I firstly set up the tables with OMOPCDM_postgresql_5.4_ddl.sql, then import vocabulary concepts with OMOP CDM vocabulary load - PostgreSQL.sql and then finally set up the primary keys, indexes and constraints in this order.

My only doubt about the script order I’m following is: should the vocabularies be imported so early? Primary keys and indexes shouldn’t really be bothered by the presence or not of the vocabularies as long as the tables are properly defined, right?

Sorry again if this is pretty basic stuff to you but it’s my very first time working with a pre-made standard schema, thank you for your patience :grinning_face_with_smiling_eyes:

You are facing some basic setup issues. The best guidance is here:

We can provide direct assistance on our Discord:

What usually occurs with someone trying to standup the OMOP CDM is that there are alot of older documentation resources that don’t offer full context. The best/fastest way to enable yourself is with the docker environment that @lee_evans and @Ajit_Londhe have recently modernized and documented at the github link above.

I recommend using an external postgres install (versus the dockerized postgres that comes with the demo data pre-installed), wherein you set up the CDM and load the vocabularies, either using the Broadsea tooling, the R-scripts, or manually with a db IDE like dbeaver or Navicat.

Hope to see you in the Discord, and we should be able to get you up and running quickly.

1 Like
t