File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed
src/cehrbert/data_generators/hf_data_generator Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -373,9 +373,9 @@ def omop_meds_generate_demographics_and_patient_blocks(
373373 # Skip out of the loop if the events' time stamps are beyond the prediction time
374374 if prediction_time is not None and e .time > prediction_time :
375375 break
376- # Skip out of the loop if the events' time stamps are before the observation start window
376+ # Skip the events that occurred before observation start window
377377 if observation_start_window is not None and e .time < observation_start_window :
378- break
378+ continue
379379 if getattr (e , "visit_id" , None ):
380380 visit_id = e .visit_id
381381 visit_events [visit_id ].append (e )
@@ -567,10 +567,10 @@ def mimic_meds_generate_demographics_and_patient_blocks(
567567 if e .time > prediction_time :
568568 break
569569
570- # Skip out of the loop if the events' time stamps are before observation start window
570+ # Skip the events that occurred before observation start window
571571 if observation_start_window is not None and e .time is not None :
572572 if e .time < observation_start_window :
573- break
573+ continue
574574
575575 # This indicates demographics features
576576 event_code_uppercase = e .code .upper ()
You can’t perform that action at this time.
0 commit comments