sunlabuiuc / PyHealth

A Deep Learning Python Toolkit for Healthcare Applications.
https://pyhealth.readthedocs.io
MIT License
956 stars 207 forks source link

Cannot download 'https://storage.googleapis.com/pyhealth/resource/NDC_to_ATC.csv' #200

Closed junjzhang7 closed 1 year ago

junjzhang7 commented 1 year ago

When initialize the MIMIC3Dataset() class, I get urllib.error.URLError. And I checked the call stack, I found the problem lies in the function download_and_read_csv() of the CrossMap class. I think it's because of my own Internet connection, while I hope to open the local download permission for these files and alternate network download with local file reading.

AJ-Fresnel commented 1 year ago

Hello^ ^, I have also encountered this issue and I am unable to access it https://storage.googleapis.com/pyhealth/resource/NDC_to_CCSCM.csv Have you solved this problem yet?

pat-jj commented 1 year ago

Hi, thanks for the question. Could you share the code for the MIMIC3Dataset() initialization? By the way, NDC_to_CCSCM.csv does not exist as NDC is a vocabulary for drugs while CCSCM is a vocabulary for conditions.

junjzhang7 commented 1 year ago

Of course, thanks for your reply. Here is the code for the MIMIC3Dataset() initialization. And the root is the file's local path, which includes DIAGNOSES_ICD.csv, PROCEDURES_ICD.csv, and PRESCRIPTIONS.csv.

截屏2023-08-23 12 10 08

I get the urllib.error.URLError when the function download_and_read_csv() tries to download the NDC_to_ATC.csv.

截屏2023-08-23 12 27 00
pat-jj commented 1 year ago

The code mapping file xxx.csv is downloaded and stored as .cache/pyhealth/medcode/xxx.csv in your home directory. urllib.error.URLError may due to the network problem downloading file from our Google Cloud Server. As an alternative solution, we have uploaded a zipped file containing all the mapping files to Google Drive

You can download it, unzip it, and put all .csv files in .cache/pyhealth/medcode/, which should address the issue.

junjzhang7 commented 1 year ago

It works! Thank you and your meaningful work! :thumbsup: :thumbsup: :thumbsup: