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+
- Clone the repository:
git clone https://github.com/AI-LENS/usdm-osb-uploader.git
cd usdm-osb-uploader
- Install dependencies:
uv sync
-
Set up environment variables:
- Copy
env_example.txtto.env:
cp env_example.txt .env
- Edit
.envand set your OSB server URL:
OSB_BASE_URL="https://your-osb-instance.com/api"Note: The
.envfile is used to configure the OSB API endpoint. Theenv_example.txtfile 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.envfile. - Copy
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 exampleStudy_000105_usdm.json- Sample study dataStudy_000106_usdm.json- Sample study dataAlexion_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)
| File | Size | Uploaded | |
|---|---|---|---|
| usdm_osb_uploader-0.1.0.tar.gz | 321.3 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| 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 logRelease 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