OHDSI / CommonDataModel

Definition and DDLs for the OMOP Common Data Model (CDM)
https://ohdsi.github.io/CommonDataModel
854 stars 442 forks source link

[ERROR] Cannot Build Own CDM Version #581

Open TheCedarPrince opened 11 months ago

TheCedarPrince commented 11 months ago

Hi folks,

I have followed the README instructions on how to build one's own version of a CDM (i.e. v5.3, 5.4, OR 5.5). I am dabbling with a v5.5 just for prototyping and I have not been able to load my v5.5 schema into my fork of this package. Here were the exact steps I took on attempting this based off the README:

  1. Introducing Changes to the Model Structure

    1. Copy and rename table level and field level files within inst/csv as a foundation

    2. If adding new tables:

      • Make any changes to the renamed Table_Level.csv file

      • Include within changes:

      • Table name

      • Description

      • CDM schema

    3. If adding or modifying CDM fields

      • Make any changes to the renamed Field_Level.csv file

      • Structure columns to mimic DDL format

      • Indicate any constraints and datatypes

      • Update changes in userGuidance and etlConventions fields

  2. Verify Generation of DDLs

    1. Rebuild package via extras/codeToRun.R

    2. Verifying recognition of new version using listSupportedVersions()

    3. Running buildRelease() function to generate DDL file in inst/ddl directory for the new version

Following step 1, I created two new files that simply have v5.5 inplace of a v5.4 just to make sure things are working. These files lived within inst/csv per instructions. I then used RStudio to "Clean and build" the package after these changes. I then ran extras/codeToRun.R. Finally, I checked for v5.5 to be supported. It was not shown in the output of listSupportedVersions().

I have no idea what I am doing wrong and would very much appreciate any help here.

Thanks!

~ tcp 🌳

gklebanov commented 11 months ago

I do not believe there is 5.5 in place (yet) ?

image

the latest you should use is 5.4.1. Version's 6 should not be used as it will be archived

clairblacketer commented 11 months ago

Hi @gklebanov I think @TheCedarPrince is just trying to use the functions within the package to build the ddl files. If there is a v5.5 it would come from the CDM working group.

@TheCedarPrince have you tried manually adding your version to the listSupportedVersions() function? I think at the time we built it we just created the list by hand.

TheCedarPrince commented 11 months ago

Ah this is great to know @clairblacketer -- you are exactly right. That works perfectly. Would you be willing for me to make a docs PR about this small step to the README? I was under the impression the novel CSVs would be "picked up" by the package and update the listSupportedVersions function automatically.

clairblacketer commented 11 months ago

@TheCedarPrince that would be great!

TheCedarPrince commented 11 months ago

PR opened @clairblacketer ! Feel free to edit or adapt as needed. 😄 That PR should close this issue when merged as well.