I am currently using MedCAT with the SNOMED International (Full SNOMED modelpack trained on MIMIC-III) model. The extracted entities are of the following form:
'pretty_name': 'Diverticulitis',
'cui': '18126004',
'type_ids': ['33782986'],
'types': ['morphologic abnormality'],
'source_value': 'Diverticulitis',
'detected_name': 'diverticulitis',
'acc': 0.99,
'context_similarity': 0.99,
'start': 0,
'end': 14,
'icd10': [],
'ontologies': ['SNOMED-CT'],
'snomed': [],
'id': 0,
Is there a way to get the UMLS Semantic Types (in this case T047) from the SNOMED IDs (in this case 18126004). I could search from BioPortal (such as https://bioportal.bioontology.org/ontologies/SNOMEDCT/?p=classes&lang=en&conceptid=http%3A%2F%2Fpurl.bioontology.org%2Fontology%2FSNOMEDCT%2F18126004&jump_to_nav=true for this case), but I want an automatic way of doing so. I wonder if there is an existing mapping for such a task.
I also copy the code below to show how I got the entities:
from medcat.cat import CAT
from medcat.utils.preprocess_umls import UMLS
cat = CAT.load_model_pack("mc_modelpack_snomed_int_16_mar_2022_25be3857ba34bdd5.zip")
text = "Diverticulitis, sigmoid colon, with colo-ovarian fistula formation and left ovarian abscess. Mesothelium-lined cyst in parovarian adhesions"
entities_data = cat.get_entities(text, only_cui=False, addl_info=["cui2icd10", "cui2ontologies", "cui2snomed"])
entities = entities_data["entities"]
The reason I wasn’t using the UMLS Full model is because the UMLS Full model cannot even extract Diverticulitis in my case.
My ultimate goal is to extract any entities of type Disease or Syndrome (UMLS Semantic Types T047 or T050). If I am over-coding here, please tell the right way to do so. Thank you.