there is some errors in mimic-code-2.5.0\mimic-iv\buildmimic\postgres\constraint.sql
Nobody has claimed this yet.
- Dominant language
- Jupyter Notebook
- Stars
- 3.4k
- Forks
- 1.7k
- PR merge metrics
- No merged PRs in 30d
Description
there is many errors in mimic-code-2.5.0\mimic-iv\buildmimic\postgres\constraint.sql
here is one of them, the others is similar.
ALTER TABLE mimiciv_hosp.diagnoses_icd DROP CONSTRAINT IF EXISTS diagnoses_icd_patients_fk;
ALTER TABLE mimiciv_hosp.diagnoses_icd
ADD CONSTRAINT diagnoses_icd_patients_fk
FOREIGN KEY (subject_id)
REFERENCES mimiciv_hosp.patients (subject_id);
error is there is no subject_id = 11404231 in the table of patients, so
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".
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with mimic-code-2.5.0\mimic-iv\buildmimic\postgres\constraint.sql and reproduce the diagnoses_icd foreign-key statements against the database. Check the reported subject_id mismatch and the similar constraint errors described in the issue. Done means the constraints in this file can be applied without foreign-key violations.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- postgresql
- Domain
- databases
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 35/100