Skip to content

Commit 72fa263

Browse files
committed
remove files if they are not in the set of mimic tables
1 parent 563ac8a commit 72fa263

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

mimic-iv/buildmimic/sqlite/import.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -96,6 +96,11 @@ def main():
9696
print(f"Missing tables: {missing_tables}")
9797
sys.exit()
9898

99+
# subselect to only tables in the above list
100+
data_files = [f for f, t in zip(data_files, tablenames) if t in _MIMIC_TABLES]
101+
tablenames = [t for t in tablenames if t in _MIMIC_TABLES]
102+
print(f"Importing {len(tablenames)} files.")
103+
99104
pt = None
100105
subjects = None
101106
if args.limit > 0:

0 commit comments

Comments
 (0)