A Python-based tool for generating test Clinical Document Architecture (CDA) files from Excel templates. This project helps healthcare IT professionals create sample AKTIN CDA documents for testing and development purposes of the AKTIN DWH. Additional Information can be found on the Github Wiki.
- Python 3.12 (3.11)
pip(Python package installer)
- Clone the repository:
git clone https://github.com/aktin/cda-test-data-generator
cd cda-test-data-generator- Install the required Python packages:
pip install -r requirements.txtThe tool requires two main configuration files.
-
Excel Template (
*.xlsx):- Defines the variables and their generation rules
- Must follow the specified template format (see Documentation)
- Paths to value sets defined in the Excel must be relative to the Excel file
-
XSLT Template (
*.xslt):- Defines the structure of CDA documents
- Must be valid XSLT 1.0 or 2.0
These files are already set up in the /resources directory by default and ready for use!
More Information can be found on the Github Wiki/Configuration
Recommended way to run the script:
- Make sure you are in the
/cda-test-data-generatordirectory - Fill in the parameters as described below
- Run with filled parameters:
python src/main.py --number <number_of_CDAs> --xslt <xslt_file> --xlsx <excel_file> [--output <output_dir>][--cleanup]
Example prompt under the Parameter table!!!
Information on running it in a different directory can be found in the Github Wiki/How_to_use_it?
| Parameter | Required | Description | Default |
|---|---|---|---|
--number |
Yes | Number of CDA documents to generate | None |
--xslt |
Yes | Absolute/Relative path to XSLT template file | None |
--xlsx |
Yes | Absolute/Relative path to Excel template file | None |
--output |
No | Output directory for CDA files. | <working_directory> |
--cleanup |
No | If cleanup is set, remove intermediate CSV file. |
To generate 10 CDA files and save them in an output directory, run in the /cda-test-data-generator directory:
python src/main.py --number 10 --xlsx resources/CDAVariables_short.xlsx --xslt resources/EmergencyNote.xslt --output /outputThis project is licensed under the AGPL-3.0 license.