-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
persist the patient events throughout the generation of the patient s…
…equences for better readability and debugging purposes (#24) * persist the patient events throughout the generation of the patient sequences for debugging purposes * set the outpatient visit_start_datetime to be at the start of the day * explicitly cast datetime of ehr records to time stamps * cast timestamps in extract_features * infer the inpatient visits based on the duration of the visits. If the duration is grater than 24 hours, the visits will be set to inpatient * switched to spark function to filter instead of the sql syntax * saved all the temp dataframes when cleaning up the visit information of the EHR shot records * updated the real_visits_folder variable name * fixed a bug in referencing the columns * use aliases in joining ehr_shot_data to inferred_inpatient_visits * fixed a bug in creating code for the ehrshot data for non visit events * fixed a bug in creating the start and end date times for visit records in ehrshot data * started working on fixing inpatient visits * added spark applications to connect ehrshot visit chronologically * removed unncessary logging * added inpatient_hour_diff_threshold and outpatient_hour_diff_threshold to control how far apart two visits are from each other to be considered as separate visits * exclude visit_occurrence and death from being updated using the visit_mapping table * copy vocab tables * copy person table over * persist visit during AttEventDecorator * fixed a bug when extract_features spark app is run when bound_visit_end_date is set to True * the visits need to be bounded per cohort member * persist cohort_visit_occurrence to the disk * updated the persistant dataframe paths * disconnect the records whose time stamps fall outside of the corresponding visit window * fix the visit and domain records whose time stamps fall outside of the corresponding visit range * fixed the bug in creating the new visit_id * added original_visit_id to the ehrshot output * fixed a bug when bound_visit_end is enable in extract_features.py * Add an artificial token for the visit in which the prediction is made * added placeholder tokens to the output folder for debugging * fixed the placeholder token time stamps * filter for visit_occurrence records based on the cohort_member_id and index_date * use event_start to construct the visit_end_datetime for artificial visits * changed the way to bound the visit_end_datetime * fixed windowing bug in creating visit_rank * fixed a bug in constructing the visit mappings * removed a query that does not affect the results * use hours to infer whether the visit start/end date times need to be fixed * if we split inpatient visits into multiple visits, we need to check if each individual visit is less than 24 hours * changed the day_cutoff default value to 1 * if we split inpatient visits into multiple visits, we need to check if each individual visit is less than 24 hours * We create placeholder tokens for those inpatient visits, where the first token occurs after the index_date * removed unused imports * try to fix the java incompatibility issue with pyspark * fixed the unit test
- Loading branch information
Showing
14 changed files
with
872 additions
and
114 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.