OHDSI / OHDSI/CommonDataModel

Missing primary key for table `death`?

Open
#770 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

Table death does not have a primary key, although this would help with data integrity. How unique are rows in that table?

My initial thought is that person_id can be a primary key in that table -- as all can be anticipated to die at most once --, but I am unclear
about whether death_type_concept_id and cause_concept_id model a 1:1 relationship with a death event. If not the case, and a death event can be associated with multiple death types or causes, a different primary key should be used.

This is currently present in all three versions 5.3, 5.4, and 6.0.

5.3
https://github.com/OHDSI/CommonDataModel/blob/d83d48c2ba1b641879c33958903f630318421cb8/inst/csv/OMOP_CDMv5.3_Field_Level.csv#L181-L187

5.4
https://github.com/OHDSI/CommonDataModel/blob/d83d48c2ba1b641879c33958903f630318421cb8/inst/csv/OMOP_CDMv5.4_Field_Level.csv#L193-L199

6.0
https://github.com/OHDSI/CommonDataModel/blob/d83d48c2ba1b641879c33958903f630318421cb8/inst/csv/OMOP_CDMv6.0_Field_Level.csv#L185-L191

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 by comparing the death-table field definitions linked for OMOP CDM versions 5.3, 5.4, and 6.0. Determine whether person_id uniquely identifies rows and whether death_type_concept_id or cause_concept_id permit multiple records per event. Done means the key decision is resolved and the affected model definitions and DDLs are updated consistently across all three versions.

Written by the indexing model from the issue text.

Assessment

Tech stack
sql
Domain
databases
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.