Skip to content

Commit

Permalink
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
cleanup (there will always be mapping)
Browse files Browse the repository at this point in the history
korikuzma committed Jan 28, 2025
1 parent 775e88a commit a12e702
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions src/disease/query.py
Original file line number Diff line number Diff line change
@@ -364,18 +364,16 @@ def _create_concept_mapping(
)

xrefs = [record["concept_id"], *record.get("xrefs", [])]
mappings = [
disease_obj.mappings = [
_create_concept_mapping(xref_id, relation=Relation.EXACT_MATCH)
for xref_id in xrefs
]

associated_with = record.get("associated_with", [])
mappings.extend(
disease_obj.mappings.extend(
_create_concept_mapping(associated_with_id, relation=Relation.RELATED_MATCH)
for associated_with_id in associated_with
)
if mappings:
disease_obj.mappings = mappings

for field in ("pediatric_disease", "oncologic_disease", "aliases"):
value = record.get(field)

0 comments on commit a12e702

Please sign in to comment.