OHDSI Home | Forums | Wiki | Github

How is the cohort definition id generated? Would it be possible to insert a cohort into WebAPI tables that was created outside of ATLAS?

Hello All,

I am new to the OHDSI community and I look forward to discussions with you all.

I have been studying the source code for ATLAS, but would like some help understanding the functionality of some of the code. For example, one question I have is: how are cohort_defintion_ids generated? Where does the numbering start? I have been creating cohorts on our own instance of ATLAS, but it seems like the convention for id generation is consistent one day (959, 960, 961, etc), and then it starts on a completely different number on another day but is still consecutive for cohorts created after that (12509, 12510, 12511, etc). Is there a reason for this?

I ask this because I want to see if I can insert a cohort into the WebAPI cohort tables from outside ATLAS (following all the proper formatting, of course), but in a way that it doesn’t affect ATLAS. Which of the cohort tables should be populated so that ATLAS does not fail? This external cohort would have its own id, but this id would need to be unique so that it doesn’t have the same id as another cohort currently in the tables. Knowing how these ids are assigned would be helpful in getting this to work. Would this be possible? I can further explain if needed.

Thanks.

When you create a cohort through ATLAS it is saving the cohort through the WebAPI. The WebAPI is storing the cohort definition inside the cohort_definition table in the OHDSI schema database. The cohort definition id is an autogenerated number that is typically coming from the underlying relational database platform where the OHDSI schema is stored. When you generate a cohort for a particular CDM the data is written to the cohort table in the results schema that has been identified for that CDM.

Could you describe more about your particular environment setup?

Frank,

Thank you for the explanation.

Currently we have ATLAS running on a remote server. We are also storing the data on two databases as well. One uses Postgresql and stores a cohort definition into the appropriate table once it has been saved. The one on Netezza stores data ONLY when the the cohort has been generated.

t