thbndi commited on
Commit
e1c7e5a
1 Parent(s): 4daabf7

Update day_intervals_cohort_v22.py

Browse files
Files changed (1) hide show
  1. day_intervals_cohort_v22.py +2 -5
day_intervals_cohort_v22.py CHANGED
@@ -322,7 +322,7 @@ def extract_data(use_ICU:str, label:str, time:int, icd_code:str, root_dir,mimic_
322
  disease_label=disease_label,
323
  use_ICU=use_ICU
324
  )
325
- #print("pts",pts.head())
326
 
327
  # cols to be extracted from get_case_ctrls
328
  cols = [group_col, visit_col, admit_col, disch_col, 'Age','gender','ethnicity','insurance','label']
@@ -339,13 +339,10 @@ def extract_data(use_ICU:str, label:str, time:int, icd_code:str, root_dir,mimic_
339
 
340
  if use_ICU:
341
  cols.append(adm_visit_col)
342
- #print(cohort.head())
343
 
344
  if use_disease:
345
  hids=disease_cohort.extract_diag_cohort(cohort['hadm_id'],icd_code,mimic_path)
346
- #print(hids.shape)
347
- #print(cohort.shape)
348
- #print(len(list(set(hids['hadm_id'].unique()).intersection(set(cohort['hadm_id'].unique())))))
349
  cohort=cohort[cohort['hadm_id'].isin(hids['hadm_id'])]
350
  cohort_output=cohort_output+"_"+icd_code
351
  summary_output=summary_output+"_"+icd_code
 
322
  disease_label=disease_label,
323
  use_ICU=use_ICU
324
  )
325
+ print("v22 fin get_visit_pts")
326
 
327
  # cols to be extracted from get_case_ctrls
328
  cols = [group_col, visit_col, admit_col, disch_col, 'Age','gender','ethnicity','insurance','label']
 
339
 
340
  if use_ICU:
341
  cols.append(adm_visit_col)
342
+ print('saving summary')
343
 
344
  if use_disease:
345
  hids=disease_cohort.extract_diag_cohort(cohort['hadm_id'],icd_code,mimic_path)
 
 
 
346
  cohort=cohort[cohort['hadm_id'].isin(hids['hadm_id'])]
347
  cohort_output=cohort_output+"_"+icd_code
348
  summary_output=summary_output+"_"+icd_code