verbatim_term_mapper
VerbatimTermMapper
Maps a source term to a provided subset of target concepts based on exact matches of normalized terms.
Source code in src/ariadne/verbatim_mapping/verbatim_term_mapper.py
26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 | |
map_term(source_term, target_concept_ids, target_terms, target_synonyms)
Maps a source term to the best matching target concept ID based on normalized terms.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
source_term
|
str
|
the source clinical term to map |
required |
target_concept_ids
|
List[int]
|
a list of target concept IDs |
required |
target_terms
|
List[str]
|
a list of target clinical terms |
required |
target_synonyms
|
List[str]
|
a list of target synonyms. Each string is semicolon separated synonyms for the corresponding target term. |
required |
Returns:
| Type | Description |
|---|---|
(Union[int, None], Union[str, None])
|
A tuple of (mapped_concept_id, mapped_term) if a match is found, otherwise (None, None) |
Source code in src/ariadne/verbatim_mapping/verbatim_term_mapper.py
34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 | |