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

Unable to Access Derived Tables for MIMIC-IV v3.1 on BigQuery – Possible Issue with Table References

Open s0fyan opened this issue 8 months ago • 3 comments

I’m currently working with the MIMIC-IV v3.1 dataset on Google BigQuery (mimiciv_3_1_hosp and mimiciv_3_1_icu) and wanted to use the mimiciv_derived tables provided in your official GitHub repository. However, we are unable to access or generate these derived tables directly in BigQuery.

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.

Could you please clarify: 1.Is there an updated version of the derived queries compatible with MIMIC-IV v3.1 on BigQuery? 2.If not, is there a plan to release updated versions that reference the current table structures?

s0fyan avatar Apr 07 '25 06:04 s0fyan

In case it may be helpful to anyone else I have uploaded my modified SQL files for creating the derived tables for v3.1 in BigQuery, 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 11:04 marymlucas

Thanks a lot Lucas, you did wonderful work there. I'm already working on creating Derived Tables using your queries.

s0fyan avatar Apr 22 '25 11:04 s0fyan

Thank you @marymlucas you've saved us a lot of time 🍰

RosalynLP avatar Jun 10 '25 13:06 RosalynLP