Skip to content

lexjansen/cdisc360i-pocs

Repository files navigation

cdisc360i-poc

under development

Lex Jansen's public Github repository for CDISC 360i Proof of Concepts.

This project consists of example programs to try out steps in the 360i pipeline.

Here's the official CDISC 360i repository

Supported python versions

Python 3.12

Windows Command Compatibility

Note: The Windows commands provided in this README are written for PowerShell. While most commands are compatible with both PowerShell and Command Prompt, some adjustments may be necessary when using Command Prompt. If you encounter any issues running these commands in Command Prompt, try using PowerShell or consult the Command Prompt documentation for equivalent commands.

Introduction

These programs are designed to function as command-line applications that can run as standalone applications or can be chained together to function as a pipeline of sorts. Everything in this repo should be considered sandbox development work in support of the 360i program.

Overview of folders

bc_dss2crf:

  • cdash_poc_odm20.py: script to create ODM XML v2.0 XML, CRFs in HTML, and annotated CRFs in HTML.
  • cdash_poc_odm132.py: script to create ODM XML v1.3.2 XML, CRFs in HTML, and annotated CRFs in HTML.

The scripts use the odmlib Python library. A good introduction to this library can be found in Sam Hume's "Using odmlib to Create ODM and Define-XML Tools in Python" paper and presentation.

config:

  • config.py loads the configuration settings
  • config.ini: configuration settings withy relative paths (copy of config-relative-paths.ini)
  • config-relative-paths.ini, config-absolute-paths.ini: templates for configuration settings. Either copy config-relative-paths.ini to config.ini, or copy config-absolute-paths.ini to config.ini, and edit the paths to match your environment.

crf: Output folder for generated CRF files. Every form will get it's own subfolder.
crf/examples: ZIP files with output examples

metadata: Metadata used by the scripts.

odmlib:

schema:

  • XML Schema files to validate ODM XML v1.3.2 and v2.0 files.

stylesheet:

  • XSLT stylesheets to convert ODM XML CRF files to HTML CRFs and annotated CRFs.

utilities:

  • Utilities used by scripts to create directories, validate XML, convert XML to HTML.

Environment Setup

  • Clone the repository: git clone https://github.com/lexjansen/cdisc360i-pocs.git

  • Create a virtual environment: python -m venv <virtual_environment_name>

NOTE: if you have multiple versions of python on your machine, you can call python 3.12 for the virtual environment's creation instead of the above command: python3.12 -m venv <virtual_environment_name>

  • Activate the environment:
    Linux: source <virtual_environment_name>/bin/activate
    Windows: <virtual_environment_name>/Scripts/Activate

  • Install requirements: python -m pip install -r requirements.txt

Running the Examples

Parameters for the cdash_poc_odm20.py and cdash_poc_odm132.py scripts:

  --help               Show the parameters
  -f, --form TEXT      The ID of the collection form to process
  -p, --prefix TEXT    The lowercase prefix to use for the output filenames. 
                       When not specified, the collection lowercase form ID will be used.

The following command-line example uses Collection Dataset Specializations and Forms metadata (VS1) to generate an ODM v2.0 XML CRF, and HTML renditions of the CRF and annotated CRF in the crf/VS1 folder.:

python ./bc_dss2crf/cdash_poc_odm20.py -f VS1 -p vital_signs

The following command-line example does the same, but then for ODM v 1.3.2:

python ./bc_dss2crf/cdash_poc_odm132.py -f VS1 -p vital_signs

License

License: MIT This project uses the MIT license (see LICENSE) for code and scripts.

About

CDISC 360i POCs

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 2

  •  
  •