How stefanotrv/simple_icd_10 works
Project type and purpose
• This is an open-source, single-module Python library (“simple_icd_10”) whose sole purpose is to load the WHO ICD-10 2019 classification from data files and expose a set of pure-Python functions that let client code query codes, relationships (parent/child/ancestors/descendants), descriptions, and perform format conversions.
• It ships as a pip-installable package, can be imported into any Python 3.9+ project, and is demonstrated in a Jupyter notebook.
File structure
• Top level:
• simple_icd_10.py and test_simple_icd_10.py – the core module and its unit tests
• data/ – raw data: plain-text lists and the XML file for the full ICD-10 tree
• other/ – auxiliary scripts to generate or update the XML
• package-files/ – the build/dist output and setup.py for packaging
• Notebook.ipynb – interactive demo
• No frontend/backend split or microservices—this is a library module plus packaging workflows.
Key insights from the README
• The library builds an in-memory tree from the XML and text files at import or on first call.
• It provides ~25 functions (is_valid_item, get_children, get_descendants, etc.).
• Data is immutable once loaded—no database, no external API calls.
• Distribution happens via setuptools (setup.py), generating wheel and sdist.