Skip to content

Commit

Permalink
86940j1fm: fixed for old de-ID CDBs at GSTT
Browse files Browse the repository at this point in the history
  • Loading branch information
tomolopolis committed Mar 6, 2024
1 parent 71a8e48 commit 2c7af09
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion webapp/api/api/solr_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -187,13 +187,14 @@ def _upload_payload(update_url, data, collection, commit=False):


def _concept_dct(cui: str, cdb: CDB):
synonyms = list(cdb.addl_info.get('cui2original_names', {}).get(cui, set()))
concept_dct = {
'cui': str(cui),
'pretty_name': cdb.get_name(cui),
'name': re.sub(r'\([\w+\s]+\)', '', cdb.get_name(cui)).strip(),
'type_ids': list(cdb.cui2type_ids[cui]),
'desc': cdb.addl_info.get('cui2description', {}).get(cui, ''),
'synonyms': list(cdb.addl_info.get('cui2original_names', {}).get(cui, set())),
'synonyms': synonyms if len(synonyms) > 0 else [cdb.get_name(cui)]
}
return concept_dct

Expand Down

0 comments on commit 2c7af09

Please sign in to comment.