Skip to main content

Add your description here

Project description

USDM OSB Uploader

Overview

This project provides tools for uploading, processing, and managing USDM (Unified Study Data Model) study files for the CDISC OSB (Open Study Builder) platform. It includes CLI utilities and Python modules to automate study data ingestion and manipulation.

Benefits

  • Automated Workflow: Eliminates manual data entry and reduces human error in study setup
  • Time Savings: Complete study upload in minutes instead of hours of manual configuration
  • Data Integrity: Validates USDM structure and ensures consistent data mapping to OSB
  • Standardization: Follows CDISC standards for seamless integration across platforms
  • Modular Architecture: Independent modules for each study component (arms, epochs, visits, etc.) allowing flexible workflows
  • Type-Safe Operations: Robust Pydantic schema validation ensures data integrity and API compatibility

Robustness

  • Comprehensive Error Handling: Graceful handling of API failures, network issues, and data validation errors
  • Retry Logic: Automatic retry mechanisms for transient failures
  • Data Validation: Pre-upload validation ensures USDM compliance before processing
  • Rollback Support: Safe operations with ability to handle partial failures
  • Reliable Operations: Comprehensive HTTP status code handling (400, 404, 409, 422, 500)

Features

  • Complete Study Upload: Upload entire USDM studies with comprehensive validation
  • Individual Components: Create and manage specific study elements (arms, epochs, visits, criteria)
  • Data Processing: Download and process study data from OSB
  • Activity Management: Handle study activities and schedule of activities

Installation

Requirements: Python 3.13+

  1. Clone the repository:
git clone https://github.com/AI-LENS/usdm-osb-uploader.git
cd usdm-osb-uploader
  1. Install dependencies:
uv sync
  1. Set up environment variables:

    • Copy env_example.txt to .env:
    cp env_example.txt .env
    
    • Edit .env and set your OSB server URL:
    OSB_BASE_URL="https://your-osb-instance.com/api"
    

    Note: The .env file is used to configure the OSB API endpoint. The env_example.txt file contains a template with the default public OSB server URL (https://osb.ailens.ai/api). You can use your own OSB server URL by replacing it in the .env file.

Usage

Complete Study Upload

uv run osb usdm-osb-uploader path/to/usdm_file.json

Individual Components

# Create study
uv run osb create-study-uid path/to/usdm_file.json

# Study structure
uv run osb create-study-arms path/to/usdm_file.json STUDY_UID
uv run osb create-study-epochs-cmd path/to/usdm_file.json STUDY_UID
uv run osb create-study-visits-cmd path/to/usdm_file.json STUDY_UID

# Population & criteria
uv run osb create-study-populations path/to/usdm_file.json STUDY_UID
uv run osb create-study-criteria-cmd path/to/usdm_file.json STUDY_UID

# Download
uv run osb download-usdm-cmd STUDY_UID

Configuration

The application uses a .env file for configuration. After copying env_example.txt to .env, you can modify the OSB_BASE_URL variable to point to your OSB instance.

Alternatively, you can set environment variables directly:

export OSB_BASE_URL="https://your-osb-instance.com/api"

Test Files

The repository includes sample USDM study files in the test/ directory for testing and development purposes:

  • CDISC_Pilot_Study.json - CDISC pilot study example
  • Study_000105_usdm.json - Sample study data
  • Study_000106_usdm.json - Sample study data
  • Alexion_NCT04573309_Wilsons.json - Alexion study example

These files can be used to test the uploader functionality and understand the expected USDM format.

Contributing

Contributions are welcome! Please feel free to submit a Pull Request.

Support

For questions or issues, please open an issue on the GitHub repository.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

usdm_osb_uploader-0.1.0.tar.gz (321.3 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

usdm_osb_uploader-0.1.0-py3-none-any.whl (38.4 kB view details)

Uploaded Python 3

File details

Details for the file usdm_osb_uploader-0.1.0.tar.gz.

File metadata

  • Download URL: usdm_osb_uploader-0.1.0.tar.gz
  • Upload date:
  • Size: 321.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for usdm_osb_uploader-0.1.0.tar.gz
Algorithm Hash digest
SHA256 50ba476b32a6e6bf2f1bde82611b0621c40673a14693b6d0c4b853c25625e60d
MD5 a7927c4d0580bffbcaecd4b18152a517
BLAKE2b-256 ed4cab94f7fab5c8a4283dc2328d3d57b2cb71239c23515f98b796bb931b1ca8

See more details on using hashes here.

Provenance

The following attestation bundles were made for usdm_osb_uploader-0.1.0.tar.gz:

Publisher: pypi_release.yml on AI-LENS/usdm-osb-uploader

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file usdm_osb_uploader-0.1.0-py3-none-any.whl.

File metadata

File hashes

Hashes for usdm_osb_uploader-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 f20a1bdfedc24db30ca5fef5c0eb786ed6e620b52cc3753017b7b7d8fa5ad7a2
MD5 84c00d71249c7df09de71a3bbd9a1279
BLAKE2b-256 47870f052dba1520ef9238ae1b28ba059f08bf6391485b2e167619126d26873b

See more details on using hashes here.

Provenance

The following attestation bundles were made for usdm_osb_uploader-0.1.0-py3-none-any.whl:

Publisher: pypi_release.yml on AI-LENS/usdm-osb-uploader

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page