Skip to main content

Unified medical workflow SDK for imaging, biosignals, FHIR records, and research inference tooling.

Project description

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: AI features require the [ai] extra. Built-in basic_unet is 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 as medunify.adapters.pydicom_adapter to avoid eager loading unrelated stacks).
  • src/medunify/*/ — domain models and facades (Imaging, Signals, Records, AI).
  • AI is lazy-imported from medunify so 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.

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

medunify-0.1.0.tar.gz (23.3 kB view details)

Uploaded Source

Built Distribution

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

medunify-0.1.0-py3-none-any.whl (30.9 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: medunify-0.1.0.tar.gz
  • Upload date:
  • Size: 23.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.3

File hashes

Hashes for medunify-0.1.0.tar.gz
Algorithm Hash digest
SHA256 ed30f5b8dd99e4ebcac5255ceda089428a87cc52bec7b2f705c44a914f0e86f8
MD5 f145605f156c7592fe686d7ba2500fc3
BLAKE2b-256 365806af791232d0ac4c5cbd3c2cd50d709edd329a9812cb48e8aedb68ccc5c8

See more details on using hashes here.

File details

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

File metadata

  • Download URL: medunify-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 30.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.3

File hashes

Hashes for medunify-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 1c53171c47e75363a315ddba206ee70e3d64bbada8127aa68fbd79696aad7e22
MD5 d457345cb85feccc1ad832fa1cb33f93
BLAKE2b-256 c02339cd1374853677010b2ca7db09ea84ec2980cd96794eaad9401c19eb440d

See more details on using hashes here.

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