Skip to content

Commit

Permalink
Merge main into sweep/add-sweep-config
Browse files Browse the repository at this point in the history
  • Loading branch information
sweep-ai[bot] authored Sep 1, 2023
2 parents e6d46b9 + ed98bdc commit 510d919
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions convertPheno_server/server/apis/clinical.py
Original file line number Diff line number Diff line change
Expand Up @@ -199,6 +199,16 @@ def parse_meta_info(meta, field):
values = []
ontology_ids = []
urls = []

ontology_ids_mapping = {}
urls_mapping = {}

# TODO
# create an ontology ids mapping dictionary

# so it not only gets the ontology ids for the basic table
# but also for the pop-over tables

for meta_data in meta:
meta_row = {}
for key in meta_data:
Expand All @@ -213,6 +223,13 @@ def parse_meta_info(meta, field):
ontology_ids.append(ontology_id)
urls.append(ncit_url)

if key in ontology_ids_mapping:
ontology_ids_mapping[key].append(ontology_id)
urls_mapping[key].append(ncit_url)
else:
ontology_ids_mapping[key] = [ontology_id]
urls_mapping[key] = [ncit_url]

for info in nested_info:
nested_info_val = recursive_search(meta_data[key], info)
if nested_info_val is not None:
Expand Down

0 comments on commit 510d919

Please sign in to comment.