AI News HubLIVE
In-site rewrite4 min read

Show HN: HealthChain – Python SDK to connect AI models to live EHR systems

HealthChain is an open-source Python SDK that simplifies integrating AI models with healthcare EHR systems. It provides type-safe FHIR resources, real-time EHR connectivity, and production-ready deployment tools, enabling developers and researchers to move AI models from experiments to clinical use quickly.

SourceHacker News AIAuthor: adjks

Uh oh!

There was an error while loading. Please reload this page.

Uh oh!

There was an error while loading. Please reload this page.

Notifications You must be signed in to change notification settings

Fork 39

Star 210

BranchesTags

Open more actions menu

Folders and files

NameName

Last commit message

Last commit date

Latest commit

History

165 Commits

165 Commits

.github

.github

cookbook

cookbook

dev-templates

dev-templates

docs

docs

healthchain

healthchain

notebooks

notebooks

resources

resources

scripts

scripts

tests

tests

.dockerignore

.dockerignore

.gitignore

.gitignore

.pre-commit-config.yaml

.pre-commit-config.yaml

CITATION.cff

CITATION.cff

CLAUDE.md

CLAUDE.md

CODE_OF_CONDUCT.md

CODE_OF_CONDUCT.md

CONTRIBUTING.md

CONTRIBUTING.md

COOKBOOK_CONTRIBUTORS.md

COOKBOOK_CONTRIBUTORS.md

Dockerfile

Dockerfile

LICENSE

LICENSE

MAINTAINERS.md

MAINTAINERS.md

README.md

README.md

SECURITY.md

SECURITY.md

mkdocs.yml

mkdocs.yml

pyproject.toml

pyproject.toml

requirements-doc.txt

requirements-doc.txt

uv.lock

uv.lock

Repository files navigation

Open-Source Python SDK for Healthcare AI

The model is the easy part — the integration that blocks it from ever reaching production is the hard part. HealthChain handles it, giving your models and agents tools they can trust: type-safe FHIR resources, real-time EHR connectivity, and production-ready deployment. So what you build holds up outside the demo.

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

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

The quickest way for AI developers and researchers to ship healthcare AI — everything you need out of the box, built to scale with you.

🔌 Multi-EHR Data Aggregation

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

Getting Started →

🚀 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 →

🔥 FHIR Development Utilities

Type-safe FHIR resource creation, validation helpers, and sandbox environments — skip the boilerplate and work with healthcare data natively

Getting Started →

⚡️ Real-Time Clinical Workflow Integration

Deploy AI models as CDS services that integrate directly into EHR workflows — alerts, recommendations, and automated coding at the point of care

Getting Started →

Why HealthChain?

Every serious healthcare AI project builds the same integration infrastructure from scratch. Whether you're deploying a logistic regression, a 70B-parameter model, or an agentic workflow, the wall between a trained model and a live clinical system is the same: real FHIR APIs, multi-site deployments, auditable governance. No off-the-shelf solution exists, and engineers who understand both AI and healthcare protocols are scarce and hard to retain.

HealthChain handles that complexity so you can focus on what actually matters: the model and the patient.

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

Native LLM, agent & ML support - Wire up any model or agent — LLMs, LangChain, scikit-learn — and output results as FHIR

Works with your existing stack - Integrates with FastAPI, LangChain, HuggingFace, and spaCy

Production-ready foundations - Dockerized deployment, configurable security, and an architecture built for NHS and HIPAA environments

🏆 Recognition & Community

Featured & Presented:

Featured in TLDR AI Newsletter (900K+ developers)

Featured by Medplum for open source integration with Epic

Presented at NHS Python Open Source Conference (watch talk)

Built from NHS AI deployment experience – read the origin story

🤝 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

Creating a Gateway [Docs]

from healthchain.gateway import HealthChainAPI, FHIRGateway from healthchain.fhir.r4b 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": app.run(port=8888)

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

🛣️ What we're building towards

🔒 Production security and compliance — API authentication, audit logging, and configurable security for NHS/HIPAA deployments

📋 Governance as config — clinical safety, data access agreements, and compliance standards as a first-class deployment artifact in healthchain.yaml

🔌 Deeper EHR connectivity — more FHIR sources, live data patterns, and real-world integration examples from pilot deployments

📊 Observability — deployment telemetry and audit trails for healthcare systems

🤖 A toolkit for clinical AI agents — typed FHIR tools, validation loops, and evals so agents can work with clinical data reliably

🤝 Contributing

HealthChain is built by and for the next generation of healthcare developers — researchers moving models from retrospective data into live systems, AI developers who don't want to spend months learning FHIR before they can ship anything. The best contributions come from people who have hit a real problem and have something specific to say about it.

Get started:

Working with healthcare or research data? Contribute a cookbook — bring your use case, I'll personally support you through it

Read CONTRIBUTING.md for guidelines

Technical questions and ideas → GitHub Discussions

Pilots and partnerships → email

🤗 Acknowledgements

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

© 2024–2026 dotimplement ai. HealthChain is an open source project maintained by dotimplement ai.

About

Python SDK for healthcare AI: connect models to live EHR systems, skip the integration tax 💫 🏥

healthchainai.github.io/HealthChain/

Topics

python

nlp

machine-learning

ai

healthcare

fhir

ehr

mlops

fhir-api

cds-hooks

healthcare-ai

llm

Resources

Readme

License

Apache-2.0 license

Code of conduct

Code of conduct

Contributing

Contributing

Security policy

Security policy

Uh oh!

There was an error while loading. Please reload this page.

Activity

Custom properties

Stars

210 stars

Watchers

6 watching

Forks

39 forks

Report repository

Releases 26

HealthChain v0.15.0

Latest

Jun 23, 2026

+ 25 releases

Sponsor this project

Uh oh!

There was an error while loading. Please reload this page.

Learn more about GitHub Sponsors

Packages 0

Uh oh!

There was an error while loading. Please reload this page.

Uh oh!

There was an error while loading. Please reload this page.

Contributors

Uh oh!

There was an error while loading. Please reload this page.

Languages

Python 97.1%

Liquid 1.7%

Jupyter Notebook 1.1%

Dockerfile 0.1%