The seq_num and chartdate of procedures may contradict each other [MIMIC-IV]
Nobody has claimed this yet.
- Dominant language
- Jupyter Notebook
- Stars
- 3.4k
- Forks
- 1.7k
- PR merge metrics
- No merged PRs in 30d
Description
Hi!
When studying the procedures_icd table in MIMIC-IV database, I found that some patients have wrong seq_num.
Take hadm_id = 28667633 as an example.
| Line | subject_id | hadm_id | seq_num | chartdate | icd_code | icd_version |
|---|---|---|---|---|---|---|
| 1 | 10602248 | 28667633 | 1 | 2162-04-05 | 016 | 9 |
| 2 | 10602248 | 28667633 | 2 | 2162-04-05 | 0159 | 9 |
| 3 | 10602248 | 28667633 | 3 | 2162-04-05 | 0212 | 9 |
| 4 | 10602248 | 28667633 | 4 | 2162-04-04 | 8841 | 9 |
| 5 | 10602248 | 28667633 | 5 | 2162-04-04 | 8848 | 9 |
According to the document, seq_num is the order in which the procedures occurred within the hospital stay. Why the 4th procedure occurred in 4/4 but the 3rd procedure occurred in 4/5?
Here's another example (hadm_id = 24692585)
| Line | subject_id | hadm_id | seq_num | chartdate | icd_code | icd_version |
|---|---|---|---|---|---|---|
| 1 | 16353835 | 24692585 | 1 | 2147-11-27 | 016 | 9 |
| 2 | 16353835 | 24692585 | 2 | 2147-11-27 | 0124 | 9 |
| 3 | 16353835 | 24692585 | 3 | 2147-11-27 | 2049 | 9 |
| 4 | 16353835 | 24692585 | 4 | 2147-11-27 | 199 | 9 |
| 5 | 16353835 | 24692585 | 5 | 2147-11-26 | 3972 | 9 |
| 6 | 16353835 | 24692585 | 6 | 2147-11-27 | 0239 | 9 |
| 7 | 16353835 | 24692585 | 7 | 2147-11-26 | 8841 | 9 |
Is there anything wrong? Or chartdate is not the date in which the procedure occurred?
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 by reviewing the MIMIC-IV procedures_icd documentation and the two example admissions cited in the issue. Determine whether seq_num is intended to order procedures by chartdate, clarify what chartdate represents, and document whether these rows indicate a data error or expected behavior.
Written by the indexing model from the issue text.
Assessment
- Domain
- databases
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 30/100