Update Mimic4Dataset.py
Browse files- Mimic4Dataset.py +5 -5
Mimic4Dataset.py
CHANGED
@@ -29,7 +29,7 @@ _HOMEPAGE = "https://huggingface.co/datasets/thbndi/Mimic4Dataset"
|
|
29 |
_CITATION = "https://proceedings.mlr.press/v193/gupta22a.html"
|
30 |
_GIT_URL = "https://github.com/healthylaife/MIMIC-IV-Data-Pipeline"
|
31 |
|
32 |
-
_ICD_CODE = f"{_BASE_URL}/icd10.txt"
|
33 |
_DATA_GEN = f"{_BASE_URL}/data_generation_icu_modify.py"
|
34 |
_DATA_GEN_HOSP= f"{_BASE_URL}/data_generation_modify.py"
|
35 |
_DAY_INT= f"{_BASE_URL}/day_intervals_cohort_v22.py"
|
@@ -166,9 +166,9 @@ class Mimic4Dataset(datasets.GeneratorBasedBuilder):
|
|
166 |
|
167 |
|
168 |
#####################downloads modules from hub
|
169 |
-
if not os.path.exists('./icd10.txt'):
|
170 |
-
|
171 |
-
|
172 |
|
173 |
if not os.path.exists('./model/data_generation_icu_modify.py'):
|
174 |
file_path, head = urlretrieve(_DATA_GEN, "data_generation_icu_modify.py")
|
@@ -522,7 +522,7 @@ class Mimic4Dataset(datasets.GeneratorBasedBuilder):
|
|
522 |
)
|
523 |
|
524 |
def _generate_examples_text(self, filepath):
|
525 |
-
icd = pd.read_csv('
|
526 |
items= pd.read_csv(self.mimic_path+'/icu/d_items.csv.gz',compression='gzip', header=0)
|
527 |
with open(filepath, 'rb') as fp:
|
528 |
dico = pickle.load(fp)
|
|
|
29 |
_CITATION = "https://proceedings.mlr.press/v193/gupta22a.html"
|
30 |
_GIT_URL = "https://github.com/healthylaife/MIMIC-IV-Data-Pipeline"
|
31 |
|
32 |
+
#_ICD_CODE = f"{_BASE_URL}/icd10.txt"
|
33 |
_DATA_GEN = f"{_BASE_URL}/data_generation_icu_modify.py"
|
34 |
_DATA_GEN_HOSP= f"{_BASE_URL}/data_generation_modify.py"
|
35 |
_DAY_INT= f"{_BASE_URL}/day_intervals_cohort_v22.py"
|
|
|
166 |
|
167 |
|
168 |
#####################downloads modules from hub
|
169 |
+
#if not os.path.exists('./icd10.txt'):
|
170 |
+
# file_path, head = urlretrieve(_ICD_CODE, "icd10.txt")
|
171 |
+
# shutil.move(file_path, './')
|
172 |
|
173 |
if not os.path.exists('./model/data_generation_icu_modify.py'):
|
174 |
file_path, head = urlretrieve(_DATA_GEN, "data_generation_icu_modify.py")
|
|
|
522 |
)
|
523 |
|
524 |
def _generate_examples_text(self, filepath):
|
525 |
+
icd = pd.read_csv(self.mimic_path+'/hosp/d_icd_diagnoses.csv.gz',compression='gzip', header=0)
|
526 |
items= pd.read_csv(self.mimic_path+'/icu/d_items.csv.gz',compression='gzip', header=0)
|
527 |
with open(filepath, 'rb') as fp:
|
528 |
dico = pickle.load(fp)
|