Update dataset_utils.py
Browse files- dataset_utils.py +4 -4
dataset_utils.py
CHANGED
@@ -353,7 +353,7 @@ def generate_text(data,icd,items,feat_cond,feat_chart,feat_meds, feat_proc, feat
|
|
353 |
chart_text = '; '.join(f"{mean_val} for {feat_label}" for mean_val, feat_label in zip(chart_mean, feat_text))
|
354 |
chart_text = f"The chart events measured were: {chart_text}. "
|
355 |
else:
|
356 |
-
chart_text = ''
|
357 |
else:
|
358 |
chart_text = ''
|
359 |
|
@@ -369,7 +369,7 @@ def generate_text(data,icd,items,feat_cond,feat_chart,feat_meds, feat_proc, feat
|
|
369 |
meds_text = '; '.join(f"{mean_val} of {feat_label}" for mean_val, feat_label in zip(meds_mean, feat_text))
|
370 |
meds_text = f"The mean amounts of medications administered during the episode were: {meds_text}. "
|
371 |
else:
|
372 |
-
meds_text = ''
|
373 |
else:
|
374 |
meds_text = ''
|
375 |
|
@@ -382,7 +382,7 @@ def generate_text(data,icd,items,feat_cond,feat_chart,feat_meds, feat_proc, feat
|
|
382 |
template = 'The procedures performed were: {}. '
|
383 |
proc_text= template.format('; '.join(feat_text))
|
384 |
else:
|
385 |
-
proc_text=''
|
386 |
else:
|
387 |
proc_text=''
|
388 |
|
@@ -395,7 +395,7 @@ def generate_text(data,icd,items,feat_cond,feat_chart,feat_meds, feat_proc, feat
|
|
395 |
template ='The outputs collected were: {}.'
|
396 |
out_text = template.format('; '.join(feat_text))
|
397 |
else:
|
398 |
-
out_text=''
|
399 |
else:
|
400 |
out_text=''
|
401 |
|
|
|
353 |
chart_text = '; '.join(f"{mean_val} for {feat_label}" for mean_val, feat_label in zip(chart_mean, feat_text))
|
354 |
chart_text = f"The chart events measured were: {chart_text}. "
|
355 |
else:
|
356 |
+
chart_text = 'No chart events were measured. '
|
357 |
else:
|
358 |
chart_text = ''
|
359 |
|
|
|
369 |
meds_text = '; '.join(f"{mean_val} of {feat_label}" for mean_val, feat_label in zip(meds_mean, feat_text))
|
370 |
meds_text = f"The mean amounts of medications administered during the episode were: {meds_text}. "
|
371 |
else:
|
372 |
+
meds_text = 'No medications were administered. '
|
373 |
else:
|
374 |
meds_text = ''
|
375 |
|
|
|
382 |
template = 'The procedures performed were: {}. '
|
383 |
proc_text= template.format('; '.join(feat_text))
|
384 |
else:
|
385 |
+
proc_text='No procedures were performed. '
|
386 |
else:
|
387 |
proc_text=''
|
388 |
|
|
|
395 |
template ='The outputs collected were: {}.'
|
396 |
out_text = template.format('; '.join(feat_text))
|
397 |
else:
|
398 |
+
out_text='No outputs were collected.'
|
399 |
else:
|
400 |
out_text=''
|
401 |
|