Skip to content

fix missaligned csv fields and vocabulary primary key - #820

Open
thisismexp wants to merge 5 commits into
OHDSI:developfrom
thisismexp:main
Open

thisismexp wants to merge 5 commits into
OHDSI:developfrom
thisismexp:main

Conversation

@thisismexp

@thisismexp thisismexp commented Oct 20, 2026 •

Copy link
Copy Markdown

Two things:

  • Probably not immensely relevant, but there was a misalignment of field in drug_exposure.days_supply (only in version v5.3 and v6.0), which also surfaces on the webpage
  • The vocabulary Table in v5.4 had no primary key, and in v5.5 the primary key was not marked as required

@thisismexp thisismexp changed the title fix missaligned csv fields fix missaligned csv fields and vocabulary primary key Oct 20, 2026

@MaximMoinat MaximMoinat left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@thisismexp Agree with the alignment fix and making vocabulary_id required in v5.5. Please remove the v5.4 change.

Comment thread inst/csv/OMOP_CDMv5.4_Field_Level.csv Resolved
Comment thread inst/csv/OMOP_CDMv5.4_Field_Level.csv Resolved
@MaximMoinat
MaximMoinat changed the base branch from main to develop November 19, 2026 20:34

@MaximMoinat MaximMoinat left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Changed branch to develop as making vocabulary_id not required changes the DDL, and officially introduce a bugfix version.

@chenyangsu

chenyangsu commented Nov 20, 2026 •

Copy link
Copy Markdown

This vocabulary_id change reverses #803. Since #803, createPrimaryKeys() writes a UNIQUE constraint instead of a primary key when a key field is not required (R/createDdl.R:150-160), so that the table can hold a version row with vocabulary_id = NULL.

The v5.5 spec text points the other way, though. The VOCABULARY guidance says the release version is the row with vocabulary_id = 'None', the SQL Scripts page reads it with WHERE vocabulary_id = 'None', and the vocabulary team's StartRelease.sql writes it the same way. That row works under a NOT NULL primary key. So which convention holds needs a decision before this hunk merges: NULL (keep #803) or 'None' (this PR).

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants