Setup
Get your development environment ready for building the ClinicalFlow service.
Install HealthChain
Create a new project directory:
Option 1: Using uv (Recommended)
uv is a fast Python package manager. If you don't have it installed, you can install it by following the instructions here.
Then initialize a project and install HealthChain:
Option 2: Using pip with a virtual environment
If you prefer using pip, create and activate a virtual environment first:
python -m venv .venv
source .venv/bin/activate # On Windows: .venv\Scripts\activate
pip install healthchain
All the code running examples in this tutorial will show both the uv and pip versions of the commands. These are typically the same up to a factor of adding uv run at the beginning of the command.
Verify Installation
Create a file called check_install.py:
import healthchain
from healthchain.io import Document
# Test creating a simple document
doc = Document("Patient has a history of hypertension.")
print(f"Created document with {len(doc.text)} characters")
Run it:
You should see the following output:
What's Next
Now that your environment is set up, let's learn about FHIR basics - the healthcare data format you'll be working with.