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+
- 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.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
50ba476b32a6e6bf2f1bde82611b0621c40673a14693b6d0c4b853c25625e60d
|
|
| MD5 |
a7927c4d0580bffbcaecd4b18152a517
|
|
| BLAKE2b-256 |
ed4cab94f7fab5c8a4283dc2328d3d57b2cb71239c23515f98b796bb931b1ca8
|
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
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
usdm_osb_uploader-0.1.0.tar.gz -
Subject digest:
50ba476b32a6e6bf2f1bde82611b0621c40673a14693b6d0c4b853c25625e60d - Sigstore transparency entry: 753277701
- Sigstore integration time:
-
Permalink:
AI-LENS/usdm-osb-uploader@753db6ae8f202eb0ca64418bd5c6faf99427c34b -
Branch / Tag:
refs/heads/main - Owner: https://github.com/AI-LENS
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
pypi_release.yml@753db6ae8f202eb0ca64418bd5c6faf99427c34b -
Trigger Event:
workflow_dispatch
-
Statement type:
File details
Details for the file usdm_osb_uploader-0.1.0-py3-none-any.whl.
File metadata
- Download URL: usdm_osb_uploader-0.1.0-py3-none-any.whl
- Upload date:
- Size: 38.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f20a1bdfedc24db30ca5fef5c0eb786ed6e620b52cc3753017b7b7d8fa5ad7a2
|
|
| MD5 |
84c00d71249c7df09de71a3bbd9a1279
|
|
| BLAKE2b-256 |
47870f052dba1520ef9238ae1b28ba059f08bf6391485b2e167619126d26873b
|
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
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
usdm_osb_uploader-0.1.0-py3-none-any.whl -
Subject digest:
f20a1bdfedc24db30ca5fef5c0eb786ed6e620b52cc3753017b7b7d8fa5ad7a2 - Sigstore transparency entry: 753277703
- Sigstore integration time:
-
Permalink:
AI-LENS/usdm-osb-uploader@753db6ae8f202eb0ca64418bd5c6faf99427c34b -
Branch / Tag:
refs/heads/main - Owner: https://github.com/AI-LENS
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
pypi_release.yml@753db6ae8f202eb0ca64418bd5c6faf99427c34b -
Trigger Event:
workflow_dispatch
-
Statement type: