OHDSI / OHDSI/CommonDataModel

fix: mark cohort_definition_id as primary key in cohort_definition table for v5.3 and v5.4

Open Beginner friendly
#787 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
HTML
Stars
1.1k
Forks
508
Avg merge
1h 30m
Merged PRs (30d)
3

Description

Problem

The cohort_definition_id field in the cohort_definition table is not marked as a primary key in the CSV spec files for v5.3 and v5.4, even though it is the natural primary key for that table (each cohort definition has a unique ID). The v6.0 CSV correctly marks it as a primary key.

Affected Files

  • inst/csv/OMOP_CDMv5.3_Field_Level.csvcohort_definition,cohort_definition_id has isPrimaryKey=No
  • inst/csv/OMOP_CDMv5.4_Field_Level.csv — same issue
  • docs/cdm53.html — generated HTML shows Primary Key=No
  • docs/cdm54.html — generated HTML shows Primary Key=No

Proposed Fix

Change isPrimaryKey from No to Yes for the cohort_definition_id field in the cohort_definition table in both v5.3 and v5.4 CSV files, and update the generated HTML docs accordingly.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the cohort_definition_id rows in inst/csv/OMOP_CDMv5.3_Field_Level.csv and inst/csv/OMOP_CDMv5.4_Field_Level.csv, then compare their corresponding entries in docs/cdm53.html and docs/cdm54.html. Confirm that the primary-key value is Yes in both CSV specifications and the generated HTML documentation.

Written by the indexing model from the issue text.

Assessment

Tech stack
html
Domain
databases, documentation
Issue type
Bug
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Quiet
Clarity
Clearly specified
Newbie friendliness
82/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.