Skip to content

Failed to add constraints in MIMIC-IV 1.0 #1071

@ZhangAngus

Description

@ZhangAngus

Prerequisites

Description

Description of the issue, including:

  • what you have tried
  • references to similar issues
  • queries demonstrating your question (if applicable)

Problem

Database

MIMIC-IV, v1.0

When running the constraint.sql provided in https://github.com/MIT-LCP/mimic-code/blob/main/mimic-iv/buildmimic/postgres/constraint.sql, an error occurred:

ERROR:  Insert or update "diagnoses_icd" violates foreign key constraints of "diagnoses_icd_admissions_fk"
Description:  The key value pair (hadm_id)=(20826040) does not appear in the table "admissions".

So I checked the admissions table. There is no record having hadm_id = 20826040.
And I checked the admissions.csv.gz in MIMIV-IV, v0.4. There is one record having hadm_id = 20826040.

Please fix the data loss error in new version admissions table. Thanks.(●'◡'●)

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions