A ClaML reader for Python. Generated from the ClaML.dtd file from the DIMDI, using PyXB.
Reads classification files in ClaML format (XML) into Python objects. See examples/test1.py for a usage example.
- van der Haring EJ, Broënhorst S, ten Napel H, Weber S, Schopen M, Zanstra PE. ClaML: a standard for the electronic publication of classification coding schemes
- ISO 13120:2013 Health informatics -- Syntax to represent the content of healthcare classification systems -- Classification Markup Language (ClaML), now superseded by ISO 13120:2019.
- DIMDI (Deutsche Institut für Medizinische Dokumentation und Information) ICD-10-GM download: icd10gm2019syst-claml.zip
To use ClaML reader in a project:
import python_claml
Read and parse the contents of a ClaML file and print all class codes:
with open(file_name, 'r') as input_file:
# Read file contents
contents = input_file.read()
# Parse ClaML document
classification: ClaML = claml.CreateFromDocument(contents)
for cls in classification.Class:
print(cls.code)
The code was generated using the following commands:
pyxbgen --schema-root=../resources -u ClaML.xsd -m python_claml.claml
From the package index:
pip install python-claml
or from source:
git clone https://github.com/thehyve/python_claml.git
cd python_claml
pip install .
python setup.py test
This project was funded by the German Ministry of Education and Research (BMBF) as part of the project DIFUTURE - Data Integration for Future Medicine within the German Medical Informatics Initiative (grant no. 01ZZ1804D).
Copyright (c) 2019 The Hyve B.V.
The ClaML reader is licensed under the MIT License. See the file LICENSE.