onlyzdd / clinical-fusion

Clinical data fusion
29 stars 15 forks source link

Problems with query processing that didn't create a View #4

Closed CalendulaED closed 3 years ago

CalendulaED commented 3 years ago

After setup the database with postgresql, I have tried to run the SQL in the query folder.

For example, this is what happen when I run the adm_details.sql: It shows SELECT 0 image

So I think it doesn't generate any views, not sure how to solve this. This also happens when I run other SQL Thank you

onlyzdd commented 3 years ago

Sorry to hear that it's not working on your computer, @CalendulaED. These queries works well on my computer. I'm not very sure whether the problem is caused by your MIMIC-III database setup. Could you please check whether you have imported the *.csv data files to your local Postgres database correctly? (Try SELECT count(*) FROM patients for example) If not, please follow https://github.com/MIT-LCP/mimic-code/tree/main/mimic-iii/buildmimic/postgres.

D71156C3-3999-47B9-8CE0-7C0DA472903A
CalendulaED commented 3 years ago

Thank you so much for your help! I have tried to SELECT count(*) FROM patients and it output nothing. So maybe the problem is from the Postgres database. image

However, I did follow each procedure to build the database.... May I ask which version of the Postgres are you currently use? I am currently using Postgres 10.

Thank you so much for your help!

onlyzdd commented 3 years ago

Sorry to hear this. Currently, I'm using Postgres 9.4.24. Please follow https://github.com/MIT-LCP/mimic-code/tree/main/mimic-iii/buildmimic/postgres, I think it should work well with newer Postgres versions. Please let me know if you have any other problems.

CalendulaED commented 3 years ago

I have managed to solve the problem by specifying the schema.

Thank you so much for your help!