You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
After [installing HealthChain](installation.md), get up to speed quickly with the core components before diving further into the [full documentation](reference/index.md)!
4
+
HealthChain has three main components:
4
5
5
-
HealthChain provides three core tools for healthcare AI integration: **Gateway** for connecting to multiple healthcare systems, **Pipelines** for FHIR-native AI workflows, and **InteropEngine** for healthcare data format conversion between FHIR, CDA, and HL7v2.
6
+
-**Gateway:** Connect to multiple healthcare systems with a single API.
7
+
-**Pipelines:** Easily build data processing pipelines for both clinical text and [FHIR](https://www.hl7.org/fhir/) data.
8
+
-**InteropEngine:** Seamlessly convert between data formats like [FHIR](https://www.hl7.org/fhir/), [HL7 CDA](https://www.hl7.org/implement/standards/product_brief.cfm?product_id=7), and [HL7v2](https://www.hl7.org/implement/standards/product_brief.cfm?product_id=185).
6
9
7
-
## Core Components
8
10
9
-
### HealthChainAPI Gateway 🔌
11
+
##Core Components 🧩
10
12
11
-
The HealthChainAPI provides a unified interface for connecting your AI models to multiple healthcare systems through a single API. Handle FHIR, CDS Hooks, and SOAP/CDA protocols with OAuth2 authentication.
13
+
### Gateway 🔌
14
+
15
+
The [**HealthChainAPI**](./reference/gateway/api.md) provides a unified interface for connecting your AI application and models to multiple healthcare systems through a single API. It automatically handles [FHIR API](https://www.hl7.org/fhir/http.html), [CDS Hooks](https://cds-hooks.org/), and [SOAP/CDA protocols](https://www.hl7.org/implement/standards/product_brief.cfm?product_id=7) with [OAuth2 authentication](https://oauth.net/2/).
12
16
13
17
[(Full Documentation on Gateway)](./reference/gateway/gateway.md)
14
18
@@ -41,51 +45,52 @@ app.register_gateway(fhir)
41
45
42
46
### Pipeline 🛠️
43
47
44
-
HealthChain Pipelines provide a flexible way to build and manage processing pipelines for NLP and ML tasks that can easily integrate with electronic health record (EHR) systems.
48
+
HealthChain [**Pipelines**](./reference/pipeline/pipeline.md) provide a flexible way to build and manage processing pipelines for NLP and ML tasks that can easily integrate with electronic health record (EHR) systems.
45
49
46
50
You can build pipelines with three different approaches:
47
51
48
-
#### 1. Build Your Own Pipeline with Inline Functions
52
+
#### 1. Quick Inline Functions
53
+
54
+
For quick experiments, start by picking the right [**Container**](./reference/pipeline/data_container.md) when you initialize your pipeline (e.g. `Pipeline[Document]()` for clinical text).
49
55
50
-
This is the most flexible approach, ideal for quick experiments and prototyping. Initialize a pipeline type hinted with the container type you want to process, then add components to your pipeline with the `@add_node` decorator.
56
+
Containers make your pipeline FHIR-native by loading and transforming your data (free text, EHR resources, etc.) into structured FHIR-ready formats. Just add your processing functions with `@add_node`, compile with `.build()`, and your pipeline is ready to process FHIR data end-to-end.
51
57
52
-
Compile the pipeline with `.build()` to use it.
58
+
[(Full Documentation on Container)](./reference/pipeline/data_container.md)
53
59
54
60
```python
55
61
from healthchain.pipeline import Pipeline
56
62
from healthchain.io import Document
63
+
from healthchain.fhir import create_condition
57
64
58
-
nlp_pipeline= Pipeline[Document]()
65
+
pipeline= Pipeline[Document]()
59
66
60
-
@nlp_pipeline.add_node
61
-
deftokenize(doc: Document) -> Document:
62
-
doc.tokens = doc.text.split()
63
-
return doc
67
+
@pipeline.add_node
68
+
defextract_diabetes(doc: Document) -> Document:
69
+
"""Adds a FHIR Condition for diabetes if mentioned in the text."""
70
+
if"diabetes"in doc.text.lower():
71
+
condition = create_condition(
72
+
code="73211009",
73
+
display="Diabetes mellitus",
74
+
)
75
+
doc.fhir.problem_list.append(condition)
64
76
65
-
@nlp_pipeline.add_node
66
-
defpos_tag(doc: Document) -> Document:
67
-
doc.pos_tags = ["NOUN"if token[0].isupper() else"VERB"for token in doc.tokens]
68
77
return doc
69
78
70
-
nlp = nlp_pipeline.build()
71
-
72
-
doc = Document("Patient has a fracture of the left femur.")
73
-
doc = nlp(doc)
79
+
pipe = pipeline.build()
74
80
75
-
print(doc.tokens)
76
-
print(doc.pos_tags)
81
+
doc= Document("Patient has a history of diabetes.")
#### 2. Build Your Own Pipeline with Components, Models, and Connectors
87
+
#### 2. Build With Componentsand Adapters
83
88
84
-
Components are stateful - they're classes instead of functions. They can be useful for grouping related processing steps together, setting configurations, or wrapping specific model loading steps.
89
+
[**Components**](./reference/) are reusable, stateful classes that encapsulate specific processing logic, model loading, or configuration for your pipeline. Use them to organize complex workflows, handle model state, or integrate third-party libraries with minimal setup.
85
90
86
-
HealthChain comes with a few pre-built components, but you can also easily add your own. You can find more details on the [Components](./reference/pipeline/components/components.md) and [Integrations](./reference/pipeline/integrations/integrations.md)documentation pages.
91
+
HealthChain provides a set of ready-to-use [**NLP Integrations**](./reference/pipeline/integrations/integrations.md)for common clinical NLP and ML tasks, and you can easily implement your own.
87
92
88
-
Add components to your pipeline with the `.add_node()` method and compile with `.build()`.
93
+
[(Full Documentation on Components)](./reference/pipeline/components/components.md)
89
94
90
95
```python
91
96
from healthchain.pipeline import Pipeline
@@ -104,18 +109,14 @@ doc = Document("Patient presents with hypertension.")
104
109
output = pipe(doc)
105
110
```
106
111
107
-
Let's go one step further! You can use [Adapters](./reference/pipeline/adapters/adapters.md) to work directly with [CDA](https://www.hl7.org.uk/standards/hl7-standards/cda-clinical-document-architecture/) and [FHIR](https://hl7.org/fhir/) data received from healthcare system APIs. Adapters handle format conversion while keeping your pipeline pure ML processing.
112
+
You can process legacy healthcare data formats too. [**Adapters**](./reference/pipeline/adapters/adapters.md) convert between healthcare formats like [CDA](https://www.hl7.org/implement/standards/product_brief.cfm?product_id=7) and your pipeline — just parse, process, and format without worrying about low-level data conversion.
113
+
114
+
[(Full Documentation on Adapters)](./reference/pipeline/adapters/adapters.md)
108
115
109
116
```python
110
-
from healthchain.pipeline import Pipeline
111
-
from healthchain.pipeline.components import SpacyNLP
Prebuilt pipelines are pre-configured collections of Components and Models optimized for specific healthcare AI use cases. They offer the highest level of abstraction and are the easiest way to get started.
132
+
Prebuilt pipelines are the fastest way to jump into healthcare AI with minimal setup: just load and run. Each pipeline bundles best-practice components and models for common clinical tasks (like coding or summarization) and handles all FHIR/CDA conversion for you. Easily customize or extend pipelines by adding/removing components, or swap models as needed.
132
133
133
-
For a full list of available prebuilt pipelines and details on how to configure and customize them, see the [Pipelines](./reference/pipeline/pipeline.md) documentation page.
134
+
[(Full Documentation on Pipelines)](./reference/pipeline/pipeline.md#prebuilt-)
134
135
135
136
```python
136
137
from healthchain.pipeline import MedicalCodingPipeline
The HealthChain Interoperability module provides tools for converting between different healthcare data formats, including HL7 FHIR, HL7 CDA, and HL7v2 messages.
149
+
The HealthChain Interoperability module provides tools for converting between different healthcare data formats, including FHIR, CDA, and HL7v2 messages.
156
150
157
151
[(Full Documentation on Interoperability Engine)](./reference/interop/interop.md)
Test your AI applications in realistic healthcare contexts with `SandboxClient` for CDS Hooks and clinical documentation workflows.
175
+
Use [**SandboxClient**](./reference/utilities/sandbox.md) to quickly test your app against real-world EHR scenarios like CDS Hooks or Clinical Documentation Improvement (CDI) workflows. Load test datasets, send requests to your service, and validate responses in a few lines of code.
182
176
183
177
[(Full Documentation on Sandbox)](./reference/utilities/sandbox.md)
184
178
179
+
#### Workflows
180
+
181
+
A [**workflow**](./reference/utilities/sandbox.md#workflow-protocol-compatibility) represents a specific event in an EHR system that triggers your service (e.g., `patient-view` when opening a patient chart, `encounter-discharge` when discharging a patient).
182
+
183
+
Workflows determine the request structure, required FHIR resources, and validation rules. Different workflows are compatible with different protocols:
[**Dataset Loaders**](./reference/utilities/sandbox.md#dataset-loaders) are shortcuts for loading common clinical test datasets from file. Currently available:
194
+
195
+
| Dataset Key | Description | FHIR Version | Source | Download Link |
# Results automatically saved to ./output/ on success
248
+
```
249
+
250
+
### FHIR Helpers 🔥
205
251
206
-
The `fhir` module provides a set of helper functions for working with FHIR resources.
252
+
Use `healthchain.fhir` helpers to quickly create and manipulate FHIR resources (like `Condition`, `Observation`, etc.) in your code, ensuring they’re standards-compliant with minimal boilerplate.
253
+
254
+
[(Full Documentation on FHIR Helpers)](./reference/utilities/fhir_helpers.md)
[(Full Documentation on FHIR Helpers)](./reference/utilities/fhir_helpers.md)
221
-
222
-
### Data Generator
223
-
224
-
You can use the data generator to generate synthetic FHIR data for testing.
225
-
226
-
The `CdsDataGenerator` generates synthetic [FHIR](https://hl7.org/fhir/) data as [Pydantic](https://docs.pydantic.dev/) models suitable for different CDS workflows. Use it standalone or with `SandboxClient.load_free_text()` to include text-based data.
227
-
228
-
[(Full Documentation on Data Generators)](./reference/utilities/data_generator.md)
229
-
230
-
```python
231
-
from healthchain.sandbox.generators import CdsDataGenerator
232
-
from healthchain.sandbox.workflows import Workflow
Check out our [Cookbook](cookbook/index.md) section for more worked examples! HealthChain is still in its early stages, so if you have any questions please feel free to reach us on [Github](https://github.com/dotimplement/HealthChain/discussions) or [Discord](https://discord.gg/UQC6uAepUz).
Copy file name to clipboardExpand all lines: docs/reference/pipeline/integrations/integrations.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,4 +1,4 @@
1
-
# HealthChain Integrations
1
+
# NLP Integrations
2
2
3
3
This document provides an overview of the integration components available in the HealthChain package. These components allow you to easily incorporate popular NLP libraries into your HealthChain pipelines.
0 commit comments