Skip to content

Commit

Permalink
Improved versatility for OMOP file validator. Now recognizes more OMO…
Browse files Browse the repository at this point in the history
…P-approved data types for the specific columns.
  • Loading branch information
Noah Engel committed Dec 13, 2019
1 parent ea38665 commit fb82605
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions omop_file_validator.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
from builtins import type

import glob
import traceback

Expand Down Expand Up @@ -120,8 +122,6 @@ def find_error_in_file(column_name, cdm_column_type, submission_column_type, df)

try:
if i <= len(df) - 1:
#print(index)
#print(row[column_name])
if row[column_name]:
cast_type(cdm_column_type, row[column_name])
else:
Expand Down Expand Up @@ -199,7 +199,6 @@ def process_file(file_path):
# If all empty don't do type check
if submission_column_type != None:
if not type_eq(meta_column_type, submission_column_type):

#find the row that has the issue
error_row_index = find_error_in_file(submission_column, meta_column_type, submission_column_type, df)
if error_row_index :
Expand Down

0 comments on commit fb82605

Please sign in to comment.