thbndi commited on
Commit
fff395e
·
1 Parent(s): f4555b1

Update Mimic4Dataset.py

Browse files
Files changed (1) hide show
  1. Mimic4Dataset.py +22 -4
Mimic4Dataset.py CHANGED
@@ -555,10 +555,6 @@ def task_cohort(task, mimic_path, config_path):
555
  select_out= False
556
  select_chart= False
557
 
558
-
559
-
560
-
561
-
562
  # -------------------------------------------------------------------------------------------------------------
563
 
564
  data_icu=icu_no_icu=="ICU"
@@ -610,9 +606,31 @@ def task_cohort(task, mimic_path, config_path):
610
  feature_selection_hosp.generate_summary_hosp(diag_flag,proc_flag,med_flag,lab_flag)
611
  #----------------------------------------------FEATURE SELECTION---------------------------------------------
612
 
 
 
613
  if data_icu:
 
 
 
 
 
 
 
 
 
 
 
614
  feature_selection_icu.features_selection_icu(cohort_output, diag_flag,proc_flag,med_flag,out_flag, chart_flag,select_diag,select_med,select_proc,select_out,select_chart)
615
  else:
 
 
 
 
 
 
 
 
 
616
  feature_selection_hosp.features_selection_hosp(cohort_output, diag_flag,proc_flag,med_flag,lab_flag,select_diag,select_med,select_proc,select_lab)
617
 
618
  #---------------------------------------CLEANING OF FEATURES-----------------------------------------------
 
555
  select_out= False
556
  select_chart= False
557
 
 
 
 
 
558
  # -------------------------------------------------------------------------------------------------------------
559
 
560
  data_icu=icu_no_icu=="ICU"
 
606
  feature_selection_hosp.generate_summary_hosp(diag_flag,proc_flag,med_flag,lab_flag)
607
  #----------------------------------------------FEATURE SELECTION---------------------------------------------
608
 
609
+ #----------------------------------------------FEATURE SELECTION---------------------------------------------
610
+
611
  if data_icu:
612
+ if select_chart or select_out or select_diag or select_med or select_proc:
613
+ if select_chart:
614
+ input('Please modify the file \'preproc_chart_icu.csv.gz\' in the folder /data/features to select the chart items to keep and press enter to continue')
615
+ if select_out:
616
+ input('Please modify the file \'preproc_out_icu.csv.gz\' in the folder /data/features to select the output items to keep and press enter to continue')
617
+ if select_diag:
618
+ input('Please modify the file \'preproc_diag_icu.csv.gz\' in the folder /data/features to select the diagnosis ids to keep and press enter to continue')
619
+ if select_med:
620
+ input('Please modify the file \'preproc_med_icu.csv.gz\' in the folder /data/features to select the meds items to keep and press enter to continue')
621
+ if select_proc:
622
+ input('Please modify the file \'preproc_proc_icu.csv.gz\' in the folder /data/features to select the procedures ids to keep and press enter to continue')
623
  feature_selection_icu.features_selection_icu(cohort_output, diag_flag,proc_flag,med_flag,out_flag, chart_flag,select_diag,select_med,select_proc,select_out,select_chart)
624
  else:
625
+ if select_diag or select_med or select_proc or select_lab:
626
+ if select_diag:
627
+ input('Please modify the file \'preproc_diag.csv.gz\' in the folder /data/features to select the diagnosis ids to keep and press enter to continue')
628
+ if select_med:
629
+ input('Please modify the file \'preproc_med.csv.gz\' in the folder /data/features to select the meds items to keep and press enter to continue')
630
+ if select_proc:
631
+ input('Please modify the file \'preproc_proc.csv.gz\' in the folder /data/features to select the procedures ids to keep and press enter to continue')
632
+ if select_lab:
633
+ input('Please modify the file \'preproc_labs.csv.gz\' in the folder /data/features to select the labs items to keep and press enter to continue')
634
  feature_selection_hosp.features_selection_hosp(cohort_output, diag_flag,proc_flag,med_flag,lab_flag,select_diag,select_med,select_proc,select_lab)
635
 
636
  #---------------------------------------CLEANING OF FEATURES-----------------------------------------------