Skip to content

Commit

Permalink
check to see if the identifier exists on the sheet
Browse files Browse the repository at this point in the history
  • Loading branch information
daisieh committed Jan 24, 2024
1 parent e35f769 commit 7c535b3
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/clinical_etl/CSVConvert.py
Original file line number Diff line number Diff line change
Expand Up @@ -201,8 +201,9 @@ def parse_mapping_function(mapping):

def get_row_for_stack_top(sheet, rownum):
result = {}
for param in mappings.INDEXED_DATA["data"][sheet][mappings.IDENTIFIER].keys():
result[param] = mappings.INDEXED_DATA["data"][sheet][mappings.IDENTIFIER][param][rownum]
if mappings.IDENTIFIER in mappings.INDEXED_DATA["data"][sheet]:
for param in mappings.INDEXED_DATA["data"][sheet][mappings.IDENTIFIER].keys():
result[param] = mappings.INDEXED_DATA["data"][sheet][mappings.IDENTIFIER][param][rownum]
verbose_print(f"get_row_for_stack_top {sheet} is {result}")
return result

Expand Down

0 comments on commit 7c535b3

Please sign in to comment.