Python SDK for healthcare AI โ typed, validated FHIR tools for agents, real-time EHR connectivity, production deployment โจ ๐ฅ.
> /plugin marketplace add healthchainai/HealthChain> /plugin install healthchain@healthchain

[![PyPI Version][pypi-version-badge]][pypi] [![Stars][stars-badge]][stars] [![Downloads][downloads-badge]][pypistats]
[![License][license-badge]][license]
[![Python Versions][python-versions-badge]][pypi]
[![Build Status][build-badge]][build]
[![AI-Assisted Development][ai-badge]][claude-md]
[![Substack][substack-badge]][substack] [![Discord][discord-badge]][discord]
Connect Python pipelines and applications to live FHIR APIs, build and validate structured output, and deliver it through REST, CDS Hooks, CDA, MCP, or LangChain.
pip install healthchain
HealthChain puts a consistent FHIR boundary around your Python code: live data in, your own logic in the middle, and validated FHIR out. Built for research software, healthcare data, and AI teams.
Every healthcare data team rebuilds the same integration layer. Whether your logic is rule-based, a logistic regression, or an agent, it needs authenticated access to real FHIR APIs and a reliable way to turn output into coded FHIR. Pipelines tied to one site's warehouse don't travel, and structural or coding errors may only be discovered downstream.
HealthChain handles that layer so you can focus on your logic and your domain.
Featured & Presented:
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.
from healthchain.gateway import HealthChainAPI, FHIRGateway
from healthchain.gateway.clients import FHIRAuthConfig
from healthchain.fhir.r4b import Bundle, Patient
# Create a FHIR-connected service
app = HealthChainAPI(title="Multi-EHR Patient Data")
# Credentials are loaded from EPIC_* and CERNER_* environment variables
fhir = FHIRGateway()
fhir.add_source("epic", FHIRAuthConfig.from_env("EPIC").to_connection_string())
fhir.add_source("cerner", FHIRAuthConfig.from_env("CERNER").to_connection_string())
@fhir.aggregate(Patient)
def patient_data(id: str, source: str) -> Bundle:
"""Fetch patient data from any configured FHIR source."""
bundle = fhir.search(
Patient,
{"_id": id},
source,
add_provenance=True,
provenance_tag="healthchain-source",
)
return bundle
app.register_gateway(fhir)
# Available at: GET /fhir/aggregate/Patient?id=123&sources=epic&sources=cerner
if __name__ == "__main__":
app.run(port=8888)
Turn a working pipeline into a configurable FHIR service:
healthchain new my-app -t fhir-gateway
cd my-app
healthchain serve
Add your logic in app.py. Use healthchain.yaml to configure FHIR sources and service settings while keeping credentials in environment variables. See the CLI reference for all commands.
from healthchain.tools import FHIRToolkit
# One toolkit: build, validate, read, and code FHIR โ as typed agent tools
kit = FHIRToolkit(bundle="patient_bundle.json")
kit.as_mcp().run() # serve to Claude or any MCP client
tools = kit.as_langchain() # or drop into a LangChain agent
Or serve the tools straight from the terminal:
healthchain mcp --bundle patient_bundle.json
Install the HealthChain plugin to give Claude Code or Codex the current API, CLI, and recipes:
# Claude Code
/plugin marketplace add healthchainai/HealthChain
/plugin install healthchain@healthchain
# Codex
codex plugin marketplace add healthchainai/HealthChain
codex plugin add healthchain@healthchain
Or point any assistant at llms.txt for a map of the current API docs.
TerminologyLookup interface to FHIR terminology servers and licensed vocabularieshealthchain is a Claude Code plugin with 1 hand-picked skill, indexed on Flowy in the Backend category. Install it with the command on its page. It includes healthchain. Its skills do not fire on their own yet. Request auto-invocation to have Flowy route them as you prompt. Free and open source.
Is this plugin yours?
Claim it with GitHubSubmit a pluginPromote it