Metadata-Version: 2.5
Name: openbtk
Version: 0.0.1
Summary: The open-source layer between biomedical data and modern AI: de-identified, auditable, model-ready inputs with clinical guardrails.
Project-URL: Homepage, https://github.com/openbtk/openbtk
Project-URL: Repository, https://github.com/openbtk/openbtk
Project-URL: Issues, https://github.com/openbtk/openbtk/issues
Author: OpenBTK Contributors
License-Expression: Apache-2.0
License-File: LICENSE
Keywords: biomedical,clinical-nlp,de-identification,ehr,fhir,healthcare,hipaa,llm,omop,phi,rag
Classifier: Development Status :: 2 - Pre-Alpha
Classifier: Intended Audience :: Healthcare Industry
Classifier: Intended Audience :: Science/Research
Classifier: License :: OSI Approved :: Apache Software License
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Topic :: Scientific/Engineering :: Artificial Intelligence
Classifier: Topic :: Scientific/Engineering :: Medical Science Apps.
Classifier: Typing :: Typed
Requires-Python: >=3.11
Requires-Dist: httpx>=0.27
Requires-Dist: numpy>=1.26
Requires-Dist: pydantic>=2.5
Requires-Dist: pyyaml>=6.0
Requires-Dist: structlog>=24.0
Requires-Dist: typing-extensions>=4.12
Provides-Extra: all
Requires-Dist: anthropic>=0.30; extra == 'all'
Requires-Dist: chromadb>=0.5; extra == 'all'
Requires-Dist: faiss-cpu>=1.8; extra == 'all'
Requires-Dist: fhir-resources>=7.1; extra == 'all'
Requires-Dist: hl7apy>=1.3; extra == 'all'
Requires-Dist: langchain-core>=0.3; extra == 'all'
Requires-Dist: medspacy>=1.0; extra == 'all'
Requires-Dist: openai>=1.30; extra == 'all'
Requires-Dist: pandas>=2.2; extra == 'all'
Requires-Dist: presidio-analyzer>=2.2; extra == 'all'
Requires-Dist: presidio-anonymizer>=2.2; extra == 'all'
Requires-Dist: pyarrow>=16.0; extra == 'all'
Requires-Dist: scispacy>=0.5; extra == 'all'
Requires-Dist: transformers>=4.40; extra == 'all'
Provides-Extra: dev
Requires-Dist: faker>=25.0; extra == 'dev'
Requires-Dist: hypothesis>=6.100; extra == 'dev'
Requires-Dist: import-linter>=2.0; extra == 'dev'
Requires-Dist: mypy>=1.10; extra == 'dev'
Requires-Dist: pre-commit>=3.7; extra == 'dev'
Requires-Dist: pytest-cov>=5.0; extra == 'dev'
Requires-Dist: pytest-mock>=3.14; extra == 'dev'
Requires-Dist: pytest>=8.0; extra == 'dev'
Requires-Dist: ruff>=0.6; extra == 'dev'
Requires-Dist: types-pyyaml>=6.0; extra == 'dev'
Provides-Extra: docs
Requires-Dist: mike>=2.1; extra == 'docs'
Requires-Dist: mkdocs-material>=9.5; extra == 'docs'
Requires-Dist: mkdocstrings[python]>=0.25; extra == 'docs'
Provides-Extra: ehr
Requires-Dist: fhir-resources>=7.1; extra == 'ehr'
Requires-Dist: hl7apy>=1.3; extra == 'ehr'
Requires-Dist: pandas>=2.2; extra == 'ehr'
Requires-Dist: pyarrow>=16.0; extra == 'ehr'
Provides-Extra: langchain
Requires-Dist: langchain-core>=0.3; extra == 'langchain'
Provides-Extra: llms
Requires-Dist: anthropic>=0.30; extra == 'llms'
Requires-Dist: openai>=1.30; extra == 'llms'
Provides-Extra: retrieval
Requires-Dist: chromadb>=0.5; extra == 'retrieval'
Requires-Dist: faiss-cpu>=1.8; extra == 'retrieval'
Provides-Extra: text
Requires-Dist: medspacy>=1.0; extra == 'text'
Requires-Dist: presidio-analyzer>=2.2; extra == 'text'
Requires-Dist: presidio-anonymizer>=2.2; extra == 'text'
Requires-Dist: scispacy>=0.5; extra == 'text'
Requires-Dist: transformers>=4.40; extra == 'text'
Description-Content-Type: text/markdown

# OpenBTK — Open Toolkit for Biomedical AI

[![License](https://img.shields.io/badge/license-Apache%202.0-blue.svg)](LICENSE)

**The open-source layer between biomedical data and modern AI.**

OpenBTK turns EHR and clinical text into model-ready, **de-identified**, **auditable**
inputs — and wraps model outputs in **clinical guardrails**. It runs on your laptop or
behind your firewall, works with any LLM provider, and emits the audit trail your
regulator and your IRB will ask for.

---

> ## 🚧 Status: pre-implementation
>
> **`0.0.1` on PyPI is a placeholder. It installs and imports; it does nothing.**
> It exists to reserve the name and to exercise the release pipeline. Do not
> build on it.
>
> The project is being rebuilt from scratch. A previous attempt produced ~5,200 lines
> that were never executable — three conflicting package names coexisted in one
> repository, and no test was ever run against an installed dependency. That code is
> preserved on the `legacy/v1-snapshot` branch.
>
> Specification, architecture and planning are complete; the core framework is next.
> This README will list features when features exist, and not before.
> See [CHANGELOG.md](CHANGELOG.md).

---

## Why

Building a clinical RAG pipeline in 2026 means six weeks of undifferentiated plumbing:
a note parser, a PHI de-identifier that actually catches MRNs, chunking that doesn't
split the Assessment from the Plan, entity linking, code validation, and an audit
trail you'll be asked for later. Every team rebuilds it. Most get de-identification
wrong, or pay a vendor.

The existing tools each solve one slice. MONAI owns imaging. medspaCy owns rule-based
clinical text. PyHealth owns predictive modelling over EHR. LangChain owns
orchestration but treats a FHIR bundle and a blog post as the same thing. Commercial
platforms solve most of it, behind a licence that excludes academia and early-stage
teams.

**Nothing joins them, and nothing open-source addresses the two things that actually
gate deployment: is the PHI really gone, and can you prove what happened.**

Those two are what OpenBTK is for.

## Design commitments

- **Domain-aware by default** — chunking that respects clinical sections, retrieval
  that knows two strings can be the same SNOMED concept.
- **Wrap, don't reinvent** — thin, consistent adapters over medspaCy, scispaCy,
  presidio, `fhir.resources`; net-new code only where nothing adequate exists.
- **Streaming by default** — memory is `O(batch)`, not `O(corpus)`. Target: stream
  10M notes in under 4 GB RSS.
- **Light core** — six dependencies, no ML framework. Reading a clinical note should
  not require installing PyTorch.
- **Safe and provable by construction** — de-identification, guardrails and a run
  manifest are structural, not optional middleware.

## Planned scope

**v1 — clinical text and EHR/FHIR, taken to production quality.** Loading,
de-identification, section-aware chunking, entity linking, terminology resolution,
embedding and LLM providers, retrieval with concept reranking, clinical guardrails,
evaluation harness, run provenance, config-driven pipelines, CLI.

**v2 — imaging, biosignals, genomics, video, audio.** These will **wrap** MONAI, wfdb,
MNE, pysam and librosa rather than compete with them, and are gated until v1 ships
with published benchmarks.

**Never** — a model zoo, a serving platform, a clinical decision-support system, or a
dataset distributor.

## Documentation

Design documents — market research, PRD, architecture, API contract, security and
compliance, test charter, roadmap and ADRs — are maintained outside this repository
and are not published here. Public documentation ships with the v0.1 release.

## Contributing

Not yet open for contributions — the foundation is still being laid.
Contributions open at **v0.1**.

## License

Apache 2.0 — see [LICENSE](LICENSE).

## Disclaimer

OpenBTK is a software toolkit. It is **not a medical device**, **not a clinical
decision-support system**, and provides **no medical advice**. It does not make its
users HIPAA- or EU AI Act-compliant — it provides technical controls supporting a
compliance programme its users own.

Datasets requiring credentialed access (MIMIC, eICU, n2c2, TCGA) are **not bundled**.
Users must obtain their own authorized access.
