MedUnify
MedUnify is a unified medical workflow SDK for Python. It wraps mature ecosystems (pydicom, nibabel, SimpleITK, WFDB, fhir.resources, optional MONAI) behind small adapters and a stable, developer-friendly surface API.
This project is not a medical device, not a diagnostic engine, and not a replacement for PACS, EHRs, or regulated clinical software. It exists to help researchers and engineers integrate imaging, biosignals, FHIR records, and research-grade ML tooling with less glue code.
Why MedUnify?
Hospital and research workflows often combine DICOM/NIfTI pipelines, waveform archives, FHIR JSON, and PyTorch/MONAI experiments. Each ecosystem is powerful on its own, but public codebases frequently reimplement the same adapters. MedUnify centralizes those integrations behind explicit adapter modules and narrow facades so applications can grow without turning into an unmaintainable monolith.
Installation
Requires Python 3.11+.
pip install -e .
Optional AI stack (PyTorch + MONAI):
pip install -e ".[ai]"
Development tools:
pip install -e ".[dev]"
Quickstart
from medunify import Imaging, Signals, Records, AI
img = Imaging.load("scan.dcm")
series = Imaging.load_series("dicom_folder/")
meta = Imaging.metadata(img)
ecg = Signals.load("100", source="wfdb", pn_dir="mitdb")
patient = Records.parse_fhir_dict({...})
result = AI.run_inference(
image=img,
task="segmentation",
model_name="basic_unet",
)
Important:
AIfeatures require the[ai]extra. Built-inbasic_unetis an untrained research stub for smoke tests — supply your own weights and models for real experiments.
Module overview
| Module | Purpose |
|---|---|
Imaging |
DICOM / NIfTI / raster load, metadata, preprocess helpers |
Signals |
WFDB-backed biosignals (extensible to more sources) |
Records |
FHIR Patient / Observation / ImagingStudy via fhir.resources |
AI |
Optional MONAI-oriented registry and inference runner |
Architecture
src/medunify/adapters/— thin wrappers around third-party libraries (imported as submodules such asmedunify.adapters.pydicom_adapterto avoid eager loading unrelated stacks).src/medunify/*/— domain models and facades (Imaging,Signals,Records,AI).AIis lazy-imported frommedunifyso environments without PyTorch/MONAI can still use imaging/signals/FHIR workflows.tests/— pytest coverage for public APIs and adapters (with mocks where needed).
Roadmap
- Additional biosignal sources (EDF, proprietary readers behind adapters).
- Stronger FHIR resource coverage and validation pipelines.
- Pluggable preprocessing for AI (spacing-aware resampling, clip/normalize presets).
- Optional plugins for deployment-specific configuration.
Disclaimer
MedUnify is provided for research, education, and integration purposes. It must not be used for autonomous clinical diagnosis or any regulated use without appropriate validation, human oversight, and compliance with local laws and institutional policies.
License
MIT — see LICENSE.
Release files for medunify 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 | |
|---|---|---|---|
| medunify-0.1.0.tar.gz | 23.3 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| medunify-0.1.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 54.2 kB
Release files / medunify-0.1.0.tar.gz
| Download URL | medunify-0.1.0.tar.gz |
|---|---|
| Size | 23.3 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
ed30f5b8dd99e4ebcac5255ceda089428a87cc52bec7b2f705c44a914f0e86f8
|
|
BLAKE2b-256 checksum How to use checksums |
365806af791232d0ac4c5cbd3c2cd50d709edd329a9812cb48e8aedb68ccc5c8
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.14.3
|
Release files / medunify-0.1.0-py3-none-any.whl
| Download URL | medunify-0.1.0-py3-none-any.whl |
|---|---|
| Size | 30.9 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
1c53171c47e75363a315ddba206ee70e3d64bbada8127aa68fbd79696aad7e22
|
|
BLAKE2b-256 checksum How to use checksums |
c02339cd1374853677010b2ca7db09ea84ec2980cd96794eaad9401c19eb440d
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.14.3
|