Skip to main content

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.

Metadata

Release files for usdm-osb-uploader 0.1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for usdm-osb-uploader 0.1.0
File Size Uploaded
usdm_osb_uploader-0.1.0.tar.gz 321.3 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for usdm-osb-uploader 0.1.0
File Interpreter ABI Platform
usdm_osb_uploader-0.1.0-py3-none-any.whl Python 3 none any Details

Total release size: 359.7 kB

Release files / usdm_osb_uploader-0.1.0.tar.gz

Download URL usdm_osb_uploader-0.1.0.tar.gz
Size 321.3 kB
Tags Source
SHA-256 checksum
How to use checksums
50ba476b32a6e6bf2f1bde82611b0621c40673a14693b6d0c4b853c25625e60d
BLAKE2b-256 checksum
How to use checksums
ed4cab94f7fab5c8a4283dc2328d3d57b2cb71239c23515f98b796bb931b1ca8
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.7

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Dec 9, 2025.

Transparency log

Release files / usdm_osb_uploader-0.1.0-py3-none-any.whl

Download URL usdm_osb_uploader-0.1.0-py3-none-any.whl
Size 38.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
f20a1bdfedc24db30ca5fef5c0eb786ed6e620b52cc3753017b7b7d8fa5ad7a2
BLAKE2b-256 checksum
How to use checksums
47870f052dba1520ef9238ae1b28ba059f08bf6391485b2e167619126d26873b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.7

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Dec 9, 2025.

Transparency log

Release history Release notifications | RSS feed

This release

0.1.0 This release

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page