Skip to content

Commit

Permalink
✅ forgot to commit updated tests
Browse files Browse the repository at this point in the history
  • Loading branch information
jenniferajiang committed Oct 4, 2023
1 parent c85172a commit 088c810
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/miade/annotators.py
Original file line number Diff line number Diff line change
Expand Up @@ -381,7 +381,8 @@ def _process_meta_annotations(self, concept: Concept) -> Optional[Concept]:
if Relevance.IRRELEVANT in meta_ann_values:
log.debug(f"Removed concept ({concept.id} | {concept.name}): irrelevant concept")
return None

if Relevance.HISTORIC in meta_ann_values:
log.debug(f"No change to concept ({concept.id} | {concept.name}): historic with no conversion match")

concept.category = Category.PROBLEM

Expand Down
7 changes: 7 additions & 0 deletions tests/test_annotator.py
Original file line number Diff line number Diff line change
Expand Up @@ -130,6 +130,11 @@ def test_meta_annotations(test_problems_medcat_model, test_meta_annotations_conc
name="Endophthalmitis (historic)",
category=Category.PROBLEM,
), # negex false, meta processed
Concept(
id="0000",
name="historic concept",
category=Category.PROBLEM,
),
]
# test just using negex for negation
test_meta_annotations_concepts[0].negex = True
Expand All @@ -147,6 +152,8 @@ def test_meta_annotations(test_problems_medcat_model, test_meta_annotations_conc
Concept(
id="413241009", name="Gastritis (suspected)", category=Category.PROBLEM
), # negex false, meta processed
Concept(id="0000", name="historic concept", category=Category.PROBLEM
), # historic with no conversion
]


Expand Down

0 comments on commit 088c810

Please sign in to comment.