MIT-LCP / MIT-LCP/mimic-code

Duplicates of emar_detail rows in MIMIC-IV v2.0

Open
#1,326 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Jupyter Notebook
Stars
3.4k
Forks
1.7k
PR merge metrics
No merged PRs in 30d

Description

Prerequisites
Description

Hello! I was doing some work with MIMIC-IV v2.0 emar_detail and noticed that there are some duplicate rows (~3,700). This may be human input error or something from the deidentification process.

I ran the following query to identify the rows with duplicates:

SELECT
    emar_id
    , parent_field_ordinal
FROM mimic_hosp.emar_detail ed
GROUP BY
    emar_id
    , parent_field_ordinal  
HAVING count(*) > 1;

I then validated that the rows were truly identical by pulling a couple of the emar_id/parent_field_ordinal combos. It would be nice to have these duplicate rows removed in future if possible.

I did notice that the constraints file commented out the emar_detail primary key element. Was it commented out for a particular reason?

Thanks for all the hard work maintaining MIMIC, it's great!

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 reproducing the duplicate check against mimic_hosp.emar_detail using the issue's emar_id and parent_field_ordinal query. Read mimic-iv/buildmimic/postgres/constraint.sql, especially the commented emar_detail primary-key element, to understand why it is disabled. Done means determining the cause and documenting or implementing an agreed way to prevent or remove the duplicate rows.

Written by the indexing model from the issue text.

Assessment

Tech stack
postgresql, sql
Domain
databases
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.