Hi Ritchie,
I imported ICD10 from UMLS 2023AA as follows:
from owlready2 import *
from owlready2.pymedtermino2 import *
from owlready2.pymedtermino2.umls import *
QUADSTORE = "/tmp/pym.sqlite3"
default_world.set_backend(filename = QUADSTORE)
import_umls("/home/jiba/telechargements/base_med/umls/umls-2023AA-full.zip", terminologies = ["ICD10"], langs = ["en"])
default_world.save()
Then, I used it as follows:
from owlready2 import *
from owlready2.pymedtermino2 import *
from owlready2.pymedtermino2.umls import *
QUADSTORE = "/tmp/pym.sqlite3"
default_world.set_backend(filename = QUADSTORE)
from owlready2.pymedtermino2.model import *
PYM = get_ontology("
http://PYM/").load()
ICD = ICD10 = PYM["ICD10"]
t = ICD10["C00.0"]
print(t)
# => ICD10["C00.0"] # Malignant neoplasm of external upper lip
print(t.is_a)
# => [ICD10["C00"] # Malignant neoplasm of lip
# ]
But I cannot reproduce your problem: C00 is indeed defined as a parent of C00.0.
How did you imported ICD10? Which version of Owlready are you using?
Jiba