Skip to content

Commit

Permalink
remove files if they are not in the set of mimic tables
Browse files Browse the repository at this point in the history
  • Loading branch information
alistairewj committed Aug 25, 2024
1 parent 563ac8a commit 72fa263
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions mimic-iv/buildmimic/sqlite/import.py
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,11 @@ def main():
print(f"Missing tables: {missing_tables}")
sys.exit()

# subselect to only tables in the above list
data_files = [f for f, t in zip(data_files, tablenames) if t in _MIMIC_TABLES]
tablenames = [t for t in tablenames if t in _MIMIC_TABLES]
print(f"Importing {len(tablenames)} files.")

pt = None
subjects = None
if args.limit > 0:
Expand Down

0 comments on commit 72fa263

Please sign in to comment.