Skip to content

Latest commit

 

History

235 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

CDA-test-data-generator Python 3.12

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.

Prerequisites

  • Python 3.12 (3.11)
  • pip (Python package installer)

Installation

  1. Clone the repository:
git clone https://github.com/aktin/cda-test-data-generator
cd cda-test-data-generator
  1. Install the required Python packages:
pip install -r requirements.txt

Configuration

The tool requires two main configuration files.

  1. 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
  2. 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

Default Usage

Recommended way to run the script:

  1. Make sure you are in the /cda-test-data-generator directory
  2. Fill in the parameters as described below
  3. 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?

Parameters

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.

Example

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 /output

License

This project is licensed under the AGPL-3.0 license.

About

A collection of Python scripts to automatically generate CDA test patients for the AKTIN DWH

Resources

Stars

0 stars

Watchers

1 watching

Forks

Releases

Packages

Used by

Contributors

Languages