From b0cae5f96d7f5fb13e03234100cc9b3de247801a Mon Sep 17 00:00:00 2001 From: Steve Nyemba Date: Wed, 16 Sep 2020 11:23:31 -0500 Subject: [PATCH] bug fix --- healthcareio/healthcare-io.py | 3 ++- healthcareio/parser.py | 3 ++- setup.py | 2 +- 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/healthcareio/healthcare-io.py b/healthcareio/healthcare-io.py index 2fce7c4..ad3efeb 100644 --- a/healthcareio/healthcare-io.py +++ b/healthcareio/healthcare-io.py @@ -245,7 +245,8 @@ if __name__ == '__main__' : try: content,logs = parse(filename = filename,type=SYS_ARGS['parse']) if content : - writer.write(content) + print (content) + # writer.write(content) if logs : [logger.write(_row) for _row in logs] else: diff --git a/healthcareio/parser.py b/healthcareio/parser.py index 8b9d9bb..b499f76 100644 --- a/healthcareio/parser.py +++ b/healthcareio/parser.py @@ -154,7 +154,6 @@ def get_map(row,config,version): for row_item in row : value = get_map(row_item,config,version) - value['_index'] = len(object_value) object_value.append(value) # # We need to add the index of the object it matters in determining the claim types @@ -290,7 +289,9 @@ def get_content(filename,config,section=None) : if len(claim[label]) > 0 : labels = [] for item in claim[label] : + item['_index'] = len(labels) if item not in labels : + labels.append(item) claim[label] = labels # claim[label] = list( set(claim[label])) #-- removing redundancies diff --git a/setup.py b/setup.py index a0ad387..81ab730 100644 --- a/setup.py +++ b/setup.py @@ -8,7 +8,7 @@ import sys def read(fname): return open(os.path.join(os.path.dirname(__file__), fname)).read() args = { - "name":"healthcareio","version":"1.2.6", + "name":"healthcareio","version":"1.2.7", "author":"Vanderbilt University Medical Center", "author_email":"steve.l.nyemba@vumc.org", "license":"MIT",