Skip to main content

Open source framework for productionizing healthcare AI

Project description

HealthChain 💫 🏥

HealthChain Logo

PyPI Version Stars Downloads

License Python Versions Build Status AI-Assisted Development

Substack Discord

Open-Source Framework for Productionizing Healthcare AI

HealthChain is an open-source SDK for production-ready healthcare AI. Skip months of custom integration work with built-in FHIR support, real-time EHR connectivity, and deployment tooling for healthcare AI/ML systems — all in Python.

Installation

pip install healthchain

Quick Start

# Scaffold a FHIR Gateway project
healthchain new my-app -t fhir-gateway
cd my-app

# Run locally
healthchain serve
HealthChain CLI demo

Edit app.py to add your model, and healthchain.yaml to configure compliance, security, and deployment settings.

See the CLI reference for all commands.

Core Features

HealthChain is the quickest way for AI/ML engineers to integrate their models with real healthcare systems.

💡 For HealthTech Engineers

Clinical Integration

⚡️ Real-Time Clinical Workflow Integration

Build CDS alerts and automated coding tools that integrate directly into Epic workflows

Getting Started →

FHIR Utilities

🔥 FHIR Development Utilities

Accelerate development with type-safe FHIR resource creation, validation helpers, and sandbox environments for testing clinical workflows

Getting Started →

🤖 For LLM / GenAI Developers

Multi-Source Integration

🔌 Multi-EHR Data Aggregation

Aggregate patient data from multiple FHIR sources into unified records with built-in NLP processing and automatic deduplication

Getting Started →

Format Conversion

🔄 Healthcare Data Format Conversion

Convert between FHIR and CDA formats with configuration-driven templates for unified data processing workflows

Getting Started →

🎓 For ML Researchers

Deploy

🚀 Deploy ML Models as Healthcare APIs

Turn any trained model into a production-ready FHIR endpoint with OAuth2 authentication and type-safe healthcare data handling

Getting Started →

Why HealthChain?

Electronic health record (EHR) data is specific, complex, and fragmented. Most healthcare AI projects require months of manual integration and custom validation on top of model development. This leads to fragile pipelines that break easily and consume valuable developer time.

HealthChain understands healthcare protocols and data formats natively, so you don't have to build that knowledge from scratch. Skip months of custom integration work and productionize your healthcare AI faster.

  • Optimized for real-time - Connect to live FHIR APIs and integration points instead of stale data exports
  • Automatic validation - Type-safe FHIR models prevent broken healthcare data
  • Built-in NLP support - Extract structured data from clinical notes, output as FHIR
  • Developer experience - Modular and extensible architecture works across any EHR system
  • Production-ready foundations - Dockerized deployment, configurable security and compliance settings, and an architecture designed for real-world healthcare environments

🏆 Recognition & Community

Featured & Presented:

🤝 Partnerships & Production Use

Exploring HealthChain for your product or organization? Get in touch to discuss integrations, pilots, or collaborations, or join our Discord to connect with the community.

Usage Examples

Building a Pipeline [Docs]

from healthchain.pipeline import Pipeline
from healthchain.pipeline.components.integrations import SpacyNLP
from healthchain.io import Document

# Create medical NLP pipeline
nlp_pipeline = Pipeline[Document]()
nlp_pipeline.add_node(SpacyNLP.from_model_id("en_core_web_sm"))

nlp = nlp_pipeline.build()
doc = Document("Patient presents with hypertension and diabetes.")
result = nlp(doc)

spacy_doc = result.nlp.get_spacy_doc()
print(f"Entities: {[(ent.text, ent.label_) for ent in spacy_doc.ents]}")
print(f"FHIR conditions: {result.fhir.problem_list}")  # Auto-converted to FHIR Bundle

Creating a Gateway [Docs]

from healthchain.gateway import HealthChainAPI, FHIRGateway
from fhir.resources.patient import Patient

# Create healthcare application
app = HealthChainAPI(title="Multi-EHR Patient Data")

# Connect to multiple FHIR sources
fhir = FHIRGateway()
fhir.add_source("epic", "fhir://fhir.epic.com/r4?client_id=epic_client_id")
fhir.add_source("cerner", "fhir://fhir.cerner.com/r4?client_id=cerner_client_id")

@fhir.aggregate(Patient)
def enrich_patient_data(id: str, source: str) -> Patient:
    """Get patient data from any connected EHR and add AI enhancements"""
    bundle = fhir.search(
        Patient,
        {"_id": id},
        source,
        add_provenance=True,
        provenance_tag="ai-enhanced",
    )
    return bundle

app.register_gateway(fhir)

# Available at: GET /fhir/transform/Patient/123?source=epic
# Available at: GET /fhir/transform/Patient/123?source=cerner

if __name__ == "__main__":
    import uvicorn
    uvicorn.run(app, port=8000)

Testing with Sandbox [Docs]

from healthchain.sandbox import SandboxClient

# Test CDS Hooks service with synthetic data
client = SandboxClient(
    url="http://localhost:8000/cds/cds-services/discharge-summary",
    workflow="encounter-discharge"
)

# Load from test datasets
client.load_from_registry(
    "synthea-patient",
    data_dir="./data/synthea",
    resource_types=["Condition", "DocumentReference"],
    sample_size=5
)

# Send requests and save results
responses = client.send_requests()
client.save_results("./output/")

🛣️ Road Map

  • 🔍 Data provenance and observability
  • 🔒 Production security and compliance – enhanced authentication, audit logging, and HIPAA-aligned controls (encryption, access logging, configuration patterns)
  • 🔄 HL7v2 parsing, FHIR profile conversion, and OMOP mapping
  • 🧾 Da Vinci CRD/DTR/PAS prior authorization workflows
  • 🚀 Kubernetes deployment and telemetry integration
  • 📊 Model performance monitoring with MLFlow integration
  • 🤖 MCP server integration

🤝 Contributing

HealthChain is built for production healthcare systems. We prioritize contributors with:

  • Healthcare product experience – shipped clinical systems, EHR integrations, or health data products
  • FHIR expertise – designed or implemented FHIR APIs and interoperability solutions
  • Healthcare security background – auth, privacy, compliance in regulated environments

If that's you, we'd love your input!

Get started:

🤗 Acknowledgements

This project builds on fhir.resources and CDS Hooks standards developed by HL7 and Boston Children's Hospital.

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

healthchain-0.13.3.tar.gz (4.1 MB view details)

Uploaded Source

Built Distribution

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

healthchain-0.13.3-py3-none-any.whl (262.0 kB view details)

Uploaded Python 3

File details

Details for the file healthchain-0.13.3.tar.gz.

File metadata

  • Download URL: healthchain-0.13.3.tar.gz
  • Upload date:
  • Size: 4.1 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for healthchain-0.13.3.tar.gz
Algorithm Hash digest
SHA256 8e66038ff1d7aec9f8f104e91c16f31d253bce8a70658821f7231628038e9be9
MD5 ff4e93f2ede02d552b29976e13f8b523
BLAKE2b-256 f9863f9b9d9a480f2b8c2579d3a9376dd9e6ec0a858f6ba453b5dba4336caf2b

See more details on using hashes here.

Provenance

The following attestation bundles were made for healthchain-0.13.3.tar.gz:

Publisher: publish.yml on dotimplement/HealthChain

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file healthchain-0.13.3-py3-none-any.whl.

File metadata

  • Download URL: healthchain-0.13.3-py3-none-any.whl
  • Upload date:
  • Size: 262.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for healthchain-0.13.3-py3-none-any.whl
Algorithm Hash digest
SHA256 9369deb74db81c44e55f6f868d1f95c59ac36acfcad0922cfbc742f2892a1db6
MD5 6eb7df0c012a4761e838e66b9cfb35f4
BLAKE2b-256 d17283ad1a36fbb8ce48adf3f80ba2300bc3244b2b439b9d125b47a5822bc1c0

See more details on using hashes here.

Provenance

The following attestation bundles were made for healthchain-0.13.3-py3-none-any.whl:

Publisher: publish.yml on dotimplement/HealthChain

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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