A ClaML reader for Python.
Project description
A ClaML reader for Python. Generated from the ClaML.dtd file from the DIMDI, using PyXB.
Features
Reads classification files in ClaML format (XML) into Python objects. See examples/test1.py for a usage example.
Resources
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
Usage
To use ClaML reader in a project:
import python_claml
Example
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)
Development
The code was generated using the following commands:
pyxbgen --schema-root=../resources -u ClaML.xsd -m python_claml.claml
Install
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 .
Test
python setup.py test
License
Copyright (c) 2019 The Hyve B.V.
The ClaML reader is licensed under the MIT License. See the file LICENSE.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Hashes for python_claml-0.1.0-py2.py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 134f198fe796d3073475ab5bda1242245a66126056944c032ee030446966bf32 |
|
MD5 | fbc246ca3ab9ee75bc19fa45a2d31a3b |
|
BLAKE2b-256 | a2ba02f2e0bcb92896374d77ad8686a7b2e967ce6415c1d952330c4db0c123d0 |