ontology is empty after loading

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

ontology is empty after loading

zethson
Hi,

I'm trying to load the icd10 ontology (https://www.cms.gov/medicare/icd-10/2023-icd-10-cm) -> direct download link is https://www.cms.gov/files/zip/2023-code-tables-tabular-and-index-updated-01/11/2023.zip -> the icd10cm_tabular_2023.xml file. However, when loading the ontology it is empty.

Code:
>>> onto = get_ontology("icd10cm_drug_2023.xml").load()
>>> list(onto.classes())
[]
>>> list(onto.individuals())
[]

What am I doing wrong?

Thank you very much.
Best
Reply | Threaded
Open this post in threaded view
|

Re: ontology is empty after loading

Jiba
Administrator
Hi,

The file you downloaded is not an OWL / ontology file. It is just a plain XML file.

If you need ICD10, you can import it in Owlready from UMLS with owlready2.pymedtermino2.

Jiba