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

Getting access to the MIMIC_IV_3.1_derived dataset in BigQuery

Open Zuzzurboom opened this issue 9 months ago • 10 comments

I am experiencing same issues as #1841 and #1867. I got full access to MIMIC IV but I have only icu and hosp datasets. How to get access to MIMIC IV 3.1 derived datasets?

Zuzzurboom avatar Mar 22 '25 01:03 Zuzzurboom

Hey, I'm having the same problem and after reviewing the SQL scripts for generating derived tables such as the Charlson Comorbidity Index, I noticed that the code references an older dataset version, specifically:

sql FROM physionet-data.mimiciv_hosp.diagnoses_icd

Whereas the current version we’re using is structured as:

sql FROM physionet-data.mimiciv_3_1_hosp.diagnoses_icd

This mismatch might be the reason we’re unable to use or recreate the derived tables in the current version. I have mailed Mr. Alistair Johnson and explained the issue and waiting for his response. Hope this will help.

s0fyan avatar Apr 07 '25 06:04 s0fyan

Hi S0fyan, yes your're right! I have been able to build the derived datasets just changing the dataset reference in the SQL query codes with the updated ones, then one derived dataset builds the other in chain.

Zuzzurboom avatar Apr 07 '25 07:04 Zuzzurboom

Hey, have you got the access to Derived Tables???

s0fyan avatar Apr 09 '25 11:04 s0fyan

Yes, I did.

You can use the same SQL queries from the MIMIC-Code repository and run them on Google BigQuery, updating the dataset path in the FROM/JOIN clauses. Start with the derived datasets that can be built directly from the original modules and then proceed to those that require other derived modules.

Zuzzurboom avatar Apr 10 '25 23:04 Zuzzurboom

Hello mate, I appreciate the work you've done of creating Tables on your own. Would you consider now to share with rest of community as it's quite easy process to give access to others on Bigquery.

s0fyan avatar Apr 20 '25 22:04 s0fyan

I have created the derived tables for 3.1 but it would be difficult to give access on BigQuery since the recipient needs to have completed the Physionet DUA and have approval to access the dat but I have no way to know that.

If the Physionet team is willing to transfer to their bucket for others to download from then that would be better. I can also share my queries and the order in which you need to run them, you would just need to search through and replace the name of my derived folder with your own.

marymlucas avatar Apr 22 '25 00:04 marymlucas

First of all thanks for reaching out, second thing I really appreciate your time and effort for creating Derived Tables Now, I could email you my proof of Physionet DUA in case you are skeptical that either I've access to MIMIC Database or not (one thing to ponder, why would I or anybody else do all this if one don't have MIMIC access, I mean it's pretty obvious). Let me clear you one thing, Physionet team is not gonna do shit as you can see how many issues are unanswered and nobody is giving shit about any issue. I personally reached out to every MIT-LCP programmer to resolve the issue but none of them gave reply to any of my mails. Its quite simple to give access to your derived tables on Bigquery, If you're willing to help out give a thumps up and I'll share you my details in email and explain how to share if need be. Thanks anyway and please don't ghost like Zuzzurboom, guy disappeared as soon as he got his problem resolved.

s0fyan avatar Apr 22 '25 00:04 s0fyan

Hi @s0fyan it's not that I doubt your access, I just want to be careful not to violate the terms of the DUA I signed. I will email the Physionet team anyway because I think it may be helpful to others as well, and I hope they will reply. You can email me your details if you want.

I have also uploaded my modified SQL files, the order in which I ran them to ensure they didn't fail, and a Python script to search each script and replace BigQuery project name with yours.

You can find all the code here: https://github.com/marymlucas/mimiciv_3_1_derived

marymlucas avatar Apr 22 '25 02:04 marymlucas

Hi guys.

Big thanks to @marymlucas for putting together a clear repository with the updated SQL queries for building the MIMIC 3.1 derived datasets. It outlines the same steps I followed and will really help clarify what I was trying to explain above.

@s0fyan I am sorry but these have been busy days with Easter and holidays too. As I have already mentioned, I can't share directly the derived datasets with you, but I am happy to explain, share codes and help you build your own derived datasets.

At this point, following @marymlucas' repository should solve your issues, otherwise feel free to ask.

Zuzzurboom avatar Apr 22 '25 04:04 Zuzzurboom

No problem mate. Lucas' queries did the thing and I'm working on creating my own tables. Thanks a lot for all the help.

s0fyan avatar Apr 22 '25 11:04 s0fyan