MIT-LCP / MIT-LCP/mimic-code

Try to retrieve the procedures of CT scan with contrast

Open
#1,556 1 comment 1 reaction 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

I am trying to retrieve the procedures of CT scan with contrast.
The procedures_icd file contains the CT scan with contrast records.
I used procedure icd_code to get the CT scan with contrast records.

df = pd.read_csv("d_icd_procedures.csv")
#get the icd_code of CT scan with contrast
df1 = df.loc[df['long_title'].astype(str).str.contains('contrast',na=False, flags=re.IGNORECASE)]
df2 = df1.loc[df1['long_title'].astype(str).str.contains('(CT Scan)',na=False, flags=re.IGNORECASE)]

#icd_code of CT scan with contrast to a list
a = df2['icd_code'].tolist()
separator = '|'
b = separator.join(a)

df2 = pd.read_csv("procedures_icd.csv")
df2 = df2[['subject_id','hadm_id','icd_code']]

#use re to parse the icd_code of CT scan with contrast
df3 = df2.loc[df2['icd_code'].astype(str).str.contains(b,na=False, flags=re.IGNORECASE)]

df3.to_csv("procedure_contrast_id.csv",index=False)
print(df3['hadm_id'].nunique())

There are only 15 records of CT scan with contrast in all MIMIC-IV database! This doesn't make sense. The ratio of CT contrast is too low!

Do I miss anything? or how could I get the CT scan with contrast records?
Thank you very much.

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 running the shown pandas filtering against d_icd_procedures.csv and procedures_icd.csv, focusing on how the ICD codes are combined and matched. Compare the resulting rows with the source procedure records; done means explaining the unexpectedly low count and documenting a reproducible way to retrieve the CT-with-contrast records.

Written by the indexing model from the issue text.

Assessment

Tech stack
pandas, python
Domain
data, databases
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
28/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.