mimic-code icon indicating copy to clipboard operation
mimic-code copied to clipboard

Error running constraint.sql on MIMIC-IV version 3.0

Open kaveelim opened this issue 6 months ago • 2 comments

Prerequisites

  • [X] Put an X between the brackets on this line if you have done all of the following:
    • Checked the online documentation: https://mimic.mit.edu/
    • Checked that your issue isn't already addressed: https://github.com/MIT-LCP/mimic-code/issues?utf8=%E2%9C%93&q=

Description

I've tried in buide a local mimic on a MacOs system with the MIMIC-IV version 3.0. At the step of running constraint.sql, there's an error...

psql:mimic-iv/buildmimic/postgres/constraint.sql:207: ERROR: insert or update on table "diagnoses_icd" violates foreign key constraint "diagnoses_icd_patients_fk" DETAIL: Key (subject_id)=(11404231) is not present in table "patients".

I've checked the shasum256 of the downloaded mimic files. Upon inspection, there is no subject_id=11404231 in the patients.csv file but it is present in the diagnoses_icd.csv file.

kaveelim avatar Aug 24 '24 13:08 kaveelim